SSL_CTX_set_ssl_version.pod 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_set_ssl_version, SSL_set_ssl_method, SSL_get_ssl_method
  4. - choose a new TLS/SSL method
  5. =head1 SYNOPSIS
  6. #include <openssl/ssl.h>
  7. int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *method);
  8. int SSL_set_ssl_method(SSL *s, const SSL_METHOD *method);
  9. const SSL_METHOD *SSL_get_ssl_method(SSL *ssl);
  10. =head1 DESCRIPTION
  11. SSL_CTX_set_ssl_version() sets a new default TLS/SSL B<method> for SSL objects
  12. newly created from this B<ctx>. SSL objects already created with
  13. L<SSL_new(3)> are not affected, except when
  14. L<SSL_clear(3)> is being called.
  15. SSL_set_ssl_method() sets a new TLS/SSL B<method> for a particular B<ssl>
  16. object. It may be reset, when SSL_clear() is called.
  17. SSL_get_ssl_method() returns a function pointer to the TLS/SSL method
  18. set in B<ssl>.
  19. =head1 NOTES
  20. The available B<method> choices are described in
  21. L<SSL_CTX_new(3)>.
  22. When L<SSL_clear(3)> is called and no session is connected to
  23. an SSL object, the method of the SSL object is reset to the method currently
  24. set in the corresponding SSL_CTX object.
  25. =head1 RETURN VALUES
  26. The following return values can occur for SSL_CTX_set_ssl_version()
  27. and SSL_set_ssl_method():
  28. =over 4
  29. =item Z<>0
  30. The new choice failed, check the error stack to find out the reason.
  31. =item Z<>1
  32. The operation succeeded.
  33. =back
  34. =head1 SEE ALSO
  35. L<SSL_CTX_new(3)>, L<SSL_new(3)>,
  36. L<SSL_clear(3)>, L<ssl(7)>,
  37. L<SSL_set_connect_state(3)>
  38. =head1 COPYRIGHT
  39. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  40. Licensed under the Apache License 2.0 (the "License"). You may not use
  41. this file except in compliance with the License. You can obtain a copy
  42. in the file LICENSE in the source distribution or at
  43. L<https://www.openssl.org/source/license.html>.
  44. =cut