Initial commit
[yaz4j-moved-to-github.git] / dependencies / yaz_3.0.14 / doc / comstack.ssl.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>7. SSL</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="comstack.html" title="Chapter 11. The COMSTACK Module"><link rel="prev" href="comstack.addresses.html" title="6. Addresses"><link rel="next" href="comstack.diagnostics.html" title="8. Diagnostics"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">7. SSL</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="comstack.addresses.html">Prev</a> </td><th width="60%" align="center">Chapter 11. The COMSTACK Module</th><td width="20%" align="right"> <a accesskey="n" href="comstack.diagnostics.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="comstack.ssl"></a>7. SSL</h2></div></div></div><p>
2     </p><pre class="synopsis">
3      void *cs_get_ssl(COMSTACK cs);
4     </pre><p>
5     Returns the SSL handle, <code class="literal">SSL *</code> for comstack. If comstack
6     is not of type SSL, NULL is returned.
7    </p><p>
8     </p><pre class="synopsis">
9      int cs_set_ssl_ctx(COMSTACK cs, void *ctx);
10     </pre><p>
11     Sets SSL context for comstack. The parameter is expected to be of type
12     <code class="literal">SSL_CTX *</code>. This function should be called just
13     after comstack has been created (before connect, bind, etc).
14     This function returns 1 for success; 0 for failure.
15    </p><p>
16     </p><pre class="synopsis">
17      int cs_set_ssl_certificate_file(COMSTACK cs, const char *fname);
18     </pre><p>
19     Sets SSL certificate for comstack as a PEM file. This function
20     returns 1 for success; 0 for failure.
21    </p><p>
22     </p><pre class="synopsis">
23      int cs_get_ssl_peer_certificate_x509(COMSTACK cs, char **buf, int *len);
24     </pre><p>
25     This function returns the peer certificate. If successful,
26     <code class="literal">*buf</code> and <code class="literal">*len</code> holds
27     X509 buffer and length respectively. Buffer should be freed
28     with <code class="literal">xfree</code>. This function returns 1 for success;
29     0 for failure.
30    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="comstack.addresses.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="comstack.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="comstack.diagnostics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6. Addresses </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 8. Diagnostics</td></tr></table></div></body></html>