1SSL_CTX_GET0_PARAM(3)               OpenSSL              SSL_CTX_GET0_PARAM(3)
2
3
4

NAME

6       SSL_CTX_get0_param, SSL_get0_param, SSL_CTX_set1_param, SSL_set1_param
7       - get and set verification parameters
8

SYNOPSIS

10        #include <openssl/ssl.h>
11
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)
16

DESCRIPTION

18       SSL_CTX_get0_param() and SSL_get0_param() retrieve an internal pointer
19       to the verification parameters for ctx or ssl respectively. The
20       returned pointer must not be freed by the calling application.
21
22       SSL_CTX_set1_param() and SSL_set1_param() set the verification
23       parameters to vpm for ctx or ssl.
24

NOTES

26       Typically parameters are retrieved from an SSL_CTX or SSL structure
27       using SSL_CTX_get0_param() or SSL_get0_param() and an application
28       modifies them to suit its needs: for example to add a hostname check.
29

RETURN VALUES

31       SSL_CTX_get0_param() and SSL_get0_param() return a pointer to an
32       X509_VERIFY_PARAM structure.
33
34       SSL_CTX_set1_param() and SSL_set1_param() return 1 for success and 0
35       for failure.
36

EXAMPLES

38       Check hostname matches "www.foo.com" in peer certificate:
39
40        X509_VERIFY_PARAM *vpm = SSL_get0_param(ssl);
41        X509_VERIFY_PARAM_set1_host(vpm, "www.foo.com", 0);
42

SEE ALSO

44       X509_VERIFY_PARAM_set_flags(3)
45

HISTORY

47       These functions were added in OpenSSL 1.0.2.
48
50       Copyright 2015-2019 The OpenSSL Project Authors. All Rights Reserved.
51
52       Licensed under the OpenSSL license (the "License").  You may not use
53       this file except in compliance with the License.  You can obtain a copy
54       in the file LICENSE in the source distribution or at
55       <https://www.openssl.org/source/license.html>.
56
57
58
591.1.1q                            2023-02-06             SSL_CTX_GET0_PARAM(3)
Impressum