ssl.html 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248
  1. <?xml version="1.0" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>ssl</title>
  6. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  7. <link rev="made" href="mailto:root@localhost" />
  8. </head>
  9. <body>
  10. <ul id="index">
  11. <li><a href="#NAME">NAME</a></li>
  12. <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
  13. <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
  14. <li><a href="#DATA-STRUCTURES">DATA STRUCTURES</a></li>
  15. <li><a href="#HEADER-FILES">HEADER FILES</a></li>
  16. <li><a href="#API-FUNCTIONS">API FUNCTIONS</a>
  17. <ul>
  18. <li><a href="#Dealing-with-Protocol-Methods">Dealing with Protocol Methods</a></li>
  19. <li><a href="#Dealing-with-Ciphers">Dealing with Ciphers</a></li>
  20. <li><a href="#Dealing-with-Protocol-Contexts">Dealing with Protocol Contexts</a></li>
  21. <li><a href="#Dealing-with-Sessions">Dealing with Sessions</a></li>
  22. <li><a href="#Dealing-with-Connections">Dealing with Connections</a></li>
  23. </ul>
  24. </li>
  25. <li><a href="#RETURN-VALUES">RETURN VALUES</a></li>
  26. <li><a href="#SEE-ALSO">SEE ALSO</a></li>
  27. <li><a href="#HISTORY">HISTORY</a></li>
  28. <li><a href="#COPYRIGHT">COPYRIGHT</a></li>
  29. </ul>
  30. <h1 id="NAME">NAME</h1>
  31. <p>ssl - OpenSSL SSL/TLS library</p>
  32. <h1 id="SYNOPSIS">SYNOPSIS</h1>
  33. <p>See the individual manual pages for details.</p>
  34. <h1 id="DESCRIPTION">DESCRIPTION</h1>
  35. <p>The OpenSSL <b>ssl</b> library implements the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols. It provides a rich API which is documented here.</p>
  36. <p>An <b>SSL_CTX</b> object is created as a framework to establish TLS/SSL enabled connections (see <a href="../man3/SSL_CTX_new.html">SSL_CTX_new(3)</a>). Various options regarding certificates, algorithms etc. can be set in this object.</p>
  37. <p>When a network connection has been created, it can be assigned to an <b>SSL</b> object. After the <b>SSL</b> object has been created using <a href="../man3/SSL_new.html">SSL_new(3)</a>, <a href="../man3/SSL_set_fd.html">SSL_set_fd(3)</a> or <a href="../man3/SSL_set_bio.html">SSL_set_bio(3)</a> can be used to associate the network connection with the object.</p>
  38. <p>When the TLS/SSL handshake is performed using <a href="../man3/SSL_accept.html">SSL_accept(3)</a> or <a href="../man3/SSL_connect.html">SSL_connect(3)</a> respectively. <a href="../man3/SSL_read_ex.html">SSL_read_ex(3)</a>, <a href="../man3/SSL_read.html">SSL_read(3)</a>, <a href="../man3/SSL_write_ex.html">SSL_write_ex(3)</a> and <a href="../man3/SSL_write.html">SSL_write(3)</a> are used to read and write data on the TLS/SSL connection. <a href="../man3/SSL_shutdown.html">SSL_shutdown(3)</a> can be used to shut down the TLS/SSL connection.</p>
  39. <h1 id="DATA-STRUCTURES">DATA STRUCTURES</h1>
  40. <p>Currently the OpenSSL <b>ssl</b> library functions deals with the following data structures:</p>
  41. <dl>
  42. <dt id="SSL_METHOD-SSL-Method"><b>SSL_METHOD</b> (SSL Method)</dt>
  43. <dd>
  44. <p>This is a dispatch structure describing the internal <b>ssl</b> library methods/functions which implement the various protocol versions (SSLv3 TLSv1, ...). It&#39;s needed to create an <b>SSL_CTX</b>.</p>
  45. </dd>
  46. <dt id="SSL_CIPHER-SSL-Cipher"><b>SSL_CIPHER</b> (SSL Cipher)</dt>
  47. <dd>
  48. <p>This structure holds the algorithm information for a particular cipher which are a core part of the SSL/TLS protocol. The available ciphers are configured on a <b>SSL_CTX</b> basis and the actual ones used are then part of the <b>SSL_SESSION</b>.</p>
  49. </dd>
  50. <dt id="SSL_CTX-SSL-Context"><b>SSL_CTX</b> (SSL Context)</dt>
  51. <dd>
  52. <p>This is the global context structure which is created by a server or client once per program life-time and which holds mainly default values for the <b>SSL</b> structures which are later created for the connections.</p>
  53. </dd>
  54. <dt id="SSL_SESSION-SSL-Session"><b>SSL_SESSION</b> (SSL Session)</dt>
  55. <dd>
  56. <p>This is a structure containing the current TLS/SSL session details for a connection: <b>SSL_CIPHER</b>s, client and server certificates, keys, etc.</p>
  57. </dd>
  58. <dt id="SSL-SSL-Connection"><b>SSL</b> (SSL Connection)</dt>
  59. <dd>
  60. <p>This is the main SSL/TLS structure which is created by a server or client per established connection. This actually is the core structure in the SSL API. At run-time the application usually deals with this structure which has links to mostly all other structures.</p>
  61. </dd>
  62. </dl>
  63. <h1 id="HEADER-FILES">HEADER FILES</h1>
  64. <p>Currently the OpenSSL <b>ssl</b> library provides the following C header files containing the prototypes for the data structures and functions:</p>
  65. <dl>
  66. <dt id="ssl.h"><b>ssl.h</b></dt>
  67. <dd>
  68. <p>This is the common header file for the SSL/TLS API. Include it into your program to make the API of the <b>ssl</b> library available. It internally includes both more private SSL headers and headers from the <b>crypto</b> library. Whenever you need hard-core details on the internals of the SSL API, look inside this header file.</p>
  69. </dd>
  70. <dt id="ssl2.h"><b>ssl2.h</b></dt>
  71. <dd>
  72. <p>Unused. Present for backwards compatibility only.</p>
  73. </dd>
  74. <dt id="ssl3.h"><b>ssl3.h</b></dt>
  75. <dd>
  76. <p>This is the sub header file dealing with the SSLv3 protocol only. <i>Usually you don&#39;t have to include it explicitly because it&#39;s already included by ssl.h</i>.</p>
  77. </dd>
  78. <dt id="tls1.h"><b>tls1.h</b></dt>
  79. <dd>
  80. <p>This is the sub header file dealing with the TLSv1 protocol only. <i>Usually you don&#39;t have to include it explicitly because it&#39;s already included by ssl.h</i>.</p>
  81. </dd>
  82. </dl>
  83. <h1 id="API-FUNCTIONS">API FUNCTIONS</h1>
  84. <p>Currently the OpenSSL <b>ssl</b> library exports 214 API functions. They are documented in the following:</p>
  85. <h2 id="Dealing-with-Protocol-Methods">Dealing with Protocol Methods</h2>
  86. <p>Here we document the various API functions which deal with the SSL/TLS protocol methods defined in <b>SSL_METHOD</b> structures.</p>
  87. <dl>
  88. <dt id="const-SSL_METHOD-TLS_method-void">const SSL_METHOD *<b>TLS_method</b>(void);</dt>
  89. <dd>
  90. <p>Constructor for the <i>version-flexible</i> SSL_METHOD structure for clients, servers or both. See <a href="../man3/SSL_CTX_new.html">SSL_CTX_new(3)</a> for details.</p>
  91. </dd>
  92. <dt id="const-SSL_METHOD-TLS_client_method-void">const SSL_METHOD *<b>TLS_client_method</b>(void);</dt>
  93. <dd>
  94. <p>Constructor for the <i>version-flexible</i> SSL_METHOD structure for clients. Must be used to support the TLSv1.3 protocol.</p>
  95. </dd>
  96. <dt id="const-SSL_METHOD-TLS_server_method-void">const SSL_METHOD *<b>TLS_server_method</b>(void);</dt>
  97. <dd>
  98. <p>Constructor for the <i>version-flexible</i> SSL_METHOD structure for servers. Must be used to support the TLSv1.3 protocol.</p>
  99. </dd>
  100. <dt id="const-SSL_METHOD-TLSv1_2_method-void">const SSL_METHOD *<b>TLSv1_2_method</b>(void);</dt>
  101. <dd>
  102. <p>Constructor for the TLSv1.2 SSL_METHOD structure for clients, servers or both.</p>
  103. </dd>
  104. <dt id="const-SSL_METHOD-TLSv1_2_client_method-void">const SSL_METHOD *<b>TLSv1_2_client_method</b>(void);</dt>
  105. <dd>
  106. <p>Constructor for the TLSv1.2 SSL_METHOD structure for clients.</p>
  107. </dd>
  108. <dt id="const-SSL_METHOD-TLSv1_2_server_method-void">const SSL_METHOD *<b>TLSv1_2_server_method</b>(void);</dt>
  109. <dd>
  110. <p>Constructor for the TLSv1.2 SSL_METHOD structure for servers.</p>
  111. </dd>
  112. <dt id="const-SSL_METHOD-TLSv1_1_method-void">const SSL_METHOD *<b>TLSv1_1_method</b>(void);</dt>
  113. <dd>
  114. <p>Constructor for the TLSv1.1 SSL_METHOD structure for clients, servers or both.</p>
  115. </dd>
  116. <dt id="const-SSL_METHOD-TLSv1_1_client_method-void">const SSL_METHOD *<b>TLSv1_1_client_method</b>(void);</dt>
  117. <dd>
  118. <p>Constructor for the TLSv1.1 SSL_METHOD structure for clients.</p>
  119. </dd>
  120. <dt id="const-SSL_METHOD-TLSv1_1_server_method-void">const SSL_METHOD *<b>TLSv1_1_server_method</b>(void);</dt>
  121. <dd>
  122. <p>Constructor for the TLSv1.1 SSL_METHOD structure for servers.</p>
  123. </dd>
  124. <dt id="const-SSL_METHOD-TLSv1_method-void">const SSL_METHOD *<b>TLSv1_method</b>(void);</dt>
  125. <dd>
  126. <p>Constructor for the TLSv1 SSL_METHOD structure for clients, servers or both.</p>
  127. </dd>
  128. <dt id="const-SSL_METHOD-TLSv1_client_method-void">const SSL_METHOD *<b>TLSv1_client_method</b>(void);</dt>
  129. <dd>
  130. <p>Constructor for the TLSv1 SSL_METHOD structure for clients.</p>
  131. </dd>
  132. <dt id="const-SSL_METHOD-TLSv1_server_method-void">const SSL_METHOD *<b>TLSv1_server_method</b>(void);</dt>
  133. <dd>
  134. <p>Constructor for the TLSv1 SSL_METHOD structure for servers.</p>
  135. </dd>
  136. <dt id="const-SSL_METHOD-SSLv3_method-void">const SSL_METHOD *<b>SSLv3_method</b>(void);</dt>
  137. <dd>
  138. <p>Constructor for the SSLv3 SSL_METHOD structure for clients, servers or both.</p>
  139. </dd>
  140. <dt id="const-SSL_METHOD-SSLv3_client_method-void">const SSL_METHOD *<b>SSLv3_client_method</b>(void);</dt>
  141. <dd>
  142. <p>Constructor for the SSLv3 SSL_METHOD structure for clients.</p>
  143. </dd>
  144. <dt id="const-SSL_METHOD-SSLv3_server_method-void">const SSL_METHOD *<b>SSLv3_server_method</b>(void);</dt>
  145. <dd>
  146. <p>Constructor for the SSLv3 SSL_METHOD structure for servers.</p>
  147. </dd>
  148. </dl>
  149. <h2 id="Dealing-with-Ciphers">Dealing with Ciphers</h2>
  150. <p>Here we document the various API functions which deal with the SSL/TLS ciphers defined in <b>SSL_CIPHER</b> structures.</p>
  151. <dl>
  152. <dt id="char-SSL_CIPHER_description-SSL_CIPHER-cipher-char-buf-int-len">char *<b>SSL_CIPHER_description</b>(SSL_CIPHER *cipher, char *buf, int len);</dt>
  153. <dd>
  154. <p>Write a string to <i>buf</i> (with a maximum size of <i>len</i>) containing a human readable description of <i>cipher</i>. Returns <i>buf</i>.</p>
  155. </dd>
  156. <dt id="int-SSL_CIPHER_get_bits-SSL_CIPHER-cipher-int-alg_bits">int <b>SSL_CIPHER_get_bits</b>(SSL_CIPHER *cipher, int *alg_bits);</dt>
  157. <dd>
  158. <p>Determine the number of bits in <i>cipher</i>. Because of export crippled ciphers there are two bits: The bits the algorithm supports in general (stored to <i>alg_bits</i>) and the bits which are actually used (the return value).</p>
  159. </dd>
  160. <dt id="const-char-SSL_CIPHER_get_name-SSL_CIPHER-cipher">const char *<b>SSL_CIPHER_get_name</b>(SSL_CIPHER *cipher);</dt>
  161. <dd>
  162. <p>Return the internal name of <i>cipher</i> as a string. These are the various strings defined by the <i>SSL3_TXT_xxx</i> and <i>TLS1_TXT_xxx</i> definitions in the header files.</p>
  163. </dd>
  164. <dt id="const-char-SSL_CIPHER_get_version-SSL_CIPHER-cipher">const char *<b>SSL_CIPHER_get_version</b>(SSL_CIPHER *cipher);</dt>
  165. <dd>
  166. <p>Returns a string like &quot;<code>SSLv3</code>&quot; or &quot;<code>TLSv1.2</code>&quot; which indicates the SSL/TLS protocol version to which <i>cipher</i> belongs (i.e. where it was defined in the specification the first time).</p>
  167. </dd>
  168. </dl>
  169. <h2 id="Dealing-with-Protocol-Contexts">Dealing with Protocol Contexts</h2>
  170. <p>Here we document the various API functions which deal with the SSL/TLS protocol context defined in the <b>SSL_CTX</b> structure.</p>
  171. <dl>
  172. <dt id="int-SSL_CTX_add_client_CA-SSL_CTX-ctx-X509-x">int <b>SSL_CTX_add_client_CA</b>(SSL_CTX *ctx, X509 *x);</dt>
  173. <dd>
  174. </dd>
  175. <dt id="long-SSL_CTX_add_extra_chain_cert-SSL_CTX-ctx-X509-x509">long <b>SSL_CTX_add_extra_chain_cert</b>(SSL_CTX *ctx, X509 *x509);</dt>
  176. <dd>
  177. </dd>
  178. <dt id="int-SSL_CTX_add_session-SSL_CTX-ctx-SSL_SESSION-c">int <b>SSL_CTX_add_session</b>(SSL_CTX *ctx, SSL_SESSION *c);</dt>
  179. <dd>
  180. </dd>
  181. <dt id="int-SSL_CTX_check_private_key-const-SSL_CTX-ctx">int <b>SSL_CTX_check_private_key</b>(const SSL_CTX *ctx);</dt>
  182. <dd>
  183. </dd>
  184. <dt id="long-SSL_CTX_ctrl-SSL_CTX-ctx-int-cmd-long-larg-char-parg">long <b>SSL_CTX_ctrl</b>(SSL_CTX *ctx, int cmd, long larg, char *parg);</dt>
  185. <dd>
  186. </dd>
  187. <dt id="void-SSL_CTX_flush_sessions-SSL_CTX-s-long-t">void <b>SSL_CTX_flush_sessions</b>(SSL_CTX *s, long t);</dt>
  188. <dd>
  189. </dd>
  190. <dt id="void-SSL_CTX_free-SSL_CTX-a">void <b>SSL_CTX_free</b>(SSL_CTX *a);</dt>
  191. <dd>
  192. </dd>
  193. <dt id="char-SSL_CTX_get_app_data-SSL_CTX-ctx">char *<b>SSL_CTX_get_app_data</b>(SSL_CTX *ctx);</dt>
  194. <dd>
  195. </dd>
  196. <dt id="X509_STORE-SSL_CTX_get_cert_store-SSL_CTX-ctx">X509_STORE *<b>SSL_CTX_get_cert_store</b>(SSL_CTX *ctx);</dt>
  197. <dd>
  198. </dd>
  199. <dt id="STACK-SSL_CTX_get_ciphers-const-SSL_CTX-ctx">STACK *<b>SSL_CTX_get_ciphers</b>(const SSL_CTX *ctx);</dt>
  200. <dd>
  201. </dd>
  202. <dt id="STACK-SSL_CTX_get_client_CA_list-const-SSL_CTX-ctx">STACK *<b>SSL_CTX_get_client_CA_list</b>(const SSL_CTX *ctx);</dt>
  203. <dd>
  204. </dd>
  205. <dt id="int-SSL_CTX_get_client_cert_cb-SSL_CTX-ctx-SSL-ssl-X509-x509-EVP_PKEY-pkey">int (*<b>SSL_CTX_get_client_cert_cb</b>(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey);</dt>
  206. <dd>
  207. </dd>
  208. <dt id="void-SSL_CTX_get_default_read_ahead-SSL_CTX-ctx">void <b>SSL_CTX_get_default_read_ahead</b>(SSL_CTX *ctx);</dt>
  209. <dd>
  210. </dd>
  211. <dt id="char-SSL_CTX_get_ex_data-const-SSL_CTX-s-int-idx">char *<b>SSL_CTX_get_ex_data</b>(const SSL_CTX *s, int idx);</dt>
  212. <dd>
  213. </dd>
  214. <dt id="int-SSL_CTX_get_ex_new_index-long-argl-char-argp-int-new_func-void-int-dup_func-void-void-free_func-void">int <b>SSL_CTX_get_ex_new_index</b>(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))</dt>
  215. <dd>
  216. </dd>
  217. <dt id="void-SSL_CTX_get_info_callback-SSL_CTX-ctx-SSL-ssl-int-cb-int-ret">void (*<b>SSL_CTX_get_info_callback</b>(SSL_CTX *ctx))(SSL *ssl, int cb, int ret);</dt>
  218. <dd>
  219. </dd>
  220. <dt id="int-SSL_CTX_get_quiet_shutdown-const-SSL_CTX-ctx">int <b>SSL_CTX_get_quiet_shutdown</b>(const SSL_CTX *ctx);</dt>
  221. <dd>
  222. </dd>
  223. <dt id="void-SSL_CTX_get_read_ahead-SSL_CTX-ctx">void <b>SSL_CTX_get_read_ahead</b>(SSL_CTX *ctx);</dt>
  224. <dd>
  225. </dd>
  226. <dt id="int-SSL_CTX_get_session_cache_mode-SSL_CTX-ctx">int <b>SSL_CTX_get_session_cache_mode</b>(SSL_CTX *ctx);</dt>
  227. <dd>
  228. </dd>
  229. <dt id="long-SSL_CTX_get_timeout-const-SSL_CTX-ctx">long <b>SSL_CTX_get_timeout</b>(const SSL_CTX *ctx);</dt>
  230. <dd>
  231. </dd>
  232. <dt id="int-SSL_CTX_get_verify_callback-const-SSL_CTX-ctx-int-ok-X509_STORE_CTX-ctx">int (*<b>SSL_CTX_get_verify_callback</b>(const SSL_CTX *ctx))(int ok, X509_STORE_CTX *ctx);</dt>
  233. <dd>
  234. </dd>
  235. <dt id="int-SSL_CTX_get_verify_mode-SSL_CTX-ctx">int <b>SSL_CTX_get_verify_mode</b>(SSL_CTX *ctx);</dt>
  236. <dd>
  237. </dd>
  238. <dt id="int-SSL_CTX_load_verify_locations-SSL_CTX-ctx-const-char-CAfile-const-char-CApath">int <b>SSL_CTX_load_verify_locations</b>(SSL_CTX *ctx, const char *CAfile, const char *CApath);</dt>
  239. <dd>
  240. </dd>
  241. <dt id="SSL_CTX-SSL_CTX_new-const-SSL_METHOD-meth">SSL_CTX *<b>SSL_CTX_new</b>(const SSL_METHOD *meth);</dt>
  242. <dd>
  243. </dd>
  244. <dt id="int-SSL_CTX_up_ref-SSL_CTX-ctx">int SSL_CTX_up_ref(SSL_CTX *ctx);</dt>
  245. <dd>
  246. </dd>
  247. <dt id="int-SSL_CTX_remove_session-SSL_CTX-ctx-SSL_SESSION-c">int <b>SSL_CTX_remove_session</b>(SSL_CTX *ctx, SSL_SESSION *c);</dt>
  248. <dd>
  249. </dd>
  250. <dt id="int-SSL_CTX_sess_accept-SSL_CTX-ctx">int <b>SSL_CTX_sess_accept</b>(SSL_CTX *ctx);</dt>
  251. <dd>
  252. </dd>
  253. <dt id="int-SSL_CTX_sess_accept_good-SSL_CTX-ctx">int <b>SSL_CTX_sess_accept_good</b>(SSL_CTX *ctx);</dt>
  254. <dd>
  255. </dd>
  256. <dt id="int-SSL_CTX_sess_accept_renegotiate-SSL_CTX-ctx">int <b>SSL_CTX_sess_accept_renegotiate</b>(SSL_CTX *ctx);</dt>
  257. <dd>
  258. </dd>
  259. <dt id="int-SSL_CTX_sess_cache_full-SSL_CTX-ctx">int <b>SSL_CTX_sess_cache_full</b>(SSL_CTX *ctx);</dt>
  260. <dd>
  261. </dd>
  262. <dt id="int-SSL_CTX_sess_cb_hits-SSL_CTX-ctx">int <b>SSL_CTX_sess_cb_hits</b>(SSL_CTX *ctx);</dt>
  263. <dd>
  264. </dd>
  265. <dt id="int-SSL_CTX_sess_connect-SSL_CTX-ctx">int <b>SSL_CTX_sess_connect</b>(SSL_CTX *ctx);</dt>
  266. <dd>
  267. </dd>
  268. <dt id="int-SSL_CTX_sess_connect_good-SSL_CTX-ctx">int <b>SSL_CTX_sess_connect_good</b>(SSL_CTX *ctx);</dt>
  269. <dd>
  270. </dd>
  271. <dt id="int-SSL_CTX_sess_connect_renegotiate-SSL_CTX-ctx">int <b>SSL_CTX_sess_connect_renegotiate</b>(SSL_CTX *ctx);</dt>
  272. <dd>
  273. </dd>
  274. <dt id="int-SSL_CTX_sess_get_cache_size-SSL_CTX-ctx">int <b>SSL_CTX_sess_get_cache_size</b>(SSL_CTX *ctx);</dt>
  275. <dd>
  276. </dd>
  277. <dt id="SSL_SESSION-SSL_CTX_sess_get_get_cb-SSL_CTX-ctx-SSL-ssl-unsigned-char-data-int-len-int-copy">SSL_SESSION *(*<b>SSL_CTX_sess_get_get_cb</b>(SSL_CTX *ctx))(SSL *ssl, unsigned char *data, int len, int *copy);</dt>
  278. <dd>
  279. </dd>
  280. <dt id="int-SSL_CTX_sess_get_new_cb-SSL_CTX-ctx-SSL-ssl-SSL_SESSION-sess">int (*<b>SSL_CTX_sess_get_new_cb</b>(SSL_CTX *ctx)(SSL *ssl, SSL_SESSION *sess);</dt>
  281. <dd>
  282. </dd>
  283. <dt id="void-SSL_CTX_sess_get_remove_cb-SSL_CTX-ctx-SSL_CTX-ctx-SSL_SESSION-sess">void (*<b>SSL_CTX_sess_get_remove_cb</b>(SSL_CTX *ctx)(SSL_CTX *ctx, SSL_SESSION *sess);</dt>
  284. <dd>
  285. </dd>
  286. <dt id="int-SSL_CTX_sess_hits-SSL_CTX-ctx">int <b>SSL_CTX_sess_hits</b>(SSL_CTX *ctx);</dt>
  287. <dd>
  288. </dd>
  289. <dt id="int-SSL_CTX_sess_misses-SSL_CTX-ctx">int <b>SSL_CTX_sess_misses</b>(SSL_CTX *ctx);</dt>
  290. <dd>
  291. </dd>
  292. <dt id="int-SSL_CTX_sess_number-SSL_CTX-ctx">int <b>SSL_CTX_sess_number</b>(SSL_CTX *ctx);</dt>
  293. <dd>
  294. </dd>
  295. <dt id="void-SSL_CTX_sess_set_cache_size-SSL_CTX-ctx-t">void <b>SSL_CTX_sess_set_cache_size</b>(SSL_CTX *ctx, t);</dt>
  296. <dd>
  297. </dd>
  298. <dt id="void-SSL_CTX_sess_set_get_cb-SSL_CTX-ctx-SSL_SESSION-cb-SSL-ssl-unsigned-char-data-int-len-int-copy">void <b>SSL_CTX_sess_set_get_cb</b>(SSL_CTX *ctx, SSL_SESSION *(*cb)(SSL *ssl, unsigned char *data, int len, int *copy));</dt>
  299. <dd>
  300. </dd>
  301. <dt id="void-SSL_CTX_sess_set_new_cb-SSL_CTX-ctx-int-cb-SSL-ssl-SSL_SESSION-sess">void <b>SSL_CTX_sess_set_new_cb</b>(SSL_CTX *ctx, int (*cb)(SSL *ssl, SSL_SESSION *sess));</dt>
  302. <dd>
  303. </dd>
  304. <dt id="void-SSL_CTX_sess_set_remove_cb-SSL_CTX-ctx-void-cb-SSL_CTX-ctx-SSL_SESSION-sess">void <b>SSL_CTX_sess_set_remove_cb</b>(SSL_CTX *ctx, void (*cb)(SSL_CTX *ctx, SSL_SESSION *sess));</dt>
  305. <dd>
  306. </dd>
  307. <dt id="int-SSL_CTX_sess_timeouts-SSL_CTX-ctx">int <b>SSL_CTX_sess_timeouts</b>(SSL_CTX *ctx);</dt>
  308. <dd>
  309. </dd>
  310. <dt id="LHASH-SSL_CTX_sessions-SSL_CTX-ctx">LHASH *<b>SSL_CTX_sessions</b>(SSL_CTX *ctx);</dt>
  311. <dd>
  312. </dd>
  313. <dt id="int-SSL_CTX_set_app_data-SSL_CTX-ctx-void-arg">int <b>SSL_CTX_set_app_data</b>(SSL_CTX *ctx, void *arg);</dt>
  314. <dd>
  315. </dd>
  316. <dt id="void-SSL_CTX_set_cert_store-SSL_CTX-ctx-X509_STORE-cs">void <b>SSL_CTX_set_cert_store</b>(SSL_CTX *ctx, X509_STORE *cs);</dt>
  317. <dd>
  318. </dd>
  319. <dt id="void-SSL_CTX_set1_cert_store-SSL_CTX-ctx-X509_STORE-cs">void <b>SSL_CTX_set1_cert_store</b>(SSL_CTX *ctx, X509_STORE *cs);</dt>
  320. <dd>
  321. </dd>
  322. <dt id="void-SSL_CTX_set_cert_verify_cb-SSL_CTX-ctx-int-cb-char-arg">void <b>SSL_CTX_set_cert_verify_cb</b>(SSL_CTX *ctx, int (*cb)(), char *arg)</dt>
  323. <dd>
  324. </dd>
  325. <dt id="int-SSL_CTX_set_cipher_list-SSL_CTX-ctx-char-str">int <b>SSL_CTX_set_cipher_list</b>(SSL_CTX *ctx, char *str);</dt>
  326. <dd>
  327. </dd>
  328. <dt id="void-SSL_CTX_set_client_CA_list-SSL_CTX-ctx-STACK-list">void <b>SSL_CTX_set_client_CA_list</b>(SSL_CTX *ctx, STACK *list);</dt>
  329. <dd>
  330. </dd>
  331. <dt id="void-SSL_CTX_set_client_cert_cb-SSL_CTX-ctx-int-cb-SSL-ssl-X509-x509-EVP_PKEY-pkey">void <b>SSL_CTX_set_client_cert_cb</b>(SSL_CTX *ctx, int (*cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));</dt>
  332. <dd>
  333. </dd>
  334. <dt id="int-SSL_CTX_set_ct_validation_callback-SSL_CTX-ctx-ssl_ct_validation_cb-callback-void-arg">int <b>SSL_CTX_set_ct_validation_callback</b>(SSL_CTX *ctx, ssl_ct_validation_cb callback, void *arg);</dt>
  335. <dd>
  336. </dd>
  337. <dt id="void-SSL_CTX_set_default_passwd_cb-SSL_CTX-ctx-int-cb-void">void <b>SSL_CTX_set_default_passwd_cb</b>(SSL_CTX *ctx, int (*cb);(void))</dt>
  338. <dd>
  339. </dd>
  340. <dt id="void-SSL_CTX_set_default_read_ahead-SSL_CTX-ctx-int-m">void <b>SSL_CTX_set_default_read_ahead</b>(SSL_CTX *ctx, int m);</dt>
  341. <dd>
  342. </dd>
  343. <dt id="int-SSL_CTX_set_default_verify_paths-SSL_CTX-ctx">int <b>SSL_CTX_set_default_verify_paths</b>(SSL_CTX *ctx);</dt>
  344. <dd>
  345. <p>Use the default paths to locate trusted CA certificates. There is one default directory path and one default file path. Both are set via this call.</p>
  346. </dd>
  347. <dt id="int-SSL_CTX_set_default_verify_dir-SSL_CTX-ctx">int <b>SSL_CTX_set_default_verify_dir</b>(SSL_CTX *ctx)</dt>
  348. <dd>
  349. <p>Use the default directory path to locate trusted CA certificates.</p>
  350. </dd>
  351. <dt id="int-SSL_CTX_set_default_verify_file-SSL_CTX-ctx">int <b>SSL_CTX_set_default_verify_file</b>(SSL_CTX *ctx)</dt>
  352. <dd>
  353. <p>Use the file path to locate trusted CA certificates.</p>
  354. </dd>
  355. <dt id="int-SSL_CTX_set_ex_data-SSL_CTX-s-int-idx-char-arg">int <b>SSL_CTX_set_ex_data</b>(SSL_CTX *s, int idx, char *arg);</dt>
  356. <dd>
  357. </dd>
  358. <dt id="void-SSL_CTX_set_info_callback-SSL_CTX-ctx-void-cb-SSL-ssl-int-cb-int-ret">void <b>SSL_CTX_set_info_callback</b>(SSL_CTX *ctx, void (*cb)(SSL *ssl, int cb, int ret));</dt>
  359. <dd>
  360. </dd>
  361. <dt id="void-SSL_CTX_set_msg_callback-SSL_CTX-ctx-void-cb-int-write_p-int-version-int-content_type-const-void-buf-size_t-len-SSL-ssl-void-arg">void <b>SSL_CTX_set_msg_callback</b>(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));</dt>
  362. <dd>
  363. </dd>
  364. <dt id="void-SSL_CTX_set_msg_callback_arg-SSL_CTX-ctx-void-arg">void <b>SSL_CTX_set_msg_callback_arg</b>(SSL_CTX *ctx, void *arg);</dt>
  365. <dd>
  366. </dd>
  367. <dt id="unsigned-long-SSL_CTX_clear_options-SSL_CTX-ctx-unsigned-long-op">unsigned long <b>SSL_CTX_clear_options</b>(SSL_CTX *ctx, unsigned long op);</dt>
  368. <dd>
  369. </dd>
  370. <dt id="unsigned-long-SSL_CTX_get_options-SSL_CTX-ctx">unsigned long <b>SSL_CTX_get_options</b>(SSL_CTX *ctx);</dt>
  371. <dd>
  372. </dd>
  373. <dt id="unsigned-long-SSL_CTX_set_options-SSL_CTX-ctx-unsigned-long-op">unsigned long <b>SSL_CTX_set_options</b>(SSL_CTX *ctx, unsigned long op);</dt>
  374. <dd>
  375. </dd>
  376. <dt id="void-SSL_CTX_set_quiet_shutdown-SSL_CTX-ctx-int-mode">void <b>SSL_CTX_set_quiet_shutdown</b>(SSL_CTX *ctx, int mode);</dt>
  377. <dd>
  378. </dd>
  379. <dt id="void-SSL_CTX_set_read_ahead-SSL_CTX-ctx-int-m">void <b>SSL_CTX_set_read_ahead</b>(SSL_CTX *ctx, int m);</dt>
  380. <dd>
  381. </dd>
  382. <dt id="void-SSL_CTX_set_session_cache_mode-SSL_CTX-ctx-int-mode">void <b>SSL_CTX_set_session_cache_mode</b>(SSL_CTX *ctx, int mode);</dt>
  383. <dd>
  384. </dd>
  385. <dt id="int-SSL_CTX_set_ssl_version-SSL_CTX-ctx-const-SSL_METHOD-meth">int <b>SSL_CTX_set_ssl_version</b>(SSL_CTX *ctx, const SSL_METHOD *meth);</dt>
  386. <dd>
  387. </dd>
  388. <dt id="void-SSL_CTX_set_timeout-SSL_CTX-ctx-long-t">void <b>SSL_CTX_set_timeout</b>(SSL_CTX *ctx, long t);</dt>
  389. <dd>
  390. </dd>
  391. <dt id="long-SSL_CTX_set_tmp_dh-SSL_CTX-ctx-DH-dh">long <b>SSL_CTX_set_tmp_dh</b>(SSL_CTX* ctx, DH *dh);</dt>
  392. <dd>
  393. </dd>
  394. <dt id="long-SSL_CTX_set_tmp_dh_callback-SSL_CTX-ctx-DH-cb-void">long <b>SSL_CTX_set_tmp_dh_callback</b>(SSL_CTX *ctx, DH *(*cb)(void));</dt>
  395. <dd>
  396. </dd>
  397. <dt id="void-SSL_CTX_set_verify-SSL_CTX-ctx-int-mode-int-cb-void">void <b>SSL_CTX_set_verify</b>(SSL_CTX *ctx, int mode, int (*cb);(void))</dt>
  398. <dd>
  399. </dd>
  400. <dt id="int-SSL_CTX_use_PrivateKey-SSL_CTX-ctx-EVP_PKEY-pkey">int <b>SSL_CTX_use_PrivateKey</b>(SSL_CTX *ctx, EVP_PKEY *pkey);</dt>
  401. <dd>
  402. </dd>
  403. <dt id="int-SSL_CTX_use_PrivateKey_ASN1-int-type-SSL_CTX-ctx-unsigned-char-d-long-len">int <b>SSL_CTX_use_PrivateKey_ASN1</b>(int type, SSL_CTX *ctx, unsigned char *d, long len);</dt>
  404. <dd>
  405. </dd>
  406. <dt id="int-SSL_CTX_use_PrivateKey_file-SSL_CTX-ctx-const-char-file-int-type">int <b>SSL_CTX_use_PrivateKey_file</b>(SSL_CTX *ctx, const char *file, int type);</dt>
  407. <dd>
  408. </dd>
  409. <dt id="int-SSL_CTX_use_RSAPrivateKey-SSL_CTX-ctx-RSA-rsa">int <b>SSL_CTX_use_RSAPrivateKey</b>(SSL_CTX *ctx, RSA *rsa);</dt>
  410. <dd>
  411. </dd>
  412. <dt id="int-SSL_CTX_use_RSAPrivateKey_ASN1-SSL_CTX-ctx-unsigned-char-d-long-len">int <b>SSL_CTX_use_RSAPrivateKey_ASN1</b>(SSL_CTX *ctx, unsigned char *d, long len);</dt>
  413. <dd>
  414. </dd>
  415. <dt id="int-SSL_CTX_use_RSAPrivateKey_file-SSL_CTX-ctx-const-char-file-int-type">int <b>SSL_CTX_use_RSAPrivateKey_file</b>(SSL_CTX *ctx, const char *file, int type);</dt>
  416. <dd>
  417. </dd>
  418. <dt id="int-SSL_CTX_use_certificate-SSL_CTX-ctx-X509-x">int <b>SSL_CTX_use_certificate</b>(SSL_CTX *ctx, X509 *x);</dt>
  419. <dd>
  420. </dd>
  421. <dt id="int-SSL_CTX_use_certificate_ASN1-SSL_CTX-ctx-int-len-unsigned-char-d">int <b>SSL_CTX_use_certificate_ASN1</b>(SSL_CTX *ctx, int len, unsigned char *d);</dt>
  422. <dd>
  423. </dd>
  424. <dt id="int-SSL_CTX_use_certificate_file-SSL_CTX-ctx-const-char-file-int-type">int <b>SSL_CTX_use_certificate_file</b>(SSL_CTX *ctx, const char *file, int type);</dt>
  425. <dd>
  426. </dd>
  427. <dt id="int-SSL_CTX_use_cert_and_key-SSL_CTX-ctx-X509-x-EVP_PKEY-pkey-STACK_OF-X509-chain-int-override">int <b>SSL_CTX_use_cert_and_key</b>(SSL_CTX *ctx, X509 *x, EVP_PKEY *pkey, STACK_OF(X509) *chain, int override);</dt>
  428. <dd>
  429. </dd>
  430. <dt id="X509-SSL_CTX_get0_certificate-const-SSL_CTX-ctx">X509 *<b>SSL_CTX_get0_certificate</b>(const SSL_CTX *ctx);</dt>
  431. <dd>
  432. </dd>
  433. <dt id="EVP_PKEY-SSL_CTX_get0_privatekey-const-SSL_CTX-ctx">EVP_PKEY *<b>SSL_CTX_get0_privatekey</b>(const SSL_CTX *ctx);</dt>
  434. <dd>
  435. </dd>
  436. <dt id="void-SSL_CTX_set_psk_client_callback-SSL_CTX-ctx-unsigned-int-callback-SSL-ssl-const-char-hint-char-identity-unsigned-int-max_identity_len-unsigned-char-psk-unsigned-int-max_psk_len">void <b>SSL_CTX_set_psk_client_callback</b>(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len));</dt>
  437. <dd>
  438. </dd>
  439. <dt id="int-SSL_CTX_use_psk_identity_hint-SSL_CTX-ctx-const-char-hint">int <b>SSL_CTX_use_psk_identity_hint</b>(SSL_CTX *ctx, const char *hint);</dt>
  440. <dd>
  441. </dd>
  442. <dt id="void-SSL_CTX_set_psk_server_callback-SSL_CTX-ctx-unsigned-int-callback-SSL-ssl-const-char-identity-unsigned-char-psk-int-max_psk_len">void <b>SSL_CTX_set_psk_server_callback</b>(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len));</dt>
  443. <dd>
  444. </dd>
  445. </dl>
  446. <h2 id="Dealing-with-Sessions">Dealing with Sessions</h2>
  447. <p>Here we document the various API functions which deal with the SSL/TLS sessions defined in the <b>SSL_SESSION</b> structures.</p>
  448. <dl>
  449. <dt id="int-SSL_SESSION_cmp-const-SSL_SESSION-a-const-SSL_SESSION-b">int <b>SSL_SESSION_cmp</b>(const SSL_SESSION *a, const SSL_SESSION *b);</dt>
  450. <dd>
  451. </dd>
  452. <dt id="void-SSL_SESSION_free-SSL_SESSION-ss">void <b>SSL_SESSION_free</b>(SSL_SESSION *ss);</dt>
  453. <dd>
  454. </dd>
  455. <dt id="char-SSL_SESSION_get_app_data-SSL_SESSION-s">char *<b>SSL_SESSION_get_app_data</b>(SSL_SESSION *s);</dt>
  456. <dd>
  457. </dd>
  458. <dt id="char-SSL_SESSION_get_ex_data-const-SSL_SESSION-s-int-idx">char *<b>SSL_SESSION_get_ex_data</b>(const SSL_SESSION *s, int idx);</dt>
  459. <dd>
  460. </dd>
  461. <dt id="int-SSL_SESSION_get_ex_new_index-long-argl-char-argp-int-new_func-void-int-dup_func-void-void-free_func-void">int <b>SSL_SESSION_get_ex_new_index</b>(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))</dt>
  462. <dd>
  463. </dd>
  464. <dt id="long-SSL_SESSION_get_time-const-SSL_SESSION-s">long <b>SSL_SESSION_get_time</b>(const SSL_SESSION *s);</dt>
  465. <dd>
  466. </dd>
  467. <dt id="long-SSL_SESSION_get_timeout-const-SSL_SESSION-s">long <b>SSL_SESSION_get_timeout</b>(const SSL_SESSION *s);</dt>
  468. <dd>
  469. </dd>
  470. <dt id="unsigned-long-SSL_SESSION_hash-const-SSL_SESSION-a">unsigned long <b>SSL_SESSION_hash</b>(const SSL_SESSION *a);</dt>
  471. <dd>
  472. </dd>
  473. <dt id="SSL_SESSION-SSL_SESSION_new-void">SSL_SESSION *<b>SSL_SESSION_new</b>(void);</dt>
  474. <dd>
  475. </dd>
  476. <dt id="int-SSL_SESSION_print-BIO-bp-const-SSL_SESSION-x">int <b>SSL_SESSION_print</b>(BIO *bp, const SSL_SESSION *x);</dt>
  477. <dd>
  478. </dd>
  479. <dt id="int-SSL_SESSION_print_fp-FILE-fp-const-SSL_SESSION-x">int <b>SSL_SESSION_print_fp</b>(FILE *fp, const SSL_SESSION *x);</dt>
  480. <dd>
  481. </dd>
  482. <dt id="int-SSL_SESSION_set_app_data-SSL_SESSION-s-char-a">int <b>SSL_SESSION_set_app_data</b>(SSL_SESSION *s, char *a);</dt>
  483. <dd>
  484. </dd>
  485. <dt id="int-SSL_SESSION_set_ex_data-SSL_SESSION-s-int-idx-char-arg">int <b>SSL_SESSION_set_ex_data</b>(SSL_SESSION *s, int idx, char *arg);</dt>
  486. <dd>
  487. </dd>
  488. <dt id="long-SSL_SESSION_set_time-SSL_SESSION-s-long-t">long <b>SSL_SESSION_set_time</b>(SSL_SESSION *s, long t);</dt>
  489. <dd>
  490. </dd>
  491. <dt id="long-SSL_SESSION_set_timeout-SSL_SESSION-s-long-t">long <b>SSL_SESSION_set_timeout</b>(SSL_SESSION *s, long t);</dt>
  492. <dd>
  493. </dd>
  494. </dl>
  495. <h2 id="Dealing-with-Connections">Dealing with Connections</h2>
  496. <p>Here we document the various API functions which deal with the SSL/TLS connection defined in the <b>SSL</b> structure.</p>
  497. <dl>
  498. <dt id="int-SSL_accept-SSL-ssl">int <b>SSL_accept</b>(SSL *ssl);</dt>
  499. <dd>
  500. </dd>
  501. <dt id="int-SSL_add_dir_cert_subjects_to_stack-STACK-stack-const-char-dir">int <b>SSL_add_dir_cert_subjects_to_stack</b>(STACK *stack, const char *dir);</dt>
  502. <dd>
  503. </dd>
  504. <dt id="int-SSL_add_file_cert_subjects_to_stack-STACK-stack-const-char-file">int <b>SSL_add_file_cert_subjects_to_stack</b>(STACK *stack, const char *file);</dt>
  505. <dd>
  506. </dd>
  507. <dt id="int-SSL_add_client_CA-SSL-ssl-X509-x">int <b>SSL_add_client_CA</b>(SSL *ssl, X509 *x);</dt>
  508. <dd>
  509. </dd>
  510. <dt id="char-SSL_alert_desc_string-int-value">char *<b>SSL_alert_desc_string</b>(int value);</dt>
  511. <dd>
  512. </dd>
  513. <dt id="char-SSL_alert_desc_string_long-int-value">char *<b>SSL_alert_desc_string_long</b>(int value);</dt>
  514. <dd>
  515. </dd>
  516. <dt id="char-SSL_alert_type_string-int-value">char *<b>SSL_alert_type_string</b>(int value);</dt>
  517. <dd>
  518. </dd>
  519. <dt id="char-SSL_alert_type_string_long-int-value">char *<b>SSL_alert_type_string_long</b>(int value);</dt>
  520. <dd>
  521. </dd>
  522. <dt id="int-SSL_check_private_key-const-SSL-ssl">int <b>SSL_check_private_key</b>(const SSL *ssl);</dt>
  523. <dd>
  524. </dd>
  525. <dt id="void-SSL_clear-SSL-ssl">void <b>SSL_clear</b>(SSL *ssl);</dt>
  526. <dd>
  527. </dd>
  528. <dt id="long-SSL_clear_num_renegotiations-SSL-ssl">long <b>SSL_clear_num_renegotiations</b>(SSL *ssl);</dt>
  529. <dd>
  530. </dd>
  531. <dt id="int-SSL_connect-SSL-ssl">int <b>SSL_connect</b>(SSL *ssl);</dt>
  532. <dd>
  533. </dd>
  534. <dt id="int-SSL_copy_session_id-SSL-t-const-SSL-f">int <b>SSL_copy_session_id</b>(SSL *t, const SSL *f);</dt>
  535. <dd>
  536. <p>Sets the session details for <b>t</b> to be the same as in <b>f</b>. Returns 1 on success or 0 on failure.</p>
  537. </dd>
  538. <dt id="long-SSL_ctrl-SSL-ssl-int-cmd-long-larg-char-parg">long <b>SSL_ctrl</b>(SSL *ssl, int cmd, long larg, char *parg);</dt>
  539. <dd>
  540. </dd>
  541. <dt id="int-SSL_do_handshake-SSL-ssl">int <b>SSL_do_handshake</b>(SSL *ssl);</dt>
  542. <dd>
  543. </dd>
  544. <dt id="SSL-SSL_dup-SSL-ssl">SSL *<b>SSL_dup</b>(SSL *ssl);</dt>
  545. <dd>
  546. <p>SSL_dup() allows applications to configure an SSL handle for use in multiple SSL connections, and then duplicate it prior to initiating each connection with the duplicated handle. Use of SSL_dup() avoids the need to repeat the configuration of the handles for each connection.</p>
  547. <p>For SSL_dup() to work, the connection MUST be in its initial state and MUST NOT have not yet have started the SSL handshake. For connections that are not in their initial state SSL_dup() just increments an internal reference count and returns the <i>same</i> handle. It may be possible to use <a href="../man3/SSL_clear.html">SSL_clear(3)</a> to recycle an SSL handle that is not in its initial state for re-use, but this is best avoided. Instead, save and restore the session, if desired, and construct a fresh handle for each connection.</p>
  548. </dd>
  549. <dt id="STACK-SSL_dup_CA_list-STACK-sk">STACK *<b>SSL_dup_CA_list</b>(STACK *sk);</dt>
  550. <dd>
  551. </dd>
  552. <dt id="void-SSL_free-SSL-ssl">void <b>SSL_free</b>(SSL *ssl);</dt>
  553. <dd>
  554. </dd>
  555. <dt id="SSL_CTX-SSL_get_SSL_CTX-const-SSL-ssl">SSL_CTX *<b>SSL_get_SSL_CTX</b>(const SSL *ssl);</dt>
  556. <dd>
  557. </dd>
  558. <dt id="char-SSL_get_app_data-SSL-ssl">char *<b>SSL_get_app_data</b>(SSL *ssl);</dt>
  559. <dd>
  560. </dd>
  561. <dt id="X509-SSL_get_certificate-const-SSL-ssl">X509 *<b>SSL_get_certificate</b>(const SSL *ssl);</dt>
  562. <dd>
  563. </dd>
  564. <dt id="const-char-SSL_get_cipher-const-SSL-ssl">const char *<b>SSL_get_cipher</b>(const SSL *ssl);</dt>
  565. <dd>
  566. </dd>
  567. <dt id="int-SSL_is_dtls-const-SSL-ssl">int <b>SSL_is_dtls</b>(const SSL *ssl);</dt>
  568. <dd>
  569. </dd>
  570. <dt id="int-SSL_get_cipher_bits-const-SSL-ssl-int-alg_bits">int <b>SSL_get_cipher_bits</b>(const SSL *ssl, int *alg_bits);</dt>
  571. <dd>
  572. </dd>
  573. <dt id="char-SSL_get_cipher_list-const-SSL-ssl-int-n">char *<b>SSL_get_cipher_list</b>(const SSL *ssl, int n);</dt>
  574. <dd>
  575. </dd>
  576. <dt id="char-SSL_get_cipher_name-const-SSL-ssl">char *<b>SSL_get_cipher_name</b>(const SSL *ssl);</dt>
  577. <dd>
  578. </dd>
  579. <dt id="char-SSL_get_cipher_version-const-SSL-ssl">char *<b>SSL_get_cipher_version</b>(const SSL *ssl);</dt>
  580. <dd>
  581. </dd>
  582. <dt id="STACK-SSL_get_ciphers-const-SSL-ssl">STACK *<b>SSL_get_ciphers</b>(const SSL *ssl);</dt>
  583. <dd>
  584. </dd>
  585. <dt id="STACK-SSL_get_client_CA_list-const-SSL-ssl">STACK *<b>SSL_get_client_CA_list</b>(const SSL *ssl);</dt>
  586. <dd>
  587. </dd>
  588. <dt id="SSL_CIPHER-SSL_get_current_cipher-SSL-ssl">SSL_CIPHER *<b>SSL_get_current_cipher</b>(SSL *ssl);</dt>
  589. <dd>
  590. </dd>
  591. <dt id="long-SSL_get_default_timeout-const-SSL-ssl">long <b>SSL_get_default_timeout</b>(const SSL *ssl);</dt>
  592. <dd>
  593. </dd>
  594. <dt id="int-SSL_get_error-const-SSL-ssl-int-i">int <b>SSL_get_error</b>(const SSL *ssl, int i);</dt>
  595. <dd>
  596. </dd>
  597. <dt id="char-SSL_get_ex_data-const-SSL-ssl-int-idx">char *<b>SSL_get_ex_data</b>(const SSL *ssl, int idx);</dt>
  598. <dd>
  599. </dd>
  600. <dt id="int-SSL_get_ex_data_X509_STORE_CTX_idx-void">int <b>SSL_get_ex_data_X509_STORE_CTX_idx</b>(void);</dt>
  601. <dd>
  602. </dd>
  603. <dt id="int-SSL_get_ex_new_index-long-argl-char-argp-int-new_func-void-int-dup_func-void-void-free_func-void">int <b>SSL_get_ex_new_index</b>(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))</dt>
  604. <dd>
  605. </dd>
  606. <dt id="int-SSL_get_fd-const-SSL-ssl">int <b>SSL_get_fd</b>(const SSL *ssl);</dt>
  607. <dd>
  608. </dd>
  609. <dt id="void-SSL_get_info_callback-const-SSL-ssl">void (*<b>SSL_get_info_callback</b>(const SSL *ssl);)()</dt>
  610. <dd>
  611. </dd>
  612. <dt id="int-SSL_get_key_update_type-SSL-s">int <b>SSL_get_key_update_type</b>(SSL *s);</dt>
  613. <dd>
  614. </dd>
  615. <dt id="STACK-SSL_get_peer_cert_chain-const-SSL-ssl">STACK *<b>SSL_get_peer_cert_chain</b>(const SSL *ssl);</dt>
  616. <dd>
  617. </dd>
  618. <dt id="X509-SSL_get_peer_certificate-const-SSL-ssl">X509 *<b>SSL_get_peer_certificate</b>(const SSL *ssl);</dt>
  619. <dd>
  620. </dd>
  621. <dt id="const-STACK_OF-SCT-SSL_get0_peer_scts-SSL-s">const STACK_OF(SCT) *<b>SSL_get0_peer_scts</b>(SSL *s);</dt>
  622. <dd>
  623. </dd>
  624. <dt id="EVP_PKEY-SSL_get_privatekey-const-SSL-ssl">EVP_PKEY *<b>SSL_get_privatekey</b>(const SSL *ssl);</dt>
  625. <dd>
  626. </dd>
  627. <dt id="int-SSL_get_quiet_shutdown-const-SSL-ssl">int <b>SSL_get_quiet_shutdown</b>(const SSL *ssl);</dt>
  628. <dd>
  629. </dd>
  630. <dt id="BIO-SSL_get_rbio-const-SSL-ssl">BIO *<b>SSL_get_rbio</b>(const SSL *ssl);</dt>
  631. <dd>
  632. </dd>
  633. <dt id="int-SSL_get_read_ahead-const-SSL-ssl">int <b>SSL_get_read_ahead</b>(const SSL *ssl);</dt>
  634. <dd>
  635. </dd>
  636. <dt id="SSL_SESSION-SSL_get_session-const-SSL-ssl">SSL_SESSION *<b>SSL_get_session</b>(const SSL *ssl);</dt>
  637. <dd>
  638. </dd>
  639. <dt id="char-SSL_get_shared_ciphers-const-SSL-ssl-char-buf-int-size">char *<b>SSL_get_shared_ciphers</b>(const SSL *ssl, char *buf, int size);</dt>
  640. <dd>
  641. </dd>
  642. <dt id="int-SSL_get_shutdown-const-SSL-ssl">int <b>SSL_get_shutdown</b>(const SSL *ssl);</dt>
  643. <dd>
  644. </dd>
  645. <dt id="const-SSL_METHOD-SSL_get_ssl_method-SSL-ssl">const SSL_METHOD *<b>SSL_get_ssl_method</b>(SSL *ssl);</dt>
  646. <dd>
  647. </dd>
  648. <dt id="int-SSL_get_state-const-SSL-ssl">int <b>SSL_get_state</b>(const SSL *ssl);</dt>
  649. <dd>
  650. </dd>
  651. <dt id="long-SSL_get_time-const-SSL-ssl">long <b>SSL_get_time</b>(const SSL *ssl);</dt>
  652. <dd>
  653. </dd>
  654. <dt id="long-SSL_get_timeout-const-SSL-ssl">long <b>SSL_get_timeout</b>(const SSL *ssl);</dt>
  655. <dd>
  656. </dd>
  657. <dt id="int-SSL_get_verify_callback-const-SSL-ssl-int-X509_STORE_CTX">int (*<b>SSL_get_verify_callback</b>(const SSL *ssl))(int, X509_STORE_CTX *)</dt>
  658. <dd>
  659. </dd>
  660. <dt id="int-SSL_get_verify_mode-const-SSL-ssl">int <b>SSL_get_verify_mode</b>(const SSL *ssl);</dt>
  661. <dd>
  662. </dd>
  663. <dt id="long-SSL_get_verify_result-const-SSL-ssl">long <b>SSL_get_verify_result</b>(const SSL *ssl);</dt>
  664. <dd>
  665. </dd>
  666. <dt id="char-SSL_get_version-const-SSL-ssl">char *<b>SSL_get_version</b>(const SSL *ssl);</dt>
  667. <dd>
  668. </dd>
  669. <dt id="BIO-SSL_get_wbio-const-SSL-ssl">BIO *<b>SSL_get_wbio</b>(const SSL *ssl);</dt>
  670. <dd>
  671. </dd>
  672. <dt id="int-SSL_in_accept_init-SSL-ssl">int <b>SSL_in_accept_init</b>(SSL *ssl);</dt>
  673. <dd>
  674. </dd>
  675. <dt id="int-SSL_in_before-SSL-ssl">int <b>SSL_in_before</b>(SSL *ssl);</dt>
  676. <dd>
  677. </dd>
  678. <dt id="int-SSL_in_connect_init-SSL-ssl">int <b>SSL_in_connect_init</b>(SSL *ssl);</dt>
  679. <dd>
  680. </dd>
  681. <dt id="int-SSL_in_init-SSL-ssl">int <b>SSL_in_init</b>(SSL *ssl);</dt>
  682. <dd>
  683. </dd>
  684. <dt id="int-SSL_is_init_finished-SSL-ssl">int <b>SSL_is_init_finished</b>(SSL *ssl);</dt>
  685. <dd>
  686. </dd>
  687. <dt id="int-SSL_key_update-SSL-s-int-updatetype">int <b>SSL_key_update</b>(SSL *s, int updatetype);</dt>
  688. <dd>
  689. </dd>
  690. <dt id="STACK-SSL_load_client_CA_file-const-char-file">STACK *<b>SSL_load_client_CA_file</b>(const char *file);</dt>
  691. <dd>
  692. </dd>
  693. <dt id="SSL-SSL_new-SSL_CTX-ctx">SSL *<b>SSL_new</b>(SSL_CTX *ctx);</dt>
  694. <dd>
  695. </dd>
  696. <dt id="int-SSL_up_ref-SSL-s">int SSL_up_ref(SSL *s);</dt>
  697. <dd>
  698. </dd>
  699. <dt id="long-SSL_num_renegotiations-SSL-ssl">long <b>SSL_num_renegotiations</b>(SSL *ssl);</dt>
  700. <dd>
  701. </dd>
  702. <dt id="int-SSL_peek-SSL-ssl-void-buf-int-num">int <b>SSL_peek</b>(SSL *ssl, void *buf, int num);</dt>
  703. <dd>
  704. </dd>
  705. <dt id="int-SSL_pending-const-SSL-ssl">int <b>SSL_pending</b>(const SSL *ssl);</dt>
  706. <dd>
  707. </dd>
  708. <dt id="int-SSL_read-SSL-ssl-void-buf-int-num">int <b>SSL_read</b>(SSL *ssl, void *buf, int num);</dt>
  709. <dd>
  710. </dd>
  711. <dt id="int-SSL_renegotiate-SSL-ssl">int <b>SSL_renegotiate</b>(SSL *ssl);</dt>
  712. <dd>
  713. </dd>
  714. <dt id="char-SSL_rstate_string-SSL-ssl">char *<b>SSL_rstate_string</b>(SSL *ssl);</dt>
  715. <dd>
  716. </dd>
  717. <dt id="char-SSL_rstate_string_long-SSL-ssl">char *<b>SSL_rstate_string_long</b>(SSL *ssl);</dt>
  718. <dd>
  719. </dd>
  720. <dt id="long-SSL_session_reused-SSL-ssl">long <b>SSL_session_reused</b>(SSL *ssl);</dt>
  721. <dd>
  722. </dd>
  723. <dt id="void-SSL_set_accept_state-SSL-ssl">void <b>SSL_set_accept_state</b>(SSL *ssl);</dt>
  724. <dd>
  725. </dd>
  726. <dt id="void-SSL_set_app_data-SSL-ssl-char-arg">void <b>SSL_set_app_data</b>(SSL *ssl, char *arg);</dt>
  727. <dd>
  728. </dd>
  729. <dt id="void-SSL_set_bio-SSL-ssl-BIO-rbio-BIO-wbio">void <b>SSL_set_bio</b>(SSL *ssl, BIO *rbio, BIO *wbio);</dt>
  730. <dd>
  731. </dd>
  732. <dt id="int-SSL_set_cipher_list-SSL-ssl-char-str">int <b>SSL_set_cipher_list</b>(SSL *ssl, char *str);</dt>
  733. <dd>
  734. </dd>
  735. <dt id="void-SSL_set_client_CA_list-SSL-ssl-STACK-list">void <b>SSL_set_client_CA_list</b>(SSL *ssl, STACK *list);</dt>
  736. <dd>
  737. </dd>
  738. <dt id="void-SSL_set_connect_state-SSL-ssl">void <b>SSL_set_connect_state</b>(SSL *ssl);</dt>
  739. <dd>
  740. </dd>
  741. <dt id="int-SSL_set_ct_validation_callback-SSL-ssl-ssl_ct_validation_cb-callback-void-arg">int <b>SSL_set_ct_validation_callback</b>(SSL *ssl, ssl_ct_validation_cb callback, void *arg);</dt>
  742. <dd>
  743. </dd>
  744. <dt id="int-SSL_set_ex_data-SSL-ssl-int-idx-char-arg">int <b>SSL_set_ex_data</b>(SSL *ssl, int idx, char *arg);</dt>
  745. <dd>
  746. </dd>
  747. <dt id="int-SSL_set_fd-SSL-ssl-int-fd">int <b>SSL_set_fd</b>(SSL *ssl, int fd);</dt>
  748. <dd>
  749. </dd>
  750. <dt id="void-SSL_set_info_callback-SSL-ssl-void-cb-void">void <b>SSL_set_info_callback</b>(SSL *ssl, void (*cb);(void))</dt>
  751. <dd>
  752. </dd>
  753. <dt id="void-SSL_set_msg_callback-SSL-ctx-void-cb-int-write_p-int-version-int-content_type-const-void-buf-size_t-len-SSL-ssl-void-arg">void <b>SSL_set_msg_callback</b>(SSL *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));</dt>
  754. <dd>
  755. </dd>
  756. <dt id="void-SSL_set_msg_callback_arg-SSL-ctx-void-arg">void <b>SSL_set_msg_callback_arg</b>(SSL *ctx, void *arg);</dt>
  757. <dd>
  758. </dd>
  759. <dt id="unsigned-long-SSL_clear_options-SSL-ssl-unsigned-long-op">unsigned long <b>SSL_clear_options</b>(SSL *ssl, unsigned long op);</dt>
  760. <dd>
  761. </dd>
  762. <dt id="unsigned-long-SSL_get_options-SSL-ssl">unsigned long <b>SSL_get_options</b>(SSL *ssl);</dt>
  763. <dd>
  764. </dd>
  765. <dt id="unsigned-long-SSL_set_options-SSL-ssl-unsigned-long-op">unsigned long <b>SSL_set_options</b>(SSL *ssl, unsigned long op);</dt>
  766. <dd>
  767. </dd>
  768. <dt id="void-SSL_set_quiet_shutdown-SSL-ssl-int-mode">void <b>SSL_set_quiet_shutdown</b>(SSL *ssl, int mode);</dt>
  769. <dd>
  770. </dd>
  771. <dt id="void-SSL_set_read_ahead-SSL-ssl-int-yes">void <b>SSL_set_read_ahead</b>(SSL *ssl, int yes);</dt>
  772. <dd>
  773. </dd>
  774. <dt id="int-SSL_set_rfd-SSL-ssl-int-fd">int <b>SSL_set_rfd</b>(SSL *ssl, int fd);</dt>
  775. <dd>
  776. </dd>
  777. <dt id="int-SSL_set_session-SSL-ssl-SSL_SESSION-session">int <b>SSL_set_session</b>(SSL *ssl, SSL_SESSION *session);</dt>
  778. <dd>
  779. </dd>
  780. <dt id="void-SSL_set_shutdown-SSL-ssl-int-mode">void <b>SSL_set_shutdown</b>(SSL *ssl, int mode);</dt>
  781. <dd>
  782. </dd>
  783. <dt id="int-SSL_set_ssl_method-SSL-ssl-const-SSL_METHOD-meth">int <b>SSL_set_ssl_method</b>(SSL *ssl, const SSL_METHOD *meth);</dt>
  784. <dd>
  785. </dd>
  786. <dt id="void-SSL_set_time-SSL-ssl-long-t">void <b>SSL_set_time</b>(SSL *ssl, long t);</dt>
  787. <dd>
  788. </dd>
  789. <dt id="void-SSL_set_timeout-SSL-ssl-long-t">void <b>SSL_set_timeout</b>(SSL *ssl, long t);</dt>
  790. <dd>
  791. </dd>
  792. <dt id="void-SSL_set_verify-SSL-ssl-int-mode-int-callback-void">void <b>SSL_set_verify</b>(SSL *ssl, int mode, int (*callback);(void))</dt>
  793. <dd>
  794. </dd>
  795. <dt id="void-SSL_set_verify_result-SSL-ssl-long-arg">void <b>SSL_set_verify_result</b>(SSL *ssl, long arg);</dt>
  796. <dd>
  797. </dd>
  798. <dt id="int-SSL_set_wfd-SSL-ssl-int-fd">int <b>SSL_set_wfd</b>(SSL *ssl, int fd);</dt>
  799. <dd>
  800. </dd>
  801. <dt id="int-SSL_shutdown-SSL-ssl">int <b>SSL_shutdown</b>(SSL *ssl);</dt>
  802. <dd>
  803. </dd>
  804. <dt id="OSSL_HANDSHAKE_STATE-SSL_get_state-const-SSL-ssl">OSSL_HANDSHAKE_STATE <b>SSL_get_state</b>(const SSL *ssl);</dt>
  805. <dd>
  806. <p>Returns the current handshake state.</p>
  807. </dd>
  808. <dt id="char-SSL_state_string-const-SSL-ssl">char *<b>SSL_state_string</b>(const SSL *ssl);</dt>
  809. <dd>
  810. </dd>
  811. <dt id="char-SSL_state_string_long-const-SSL-ssl">char *<b>SSL_state_string_long</b>(const SSL *ssl);</dt>
  812. <dd>
  813. </dd>
  814. <dt id="long-SSL_total_renegotiations-SSL-ssl">long <b>SSL_total_renegotiations</b>(SSL *ssl);</dt>
  815. <dd>
  816. </dd>
  817. <dt id="int-SSL_use_PrivateKey-SSL-ssl-EVP_PKEY-pkey">int <b>SSL_use_PrivateKey</b>(SSL *ssl, EVP_PKEY *pkey);</dt>
  818. <dd>
  819. </dd>
  820. <dt id="int-SSL_use_PrivateKey_ASN1-int-type-SSL-ssl-unsigned-char-d-long-len">int <b>SSL_use_PrivateKey_ASN1</b>(int type, SSL *ssl, unsigned char *d, long len);</dt>
  821. <dd>
  822. </dd>
  823. <dt id="int-SSL_use_PrivateKey_file-SSL-ssl-const-char-file-int-type">int <b>SSL_use_PrivateKey_file</b>(SSL *ssl, const char *file, int type);</dt>
  824. <dd>
  825. </dd>
  826. <dt id="int-SSL_use_RSAPrivateKey-SSL-ssl-RSA-rsa">int <b>SSL_use_RSAPrivateKey</b>(SSL *ssl, RSA *rsa);</dt>
  827. <dd>
  828. </dd>
  829. <dt id="int-SSL_use_RSAPrivateKey_ASN1-SSL-ssl-unsigned-char-d-long-len">int <b>SSL_use_RSAPrivateKey_ASN1</b>(SSL *ssl, unsigned char *d, long len);</dt>
  830. <dd>
  831. </dd>
  832. <dt id="int-SSL_use_RSAPrivateKey_file-SSL-ssl-const-char-file-int-type">int <b>SSL_use_RSAPrivateKey_file</b>(SSL *ssl, const char *file, int type);</dt>
  833. <dd>
  834. </dd>
  835. <dt id="int-SSL_use_certificate-SSL-ssl-X509-x">int <b>SSL_use_certificate</b>(SSL *ssl, X509 *x);</dt>
  836. <dd>
  837. </dd>
  838. <dt id="int-SSL_use_certificate_ASN1-SSL-ssl-int-len-unsigned-char-d">int <b>SSL_use_certificate_ASN1</b>(SSL *ssl, int len, unsigned char *d);</dt>
  839. <dd>
  840. </dd>
  841. <dt id="int-SSL_use_certificate_file-SSL-ssl-const-char-file-int-type">int <b>SSL_use_certificate_file</b>(SSL *ssl, const char *file, int type);</dt>
  842. <dd>
  843. </dd>
  844. <dt id="int-SSL_use_cert_and_key-SSL-ssl-X509-x-EVP_PKEY-pkey-STACK_OF-X509-chain-int-override">int <b>SSL_use_cert_and_key</b>(SSL *ssl, X509 *x, EVP_PKEY *pkey, STACK_OF(X509) *chain, int override);</dt>
  845. <dd>
  846. </dd>
  847. <dt id="int-SSL_version-const-SSL-ssl">int <b>SSL_version</b>(const SSL *ssl);</dt>
  848. <dd>
  849. </dd>
  850. <dt id="int-SSL_want-const-SSL-ssl">int <b>SSL_want</b>(const SSL *ssl);</dt>
  851. <dd>
  852. </dd>
  853. <dt id="int-SSL_want_nothing-const-SSL-ssl">int <b>SSL_want_nothing</b>(const SSL *ssl);</dt>
  854. <dd>
  855. </dd>
  856. <dt id="int-SSL_want_read-const-SSL-ssl">int <b>SSL_want_read</b>(const SSL *ssl);</dt>
  857. <dd>
  858. </dd>
  859. <dt id="int-SSL_want_write-const-SSL-ssl">int <b>SSL_want_write</b>(const SSL *ssl);</dt>
  860. <dd>
  861. </dd>
  862. <dt id="int-SSL_want_x509_lookup-const-SSL-ssl">int <b>SSL_want_x509_lookup</b>(const SSL *ssl);</dt>
  863. <dd>
  864. </dd>
  865. <dt id="int-SSL_write-SSL-ssl-const-void-buf-int-num">int <b>SSL_write</b>(SSL *ssl, const void *buf, int num);</dt>
  866. <dd>
  867. </dd>
  868. <dt id="void-SSL_set_psk_client_callback-SSL-ssl-unsigned-int-callback-SSL-ssl-const-char-hint-char-identity-unsigned-int-max_identity_len-unsigned-char-psk-unsigned-int-max_psk_len">void <b>SSL_set_psk_client_callback</b>(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len));</dt>
  869. <dd>
  870. </dd>
  871. <dt id="int-SSL_use_psk_identity_hint-SSL-ssl-const-char-hint">int <b>SSL_use_psk_identity_hint</b>(SSL *ssl, const char *hint);</dt>
  872. <dd>
  873. </dd>
  874. <dt id="void-SSL_set_psk_server_callback-SSL-ssl-unsigned-int-callback-SSL-ssl-const-char-identity-unsigned-char-psk-int-max_psk_len">void <b>SSL_set_psk_server_callback</b>(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len));</dt>
  875. <dd>
  876. </dd>
  877. <dt id="const-char-SSL_get_psk_identity_hint-SSL-ssl">const char *<b>SSL_get_psk_identity_hint</b>(SSL *ssl);</dt>
  878. <dd>
  879. </dd>
  880. <dt id="const-char-SSL_get_psk_identity-SSL-ssl">const char *<b>SSL_get_psk_identity</b>(SSL *ssl);</dt>
  881. <dd>
  882. </dd>
  883. </dl>
  884. <h1 id="RETURN-VALUES">RETURN VALUES</h1>
  885. <p>See the individual manual pages for details.</p>
  886. <h1 id="SEE-ALSO">SEE ALSO</h1>
  887. <p><a href="../man1/openssl.html">openssl(1)</a>, <a href="../man7/crypto.html">crypto(7)</a>, <a href="../man3/CRYPTO_get_ex_new_index.html">CRYPTO_get_ex_new_index(3)</a>, <a href="../man3/SSL_accept.html">SSL_accept(3)</a>, <a href="../man3/SSL_clear.html">SSL_clear(3)</a>, <a href="../man3/SSL_connect.html">SSL_connect(3)</a>, <a href="../man3/SSL_CIPHER_get_name.html">SSL_CIPHER_get_name(3)</a>, <a href="../man3/SSL_COMP_add_compression_method.html">SSL_COMP_add_compression_method(3)</a>, <a href="../man3/SSL_CTX_add_extra_chain_cert.html">SSL_CTX_add_extra_chain_cert(3)</a>, <a href="../man3/SSL_CTX_add_session.html">SSL_CTX_add_session(3)</a>, <a href="../man3/SSL_CTX_ctrl.html">SSL_CTX_ctrl(3)</a>, <a href="../man3/SSL_CTX_flush_sessions.html">SSL_CTX_flush_sessions(3)</a>, <a href="../man3/SSL_CTX_get_verify_mode.html">SSL_CTX_get_verify_mode(3)</a>, <a href="../man3/SSL_CTX_load_verify_locations.html">SSL_CTX_load_verify_locations(3)</a> <a href="../man3/SSL_CTX_new.html">SSL_CTX_new(3)</a>, <a href="../man3/SSL_CTX_sess_number.html">SSL_CTX_sess_number(3)</a>, <a href="../man3/SSL_CTX_sess_set_cache_size.html">SSL_CTX_sess_set_cache_size(3)</a>, <a href="../man3/SSL_CTX_sess_set_get_cb.html">SSL_CTX_sess_set_get_cb(3)</a>, <a href="../man3/SSL_CTX_sessions.html">SSL_CTX_sessions(3)</a>, <a href="../man3/SSL_CTX_set_cert_store.html">SSL_CTX_set_cert_store(3)</a>, <a href="../man3/SSL_CTX_set_cert_verify_callback.html">SSL_CTX_set_cert_verify_callback(3)</a>, <a href="../man3/SSL_CTX_set_cipher_list.html">SSL_CTX_set_cipher_list(3)</a>, <a href="../man3/SSL_CTX_set_client_CA_list.html">SSL_CTX_set_client_CA_list(3)</a>, <a href="../man3/SSL_CTX_set_client_cert_cb.html">SSL_CTX_set_client_cert_cb(3)</a>, <a href="../man3/SSL_CTX_set_default_passwd_cb.html">SSL_CTX_set_default_passwd_cb(3)</a>, <a href="../man3/SSL_CTX_set_generate_session_id.html">SSL_CTX_set_generate_session_id(3)</a>, <a href="../man3/SSL_CTX_set_info_callback.html">SSL_CTX_set_info_callback(3)</a>, <a href="../man3/SSL_CTX_set_max_cert_list.html">SSL_CTX_set_max_cert_list(3)</a>, <a href="../man3/SSL_CTX_set_mode.html">SSL_CTX_set_mode(3)</a>, <a href="../man3/SSL_CTX_set_msg_callback.html">SSL_CTX_set_msg_callback(3)</a>, <a href="../man3/SSL_CTX_set_options.html">SSL_CTX_set_options(3)</a>, <a href="../man3/SSL_CTX_set_quiet_shutdown.html">SSL_CTX_set_quiet_shutdown(3)</a>, <a href="../man3/SSL_CTX_set_read_ahead.html">SSL_CTX_set_read_ahead(3)</a>, <a href="../man3/SSL_CTX_set_security_level.html">SSL_CTX_set_security_level(3)</a>, <a href="../man3/SSL_CTX_set_session_cache_mode.html">SSL_CTX_set_session_cache_mode(3)</a>, <a href="../man3/SSL_CTX_set_session_id_context.html">SSL_CTX_set_session_id_context(3)</a>, <a href="../man3/SSL_CTX_set_ssl_version.html">SSL_CTX_set_ssl_version(3)</a>, <a href="../man3/SSL_CTX_set_timeout.html">SSL_CTX_set_timeout(3)</a>, <a href="../man3/SSL_CTX_set_tmp_dh_callback.html">SSL_CTX_set_tmp_dh_callback(3)</a>, <a href="../man3/SSL_CTX_set_verify.html">SSL_CTX_set_verify(3)</a>, <a href="../man3/SSL_CTX_use_certificate.html">SSL_CTX_use_certificate(3)</a>, <a href="../man3/SSL_alert_type_string.html">SSL_alert_type_string(3)</a>, <a href="../man3/SSL_do_handshake.html">SSL_do_handshake(3)</a>, <a href="../man3/SSL_enable_ct.html">SSL_enable_ct(3)</a>, <a href="../man3/SSL_get_SSL_CTX.html">SSL_get_SSL_CTX(3)</a>, <a href="../man3/SSL_get_ciphers.html">SSL_get_ciphers(3)</a>, <a href="../man3/SSL_get_client_CA_list.html">SSL_get_client_CA_list(3)</a>, <a href="../man3/SSL_get_default_timeout.html">SSL_get_default_timeout(3)</a>, <a href="../man3/SSL_get_error.html">SSL_get_error(3)</a>, <a href="../man3/SSL_get_ex_data_X509_STORE_CTX_idx.html">SSL_get_ex_data_X509_STORE_CTX_idx(3)</a>, <a href="../man3/SSL_get_fd.html">SSL_get_fd(3)</a>, <a href="../man3/SSL_get_peer_cert_chain.html">SSL_get_peer_cert_chain(3)</a>, <a href="../man3/SSL_get_rbio.html">SSL_get_rbio(3)</a>, <a href="../man3/SSL_get_session.html">SSL_get_session(3)</a>, <a href="../man3/SSL_get_verify_result.html">SSL_get_verify_result(3)</a>, <a href="../man3/SSL_get_version.html">SSL_get_version(3)</a>, <a href="../man3/SSL_load_client_CA_file.html">SSL_load_client_CA_file(3)</a>, <a href="../man3/SSL_new.html">SSL_new(3)</a>, <a href="../man3/SSL_pending.html">SSL_pending(3)</a>, <a href="../man3/SSL_read_ex.html">SSL_read_ex(3)</a>, <a href="../man3/SSL_read.html">SSL_read(3)</a>, <a href="../man3/SSL_rstate_string.html">SSL_rstate_string(3)</a>, <a href="../man3/SSL_session_reused.html">SSL_session_reused(3)</a>, <a href="../man3/SSL_set_bio.html">SSL_set_bio(3)</a>, <a href="../man3/SSL_set_connect_state.html">SSL_set_connect_state(3)</a>, <a href="../man3/SSL_set_fd.html">SSL_set_fd(3)</a>, <a href="../man3/SSL_set_session.html">SSL_set_session(3)</a>, <a href="../man3/SSL_set_shutdown.html">SSL_set_shutdown(3)</a>, <a href="../man3/SSL_shutdown.html">SSL_shutdown(3)</a>, <a href="../man3/SSL_state_string.html">SSL_state_string(3)</a>, <a href="../man3/SSL_want.html">SSL_want(3)</a>, <a href="../man3/SSL_write_ex.html">SSL_write_ex(3)</a>, <a href="../man3/SSL_write.html">SSL_write(3)</a>, <a href="../man3/SSL_SESSION_free.html">SSL_SESSION_free(3)</a>, <a href="../man3/SSL_SESSION_get_time.html">SSL_SESSION_get_time(3)</a>, <a href="../man3/d2i_SSL_SESSION.html">d2i_SSL_SESSION(3)</a>, <a href="../man3/SSL_CTX_set_psk_client_callback.html">SSL_CTX_set_psk_client_callback(3)</a>, <a href="../man3/SSL_CTX_use_psk_identity_hint.html">SSL_CTX_use_psk_identity_hint(3)</a>, <a href="../man3/SSL_get_psk_identity.html">SSL_get_psk_identity(3)</a>, <a href="../man3/DTLSv1_listen.html">DTLSv1_listen(3)</a></p>
  888. <h1 id="HISTORY">HISTORY</h1>
  889. <p><b>SSLv2_client_method</b>, <b>SSLv2_server_method</b> and <b>SSLv2_method</b> were removed in OpenSSL 1.1.0.</p>
  890. <p>The return type of <b>SSL_copy_session_id</b> was changed from void to int in OpenSSL 1.1.0.</p>
  891. <h1 id="COPYRIGHT">COPYRIGHT</h1>
  892. <p>Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.</p>
  893. <p>Licensed under the OpenSSL license (the &quot;License&quot;). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
  894. </body>
  895. </html>