SSL_CTX_set_custom_cli_ext.3 (340704) | SSL_CTX_set_custom_cli_ext.3 (344604) |
---|---|
1.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) | 1.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) |
2.\" 3.\" Standard preamble: 4.\" ======================================================================== 5.de Sp \" Vertical space (when we can't use .PP) 6.if t .sp .5v 7.if n .sp 8.. 9.de Vb \" Begin verbatim text --- 39 unchanged lines hidden (view full) --- 49.\" If the F register is >0, we'll generate index entries on stderr for 50.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index 51.\" entries marked with X<> in POD. Of course, you'll have to process the 52.\" output yourself in some meaningful fashion. 53.\" 54.\" Avoid warning from groff about undefined register 'F'. 55.de IX 56.. | 2.\" 3.\" Standard preamble: 4.\" ======================================================================== 5.de Sp \" Vertical space (when we can't use .PP) 6.if t .sp .5v 7.if n .sp 8.. 9.de Vb \" Begin verbatim text --- 39 unchanged lines hidden (view full) --- 49.\" If the F register is >0, we'll generate index entries on stderr for 50.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index 51.\" entries marked with X<> in POD. Of course, you'll have to process the 52.\" output yourself in some meaningful fashion. 53.\" 54.\" Avoid warning from groff about undefined register 'F'. 55.de IX 56.. |
57.if !\nF .nr F 0 58.if \nF>0 \{\ 59. de IX 60. tm Index:\\$1\t\\n%\t"\\$2" | 57.nr rF 0 58.if \n(.g .if rF .nr rF 1 59.if (\n(rF:(\n(.g==0)) \{\ 60. if \nF \{\ 61. de IX 62. tm Index:\\$1\t\\n%\t"\\$2" |
61.. | 63.. |
62. if !\nF==2 \{\ 63. nr % 0 64. nr F 2 | 64. if !\nF==2 \{\ 65. nr % 0 66. nr F 2 67. \} |
65. \} 66.\} | 68. \} 69.\} |
70.rr rF |
|
67.\" 68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 69.\" Fear. Run. Save yourself. No user-serviceable parts. 70. \" fudge factors for nroff and troff 71.if n \{\ 72. ds #H 0 73. ds #V .8m 74. ds #F .3m --- 49 unchanged lines hidden (view full) --- 124. ds Th \o'LP' 125. ds ae ae 126. ds Ae AE 127.\} 128.rm #[ #] #H #V #F C 129.\" ======================================================================== 130.\" 131.IX Title "SSL_CTX_set_custom_cli_ext 3" | 71.\" 72.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). 73.\" Fear. Run. Save yourself. No user-serviceable parts. 74. \" fudge factors for nroff and troff 75.if n \{\ 76. ds #H 0 77. ds #V .8m 78. ds #F .3m --- 49 unchanged lines hidden (view full) --- 128. ds Th \o'LP' 129. ds ae ae 130. ds Ae AE 131.\} 132.rm #[ #] #H #V #F C 133.\" ======================================================================== 134.\" 135.IX Title "SSL_CTX_set_custom_cli_ext 3" |
132.TH SSL_CTX_set_custom_cli_ext 3 "2018-11-20" "1.0.2q" "OpenSSL" | 136.TH SSL_CTX_set_custom_cli_ext 3 "2019-02-26" "1.0.2r" "OpenSSL" |
133.\" For nroff, turn off justification. Always turn off hyphenation; it makes 134.\" way too many mistakes in technical documents. 135.if n .ad l 136.nh 137.SH "NAME" 138SSL_CTX_add_client_custom_ext, SSL_CTX_add_server_custom_ext \- custom TLS extension handling 139.SH "SYNOPSIS" 140.IX Header "SYNOPSIS" --- 25 unchanged lines hidden (view full) --- 166\& 167\& typedef int (*custom_ext_parse_cb)(SSL *s, unsigned int ext_type, 168\& const unsigned char *in, 169\& size_t inlen, int *al, 170\& void *parse_arg); 171.Ve 172.SH "DESCRIPTION" 173.IX Header "DESCRIPTION" | 137.\" For nroff, turn off justification. Always turn off hyphenation; it makes 138.\" way too many mistakes in technical documents. 139.if n .ad l 140.nh 141.SH "NAME" 142SSL_CTX_add_client_custom_ext, SSL_CTX_add_server_custom_ext \- custom TLS extension handling 143.SH "SYNOPSIS" 144.IX Header "SYNOPSIS" --- 25 unchanged lines hidden (view full) --- 170\& 171\& typedef int (*custom_ext_parse_cb)(SSL *s, unsigned int ext_type, 172\& const unsigned char *in, 173\& size_t inlen, int *al, 174\& void *parse_arg); 175.Ve 176.SH "DESCRIPTION" 177.IX Header "DESCRIPTION" |
174\&\fISSL_CTX_add_client_custom_ext()\fR adds a custom extension for a \s-1TLS\s0 client | 178\&\fBSSL_CTX_add_client_custom_ext()\fR adds a custom extension for a \s-1TLS\s0 client |
175with extension type \fBext_type\fR and callbacks \fBadd_cb\fR, \fBfree_cb\fR and 176\&\fBparse_cb\fR. 177.PP | 179with extension type \fBext_type\fR and callbacks \fBadd_cb\fR, \fBfree_cb\fR and 180\&\fBparse_cb\fR. 181.PP |
178\&\fISSL_CTX_add_server_custom_ext()\fR adds a custom extension for a \s-1TLS\s0 server | 182\&\fBSSL_CTX_add_server_custom_ext()\fR adds a custom extension for a \s-1TLS\s0 server |
179with extension type \fBext_type\fR and callbacks \fBadd_cb\fR, \fBfree_cb\fR and 180\&\fBparse_cb\fR. 181.PP 182In both cases the extension type must not be handled by OpenSSL internally 183or an error occurs. 184.PP | 183with extension type \fBext_type\fR and callbacks \fBadd_cb\fR, \fBfree_cb\fR and 184\&\fBparse_cb\fR. 185.PP 186In both cases the extension type must not be handled by OpenSSL internally 187or an error occurs. 188.PP |
185\&\fISSL_extension_supported()\fR returns 1 if the extension \fBext_type\fR is handled | 189\&\fBSSL_extension_supported()\fR returns 1 if the extension \fBext_type\fR is handled |
186internally by OpenSSL and 0 otherwise. 187.SH "EXTENSION CALLBACKS" 188.IX Header "EXTENSION CALLBACKS" 189The callback \fBadd_cb\fR is called to send custom extension data to be 190included in ClientHello for \s-1TLS\s0 clients or ServerHello for servers. The 191\&\fBext_type\fR parameter is set to the extension type which will be added and 192\&\fBadd_arg\fR to the value set when the extension handler was added. 193.PP --- 51 unchanged lines hidden (view full) --- 245is received in ServerHello which was not sent in ClientHello a fatal 246\&\fBunsupported_extension\fR alert is sent and the handshake is aborted. The 247ServerHello \fBadd_cb\fR callback is only called if the corresponding extension 248was received in ClientHello. This is compliant with the \s-1TLS\s0 specifications. 249This behaviour ensures that each callback is called at most once and that 250an application can never send unsolicited extensions. 251.SH "RETURN VALUES" 252.IX Header "RETURN VALUES" | 190internally by OpenSSL and 0 otherwise. 191.SH "EXTENSION CALLBACKS" 192.IX Header "EXTENSION CALLBACKS" 193The callback \fBadd_cb\fR is called to send custom extension data to be 194included in ClientHello for \s-1TLS\s0 clients or ServerHello for servers. The 195\&\fBext_type\fR parameter is set to the extension type which will be added and 196\&\fBadd_arg\fR to the value set when the extension handler was added. 197.PP --- 51 unchanged lines hidden (view full) --- 249is received in ServerHello which was not sent in ClientHello a fatal 250\&\fBunsupported_extension\fR alert is sent and the handshake is aborted. The 251ServerHello \fBadd_cb\fR callback is only called if the corresponding extension 252was received in ClientHello. This is compliant with the \s-1TLS\s0 specifications. 253This behaviour ensures that each callback is called at most once and that 254an application can never send unsolicited extensions. 255.SH "RETURN VALUES" 256.IX Header "RETURN VALUES" |
253\&\fISSL_CTX_add_client_custom_ext()\fR and \fISSL_CTX_add_server_custom_ext()\fR return 1 for | 257\&\fBSSL_CTX_add_client_custom_ext()\fR and \fBSSL_CTX_add_server_custom_ext()\fR return 1 for |
254success and 0 for failure. A failure can occur if an attempt is made to 255add the same \fBext_type\fR more than once, if an attempt is made to use an 256extension type handled internally by OpenSSL or if an internal error occurs 257(for example a memory allocation failure). 258.PP | 258success and 0 for failure. A failure can occur if an attempt is made to 259add the same \fBext_type\fR more than once, if an attempt is made to use an 260extension type handled internally by OpenSSL or if an internal error occurs 261(for example a memory allocation failure). 262.PP |
259\&\fISSL_extension_supported()\fR returns 1 if the extension \fBext_type\fR is handled | 263\&\fBSSL_extension_supported()\fR returns 1 if the extension \fBext_type\fR is handled |
260internally by OpenSSL and 0 otherwise. | 264internally by OpenSSL and 0 otherwise. |