SSL_CTX_use_serverinfo.pod revision 289848
1=pod
2
3=head1 NAME
4
5SSL_CTX_use_serverinfo, SSL_CTX_use_serverinfo_file - use serverinfo extension
6
7=head1 SYNOPSIS
8
9 #include <openssl/ssl.h>
10
11 int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
12                            size_t serverinfo_length);
13
14 int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);
15
16=head1 DESCRIPTION
17
18These functions load "serverinfo" TLS ServerHello Extensions into the SSL_CTX.
19A "serverinfo" extension is returned in response to an empty ClientHello
20Extension.
21
22SSL_CTX_use_serverinfo() loads one or more serverinfo extensions from
23a byte array into B<ctx>.  The extensions must be concatenated into a 
24sequence of bytes.  Each extension must consist of a 2-byte Extension Type, 
25a 2-byte length, and then length bytes of extension_data.
26
27SSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions from
28B<file> into B<ctx>.  The extensions must be in PEM format.  Each extension
29must consist of a 2-byte Extension Type, a 2-byte length, and then length
30bytes of extension_data.  Each PEM extension name must begin with the phrase
31"BEGIN SERVERINFO FOR ".
32
33=head1 NOTES
34
35=head1 RETURN VALUES
36
37On success, the functions return 1.
38On failure, the functions return 0.  Check out the error stack to find out
39the reason.
40
41=head1 SEE ALSO
42
43=head1 HISTORY
44
45
46=cut
47