SSL_CTX_set_min_proto_version.pod 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_set_min_proto_version, SSL_CTX_set_max_proto_version,
  4. SSL_CTX_get_min_proto_version, SSL_CTX_get_max_proto_version,
  5. SSL_set_min_proto_version, SSL_set_max_proto_version,
  6. SSL_get_min_proto_version, SSL_get_max_proto_version - Get and set minimum
  7. and maximum supported protocol version
  8. =head1 SYNOPSIS
  9. #include <openssl/ssl.h>
  10. int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
  11. int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
  12. int SSL_CTX_get_min_proto_version(SSL_CTX *ctx);
  13. int SSL_CTX_get_max_proto_version(SSL_CTX *ctx);
  14. int SSL_set_min_proto_version(SSL *ssl, int version);
  15. int SSL_set_max_proto_version(SSL *ssl, int version);
  16. int SSL_get_min_proto_version(SSL *ssl);
  17. int SSL_get_max_proto_version(SSL *ssl);
  18. =head1 DESCRIPTION
  19. The functions get or set the minimum and maximum supported protocol versions
  20. for the B<ctx> or B<ssl>.
  21. This works in combination with the options set via
  22. L<SSL_CTX_set_options(3)> that also make it possible to disable
  23. specific protocol versions.
  24. Use these functions instead of disabling specific protocol versions.
  25. Setting the minimum or maximum version to 0 (default), will enable protocol
  26. versions down to the lowest version, or up to the highest version
  27. supported by the library, respectively. The supported versions might be
  28. controlled by system configuration.
  29. Getters return 0 in case B<ctx> or B<ssl> have been configured to
  30. automatically use the lowest or highest version supported by the library.
  31. Currently supported versions are B<SSL3_VERSION>, B<TLS1_VERSION>,
  32. B<TLS1_1_VERSION>, B<TLS1_2_VERSION>, B<TLS1_3_VERSION> for TLS and
  33. B<DTLS1_VERSION>, B<DTLS1_2_VERSION> for DTLS.
  34. In the current version of OpenSSL only QUICv1 is supported in conjunction with
  35. TLSv1.3. Calling these functions on a QUIC object has no effect.
  36. =head1 RETURN VALUES
  37. These setter functions return 1 on success and 0 on failure. The getter
  38. functions return the configured version or 0 for auto-configuration of
  39. lowest or highest protocol, respectively.
  40. =head1 NOTES
  41. All these functions are implemented using macros.
  42. =head1 SEE ALSO
  43. L<ssl(7)>,
  44. L<SSL_CTX_set_options(3)>, L<SSL_CONF_cmd(3)>
  45. =head1 HISTORY
  46. The setter functions were added in OpenSSL 1.1.0. The getter functions
  47. were added in OpenSSL 1.1.1.
  48. =head1 COPYRIGHT
  49. Copyright 2016-2025 The OpenSSL Project Authors. All Rights Reserved.
  50. Licensed under the Apache License 2.0 (the "License"). You may not use
  51. this file except in compliance with the License. You can obtain a copy
  52. in the file LICENSE in the source distribution or at
  53. L<https://www.openssl.org/source/license.html>.
  54. =cut