2
0

SSL_CTX_get0_param.pod 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_get0_param, SSL_get0_param, SSL_CTX_set1_param, SSL_set1_param -
  4. get and set verification parameters
  5. =head1 SYNOPSIS
  6. #include <openssl/ssl.h>
  7. X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx)
  8. X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl)
  9. int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm)
  10. int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm)
  11. =head1 DESCRIPTION
  12. SSL_CTX_get0_param() and SSL_get0_param() retrieve an internal pointer to
  13. the verification parameters for B<ctx> or B<ssl> respectively. The returned
  14. pointer must not be freed by the calling application.
  15. SSL_CTX_set1_param() and SSL_set1_param() set the verification parameters
  16. to B<vpm> for B<ctx> or B<ssl>.
  17. =head1 NOTES
  18. Typically parameters are retrieved from an B<SSL_CTX> or B<SSL> structure
  19. using SSL_CTX_get0_param() or SSL_get0_param() and an application modifies
  20. them to suit its needs: for example to add a hostname check.
  21. =head1 EXAMPLE
  22. Check hostname matches "www.foo.com" in peer certificate:
  23. X509_VERIFY_PARAM *vpm = SSL_get0_param(ssl);
  24. X509_VERIFY_PARAM_set1_host(vpm, "www.foo.com", 0);
  25. =head1 RETURN VALUES
  26. SSL_CTX_get0_param() and SSL_get0_param() return a pointer to an
  27. B<X509_VERIFY_PARAM> structure.
  28. SSL_CTX_set1_param() and SSL_set1_param() return 1 for success and 0
  29. for failure.
  30. =head1 SEE ALSO
  31. L<X509_VERIFY_PARAM_set_flags(3)>
  32. =head1 HISTORY
  33. These functions were first added to OpenSSL 1.0.2.
  34. =head1 COPYRIGHT
  35. Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
  36. Licensed under the OpenSSL license (the "License"). You may not use
  37. this file except in compliance with the License. You can obtain a copy
  38. in the file LICENSE in the source distribution or at
  39. L<https://www.openssl.org/source/license.html>.
  40. =cut