1SSL_CTX_USE_SERVERINFO(3)           OpenSSL          SSL_CTX_USE_SERVERINFO(3)
2
3
4

NAME

6       SSL_CTX_use_serverinfo_ex, SSL_CTX_use_serverinfo,
7       SSL_CTX_use_serverinfo_file - use serverinfo extension
8

SYNOPSIS

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

DESCRIPTION

22       These functions load "serverinfo" TLS extensions into the SSL_CTX. A
23       "serverinfo" extension is returned in response to an empty ClientHello
24       Extension.
25
26       SSL_CTX_use_serverinfo_ex() loads one or more serverinfo extensions
27       from a byte array into ctx. The version parameter specifies the format
28       of the byte array provided in *serverinfo which is of length
29       serverinfo_length.
30
31       If version is SSL_SERVERINFOV2 then the extensions in the array must
32       consist of a 4-byte context, a 2-byte Extension Type, a 2-byte length,
33       and then length bytes of extension_data. The context and type values
34       have the same meaning as for SSL_CTX_add_custom_ext(3). If serverinfo
35       is being loaded for extensions to be added to a Certificate message,
36       then the extension will only be added for the first certificate in the
37       message (which is always the end-entity certificate).
38
39       If version is SSL_SERVERINFOV1 then the extensions in the array must
40       consist of a 2-byte Extension Type, a 2-byte length, and then length
41       bytes of extension_data. The type value has the same meaning as for
42       SSL_CTX_add_custom_ext(3). The following default context value will be
43       used in this case:
44
45        SSL_EXT_TLS1_2_AND_BELOW_ONLY | SSL_EXT_CLIENT_HELLO
46        | SSL_EXT_TLS1_2_SERVER_HELLO | SSL_EXT_IGNORE_ON_RESUMPTION
47
48       SSL_CTX_use_serverinfo() does the same thing as
49       SSL_CTX_use_serverinfo_ex() except that there is no version parameter
50       so a default version of SSL_SERVERINFOV1 is used instead.
51
52       SSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions
53       from file into ctx.  The extensions must be in PEM format.  Each
54       extension must be in a format as described above for
55       SSL_CTX_use_serverinfo_ex().  Each PEM extension name must begin with
56       the phrase "BEGIN SERVERINFOV2 FOR " for SSL_SERVERINFOV2 data or
57       "BEGIN SERVERINFO FOR " for SSL_SERVERINFOV1 data.
58
59       If more than one certificate (RSA/DSA) is installed using
60       SSL_CTX_use_certificate(), the serverinfo extension will be loaded into
61       the last certificate installed.  If e.g. the last item was a RSA
62       certificate, the loaded serverinfo extension data will be loaded for
63       that certificate.  To use the serverinfo extension for multiple
64       certificates, SSL_CTX_use_serverinfo() needs to be called multiple
65       times, once after each time a certificate is loaded via a call to
66       SSL_CTX_use_certificate().
67

RETURN VALUES

69       On success, the functions return 1.  On failure, the functions return
70       0.  Check out the error stack to find out the reason.
71
73       Copyright 2013-2017 The OpenSSL Project Authors. All Rights Reserved.
74
75       Licensed under the OpenSSL license (the "License").  You may not use
76       this file except in compliance with the License.  You can obtain a copy
77       in the file LICENSE in the source distribution or at
78       <https://www.openssl.org/source/license.html>.
79
80
81
821.1.1k                            2021-03-26         SSL_CTX_USE_SERVERINFO(3)
Impressum