5 SSL_CTX_get0_param, SSL_get0_param, SSL_CTX_set1_param, SSL_set1_param -
6 get and set verification parameters
10 #include <openssl/ssl.h>
12 X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx)
13 X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl)
14 int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm)
15 int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm)
19 SSL_CTX_get0_param() and SSL_get0_param() retrieve an internal pointer to
20 the verification parameters for B<ctx> or B<ssl> respectively. The returned
21 pointer must not be freed by the calling application.
23 SSL_CTX_set1_param() and SSL_set1_param() set the verification parameters
24 to B<vpm> for B<ctx> or B<ssl>.
28 Typically parameters are retrieved from an B<SSL_CTX> or B<SSL> structure
29 using SSL_CTX_get0_param() or SSL_get0_param() and an application modifies
30 them to suit its needs: for example to add a hostname check.
34 Check hostname matches "www.foo.com" in peer certificate:
36 X509_VERIFY_PARAM *vpm = SSL_get0_param(ssl);
37 X509_VERIFY_PARAM_set1_host(vpm, "www.foo.com", 0);
41 SSL_CTX_get0_param() and SSL_get0_param() return a pointer to an
42 B<X509_VERIFY_PARAM> structure.
44 SSL_CTX_set1_param() and SSL_set1_param() return 1 for success and 0
49 L<X509_VERIFY_PARAM_set_flags(3)|X509_VERIFY_PARAM_set_flags(3)>
53 These functions were first added to OpenSSL 1.0.2.