]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/ssl/SSL_CTX_use_serverinfo.pod
Add copyright to manpages
[thirdparty/openssl.git] / doc / ssl / SSL_CTX_use_serverinfo.pod
CommitLineData
9cd50f73
T
1=pod
2
3=head1 NAME
4
4ba81134 5SSL_CTX_use_serverinfo, SSL_CTX_use_serverinfo_file - use serverinfo extension
9cd50f73
T
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
5edce568 22SSL_CTX_use_serverinfo() loads one or more serverinfo extensions from
deda5ea7 23a byte array into B<ctx>. The extensions must be concatenated into a
9cd50f73
T
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
deda5ea7 28B<file> into B<ctx>. The extensions must be in PEM format. Each extension
9cd50f73 29must consist of a 2-byte Extension Type, a 2-byte length, and then length
deda5ea7
TP
30bytes of extension_data. Each PEM extension name must begin with the phrase
31"BEGIN SERVERINFO FOR ".
9cd50f73 32
5f18bc58
TS
33If more than one certificate (RSA/DSA) is installed using
34SSL_CTX_use_certificate(), the serverinfo extension will be loaded into the
35last certificate installed. If e.g. the last item was a RSA certificate, the
36loaded serverinfo extension data will be loaded for that certificate. To
37use the serverinfo extension for multiple certificates,
38SSL_CTX_use_serverinfo() needs to be called multiple times, once B<after>
39each time a certificate is loaded.
40
9cd50f73
T
41=head1 NOTES
42
43=head1 RETURN VALUES
44
45On success, the functions return 1.
46On failure, the functions return 0. Check out the error stack to find out
47the reason.
48
49=head1 SEE ALSO
50
51=head1 HISTORY
52
53
e2f92610
RS
54=cut
55
56=head1 COPYRIGHT
57
58Copyright 2013-2016 The OpenSSL Project Authors. All Rights Reserved.
59
60Licensed under the OpenSSL license (the "License"). You may not use
61this file except in compliance with the License. You can obtain a copy
62in the file LICENSE in the source distribution or at
63L<https://www.openssl.org/source/license.html>.
64
9cd50f73 65=cut