1SSL_CTX_use_serverinfo(3)           OpenSSL          SSL_CTX_use_serverinfo(3)
2
3
4

NAME

6       SSL_CTX_use_serverinfo, SSL_CTX_use_serverinfo_file - use serverinfo
7       extension
8

SYNOPSIS

10        #include <openssl/ssl.h>
11
12        int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
13                                   size_t serverinfo_length);
14
15        int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);
16

DESCRIPTION

18       These functions load "serverinfo" TLS ServerHello Extensions into the
19       SSL_CTX.  A "serverinfo" extension is returned in response to an empty
20       ClientHello Extension.
21
22       SSL_CTX_use_serverinfo() loads one or more serverinfo extensions from a
23       byte array into ctx.  The extensions must be concatenated into a
24       sequence of bytes.  Each extension must consist of a 2-byte Extension
25       Type, a 2-byte length, and then length bytes of extension_data.
26
27       SSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions
28       from file into ctx.  The extensions must be in PEM format.  Each
29       extension must consist of a 2-byte Extension Type, a 2-byte length, and
30       then length bytes of extension_data.  Each PEM extension name must
31       begin with the phrase "BEGIN SERVERINFO FOR ".
32
33       If more than one certificate (RSA/DSA) is installed using
34       SSL_CTX_use_certificate(), the serverinfo extension will be loaded into
35       the last certificate installed.  If e.g. the last item was a RSA
36       certificate, the loaded serverinfo extension data will be loaded for
37       that certificate.  To use the serverinfo extension for multiple
38       certificates, SSL_CTX_use_serverinfo() needs to be called multiple
39       times, once after each time a certificate is loaded.
40

NOTES

RETURN VALUES

43       On success, the functions return 1.  On failure, the functions return
44       0.  Check out the error stack to find out the reason.
45

SEE ALSO

HISTORY

481.0.2o                            2019-09-10         SSL_CTX_use_serverinfo(3)
Impressum