/usr/share/doc/libucommon-dev/a00131.html is in libucommon-doc 3.2.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>UCommon: ucc::secure Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="classes.html"><span>Data Structure Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="a00214.html">ucc</a>::<a class="el" href="a00131.html">secure</a>
</div>
</div>
<div class="contents">
<h1>ucc::secure Class Reference</h1><!-- doxytag: class="ucc::secure" -->
<p>Common secure socket support.
<a href="#_details">More...</a></p>
<p><code>#include <<a class="el" href="a00203_source.html">secure.h</a>></code></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a29b65f0d4fc0e34f1da452729f3da47c"></a><!-- doxytag: member="ucc::secure::bufio_t" ref="a29b65f0d4fc0e34f1da452729f3da47c" args="" -->
typedef void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#a29b65f0d4fc0e34f1da452729f3da47c">bufio_t</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Covenience type to represent a secure socket buf i/o stream. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9a6bf354c256efa7cb0996efedf311a"></a><!-- doxytag: member="ucc::secure::context_t" ref="ad9a6bf354c256efa7cb0996efedf311a" args="" -->
typedef <a class="el" href="a00131.html">secure</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#ad9a6bf354c256efa7cb0996efedf311a">context_t</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convenience type to represent a security context. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#a7d522ec3912078b59d49b8e004779961">error_t</a> { <br/>
<b>OK</b> = 0,
<b>INVALID</b>,
<b>MISSING_CERTIFICATE</b>,
<b>MISSING_PRIVATEKEY</b>,
<br/>
<b>INVALID_CERTIFICATE</b>,
<b>INVALID_AUTHORITY</b>,
<b>INVALID_PEERNAME</b>,
<b>INVALID_CIPHER</b>
<br/>
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><p>Different error states of the security context. </p>
<br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab6a9c66d872da1aa8abb5b954c18b67e"></a><!-- doxytag: member="ucc::secure::session_t" ref="ab6a9c66d872da1aa8abb5b954c18b67e" args="" -->
typedef void * </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#ab6a9c66d872da1aa8abb5b954c18b67e">session_t</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Convenience type to represent a secure socket session. <br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00131.html#a7d522ec3912078b59d49b8e004779961">error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#af2825793079391fd0a4b9a0894a6e739">err</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get last error code associated with the security context. <a href="#af2825793079391fd0a4b9a0894a6e739"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#ac84baffe227bffd59836a7ce639aecd1">is</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Determine if the current security context is valid. <a href="#ac84baffe227bffd59836a7ce639aecd1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8538020fd13013e0d1a670a22bc61512"></a><!-- doxytag: member="ucc::secure::~secure" ref="a8538020fd13013e0d1a670a22bc61512" args="()" -->
virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#a8538020fd13013e0d1a670a22bc61512">~secure</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">This is derived in different back-end libraries, and will be used to clear certificate credentials. <br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#a50d28b75513322b05a139396e7e8d394">cipher</a> (<a class="el" href="a00131.html">context_t</a> context, const char *ciphers)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Assign a non-default cipher to the context. <a href="#a50d28b75513322b05a139396e7e8d394"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00131.html">context_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#aea6cc70f44e6571df09cd7a117c8a291">client</a> (const char *authority=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create an anonymous client context with an optional authority to validate. <a href="#aea6cc70f44e6571df09cd7a117c8a291"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#aa26aacde3bd67cb682a2b8415891ecdd">init</a> (const char *program=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize secure stack for first use, and report if SSL support is compiled in. <a href="#aa26aacde3bd67cb682a2b8415891ecdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00131.html">context_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#a7f557e56d10dcbd830f1dea154c925a0">server</a> (const char *authority=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a sever context. <a href="#a7f557e56d10dcbd830f1dea154c925a0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00131.html">context_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#a223ede752d16a14843c532104efcaaf2">user</a> (const char *authority)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a peer user client context. <a href="#a223ede752d16a14843c532104efcaaf2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="a00131.html#a7d522ec3912078b59d49b8e004779961">error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#ab772dd191de7b49df456586861d2211e">verify</a> (<a class="el" href="a00131.html#ab6a9c66d872da1aa8abb5b954c18b67e">session_t</a> session, const char *peername=NULL)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Verify a certificate chain through your certificate authority. <a href="#ab772dd191de7b49df456586861d2211e"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08e113f3e92a506269d5f86b1ed6e074"></a><!-- doxytag: member="ucc::secure::error" ref="a08e113f3e92a506269d5f86b1ed6e074" args="" -->
<a class="el" href="a00131.html#a7d522ec3912078b59d49b8e004779961">error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00131.html#a08e113f3e92a506269d5f86b1ed6e074">error</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Last error flagged for this context. <br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Common secure socket support. </p>
<p>This offers common routines needed for secure/ssl socket support code. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar <<a href="mailto:dyfet@gnutelephony.org">dyfet@gnutelephony.org</a>> </dd></dl>
<p>Definition at line <a class="el" href="a00203_source.html#l00062">62</a> of file <a class="el" href="a00203_source.html">secure.h</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a50d28b75513322b05a139396e7e8d394"></a><!-- doxytag: member="ucc::secure::cipher" ref="a50d28b75513322b05a139396e7e8d394" args="(context_t context, const char *ciphers)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static void ucc::secure::cipher </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00131.html">context_t</a> </td>
<td class="paramname"> <em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>ciphers</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Assign a non-default cipher to the context. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>context</em> </td><td>to set cipher for. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>ciphers</em> </td><td>to set. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="aea6cc70f44e6571df09cd7a117c8a291"></a><!-- doxytag: member="ucc::secure::client" ref="aea6cc70f44e6571df09cd7a117c8a291" args="(const char *authority=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="a00131.html">context_t</a> ucc::secure::client </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>authority</em> = <code>NULL</code></td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create an anonymous client context with an optional authority to validate. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>authority</em> </td><td>path to use or NULL if none. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a basic client security context. </dd></dl>
</div>
</div>
<a class="anchor" id="af2825793079391fd0a4b9a0894a6e739"></a><!-- doxytag: member="ucc::secure::err" ref="af2825793079391fd0a4b9a0894a6e739" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="a00131.html#a7d522ec3912078b59d49b8e004779961">error_t</a> ucc::secure::err </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Get last error code associated with the security context. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>last error code or 0/OK if none. </dd></dl>
<p>Definition at line <a class="el" href="a00203_source.html#l00165">165</a> of file <a class="el" href="a00203_source.html">secure.h</a>.</p>
</div>
</div>
<a class="anchor" id="aa26aacde3bd67cb682a2b8415891ecdd"></a><!-- doxytag: member="ucc::secure::init" ref="aa26aacde3bd67cb682a2b8415891ecdd" args="(const char *program=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static bool ucc::secure::init </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>program</em> = <code>NULL</code></td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initialize secure stack for first use, and report if SSL support is compiled in. </p>
<p>This allows a program name to be passed, which may be used for some proxy systems. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>program</em> </td><td>name we are initializing for. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if ssl support is available, false if not. </dd></dl>
</div>
</div>
<a class="anchor" id="ac84baffe227bffd59836a7ce639aecd1"></a><!-- doxytag: member="ucc::secure::is" ref="ac84baffe227bffd59836a7ce639aecd1" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool ucc::secure::is </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Determine if the current security context is valid. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if valid, -1 if not. </dd></dl>
<p>Definition at line <a class="el" href="a00203_source.html#l00158">158</a> of file <a class="el" href="a00203_source.html">secure.h</a>.</p>
</div>
</div>
<a class="anchor" id="a7f557e56d10dcbd830f1dea154c925a0"></a><!-- doxytag: member="ucc::secure::server" ref="a7f557e56d10dcbd830f1dea154c925a0" args="(const char *authority=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="a00131.html">context_t</a> ucc::secure::server </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>authority</em> = <code>NULL</code></td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a sever context. </p>
<p>The certificate file used will be based on the <a class="el" href="a00131.html#aa26aacde3bd67cb682a2b8415891ecdd" title="Initialize secure stack for first use, and report if SSL support is compiled in.">init()</a> method name. This may often be /etc/ssl/certs/initname.pem. Similarly, a matching private key certificate will also be loaded. An optional certificate authority document can be used when we are establishing a service which ssl clients have their own certificates. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>authority</em> </td><td>path to use or NULL if none. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a security context that is cast from derived library. </dd></dl>
</div>
</div>
<a class="anchor" id="a223ede752d16a14843c532104efcaaf2"></a><!-- doxytag: member="ucc::secure::user" ref="a223ede752d16a14843c532104efcaaf2" args="(const char *authority)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="a00131.html">context_t</a> ucc::secure::user </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>authority</em></td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Create a peer user client context. </p>
<p>This assumes a user certificate in ~/.ssl/certs and the user private key in ~/.ssl/private. The path to an authority is also sent. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>authority</em> </td><td>path to use. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab772dd191de7b49df456586861d2211e"></a><!-- doxytag: member="ucc::secure::verify" ref="ab772dd191de7b49df456586861d2211e" args="(session_t session, const char *peername=NULL)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="a00131.html#a7d522ec3912078b59d49b8e004779961">error_t</a> ucc::secure::verify </td>
<td>(</td>
<td class="paramtype"><a class="el" href="a00131.html#ab6a9c66d872da1aa8abb5b954c18b67e">session_t</a> </td>
<td class="paramname"> <em>session</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>peername</em> = <code>NULL</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Verify a certificate chain through your certificate authority. </p>
<p>This uses the ca loaded as an optional argument for client and server. Optionally the hostname of the connection can also be verified by pulling the peer certificate. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>session</em> </td><td>that is connected. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>peername</em> </td><td>that we expect. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>secure error level or secure::OK if none. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>ucommon/<a class="el" href="a00203_source.html">secure.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Tue Jul 6 08:22:44 2010 for UCommon by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>
|