1289848Sjkim=pod 2289848Sjkim 3289848Sjkim=head1 NAME 4289848Sjkim 5289848SjkimSSL_CTX_use_serverinfo, SSL_CTX_use_serverinfo_file - use serverinfo extension 6289848Sjkim 7289848Sjkim=head1 SYNOPSIS 8289848Sjkim 9289848Sjkim #include <openssl/ssl.h> 10289848Sjkim 11289848Sjkim int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo, 12289848Sjkim size_t serverinfo_length); 13289848Sjkim 14289848Sjkim int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file); 15289848Sjkim 16289848Sjkim=head1 DESCRIPTION 17289848Sjkim 18289848SjkimThese functions load "serverinfo" TLS ServerHello Extensions into the SSL_CTX. 19289848SjkimA "serverinfo" extension is returned in response to an empty ClientHello 20289848SjkimExtension. 21289848Sjkim 22289848SjkimSSL_CTX_use_serverinfo() loads one or more serverinfo extensions from 23289848Sjkima byte array into B<ctx>. The extensions must be concatenated into a 24289848Sjkimsequence of bytes. Each extension must consist of a 2-byte Extension Type, 25289848Sjkima 2-byte length, and then length bytes of extension_data. 26289848Sjkim 27289848SjkimSSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions from 28289848SjkimB<file> into B<ctx>. The extensions must be in PEM format. Each extension 29289848Sjkimmust consist of a 2-byte Extension Type, a 2-byte length, and then length 30289848Sjkimbytes of extension_data. Each PEM extension name must begin with the phrase 31289848Sjkim"BEGIN SERVERINFO FOR ". 32289848Sjkim 33298998SjkimIf more than one certificate (RSA/DSA) is installed using 34298998SjkimSSL_CTX_use_certificate(), the serverinfo extension will be loaded into the 35298998Sjkimlast certificate installed. If e.g. the last item was a RSA certificate, the 36298998Sjkimloaded serverinfo extension data will be loaded for that certificate. To 37298998Sjkimuse the serverinfo extension for multiple certificates, 38298998SjkimSSL_CTX_use_serverinfo() needs to be called multiple times, once B<after> 39298998Sjkimeach time a certificate is loaded. 40298998Sjkim 41289848Sjkim=head1 NOTES 42289848Sjkim 43289848Sjkim=head1 RETURN VALUES 44289848Sjkim 45289848SjkimOn success, the functions return 1. 46289848SjkimOn failure, the functions return 0. Check out the error stack to find out 47289848Sjkimthe reason. 48289848Sjkim 49289848Sjkim=head1 SEE ALSO 50289848Sjkim 51289848Sjkim=head1 HISTORY 52289848Sjkim 53289848Sjkim 54289848Sjkim=cut 55