SSL_CTX_use_serverinfo.pod 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_use_serverinfo, SSL_CTX_use_serverinfo_file - use serverinfo extension
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
  7. size_t serverinfo_length);
  8. int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);
  9. =head1 DESCRIPTION
  10. These functions load "serverinfo" TLS ServerHello Extensions into the SSL_CTX.
  11. A "serverinfo" extension is returned in response to an empty ClientHello
  12. Extension.
  13. SSL_CTX_use_serverinfo() loads one or more serverinfo extensions from
  14. a byte array into B<ctx>. The extensions must be concatenated into a
  15. sequence of bytes. Each extension must consist of a 2-byte Extension Type,
  16. a 2-byte length, and then length bytes of extension_data.
  17. SSL_CTX_use_serverinfo_file() loads one or more serverinfo extensions from
  18. B<file> into B<ctx>. The extensions must be in PEM format. Each extension
  19. must consist of a 2-byte Extension Type, a 2-byte length, and then length
  20. bytes of extension_data. Each PEM extension name must begin with the phrase
  21. "BEGIN SERVERINFO FOR ".
  22. If more than one certificate (RSA/DSA) is installed using
  23. SSL_CTX_use_certificate(), the serverinfo extension will be loaded into the
  24. last certificate installed. If e.g. the last item was a RSA certificate, the
  25. loaded serverinfo extension data will be loaded for that certificate. To
  26. use the serverinfo extension for multiple certificates,
  27. SSL_CTX_use_serverinfo() needs to be called multiple times, once B<after>
  28. each time a certificate is loaded.
  29. =head1 NOTES
  30. =head1 RETURN VALUES
  31. On success, the functions return 1.
  32. On failure, the functions return 0. Check out the error stack to find out
  33. the reason.
  34. =head1 SEE ALSO
  35. =head1 HISTORY
  36. =cut