1 | =pod
|
---|
2 |
|
---|
3 | =head1 NAME
|
---|
4 |
|
---|
5 | SSL_CTX_get0_param, SSL_get0_param, SSL_CTX_set1_param, SSL_set1_param -
|
---|
6 | get and set verification parameters
|
---|
7 |
|
---|
8 | =head1 SYNOPSIS
|
---|
9 |
|
---|
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 |
|
---|
17 | =head1 DESCRIPTION
|
---|
18 |
|
---|
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.
|
---|
22 |
|
---|
23 | SSL_CTX_set1_param() and SSL_set1_param() set the verification parameters
|
---|
24 | to B<vpm> for B<ctx> or B<ssl>.
|
---|
25 |
|
---|
26 | =head1 NOTES
|
---|
27 |
|
---|
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.
|
---|
31 |
|
---|
32 | =head1 RETURN VALUES
|
---|
33 |
|
---|
34 | SSL_CTX_get0_param() and SSL_get0_param() return a pointer to an
|
---|
35 | B<X509_VERIFY_PARAM> structure.
|
---|
36 |
|
---|
37 | SSL_CTX_set1_param() and SSL_set1_param() return 1 for success and 0
|
---|
38 | for failure.
|
---|
39 |
|
---|
40 | =head1 EXAMPLES
|
---|
41 |
|
---|
42 | Check hostname matches "www.foo.com" in peer certificate:
|
---|
43 |
|
---|
44 | X509_VERIFY_PARAM *vpm = SSL_get0_param(ssl);
|
---|
45 | X509_VERIFY_PARAM_set1_host(vpm, "www.foo.com", 0);
|
---|
46 |
|
---|
47 | =head1 SEE ALSO
|
---|
48 |
|
---|
49 | L<X509_VERIFY_PARAM_set_flags(3)>
|
---|
50 |
|
---|
51 | =head1 HISTORY
|
---|
52 |
|
---|
53 | These functions were added in OpenSSL 1.0.2.
|
---|
54 |
|
---|
55 | =head1 COPYRIGHT
|
---|
56 |
|
---|
57 | Copyright 2015-2019 The OpenSSL Project Authors. All Rights Reserved.
|
---|
58 |
|
---|
59 | Licensed under the OpenSSL license (the "License"). You may not use
|
---|
60 | this file except in compliance with the License. You can obtain a copy
|
---|
61 | in the file LICENSE in the source distribution or at
|
---|
62 | L<https://www.openssl.org/source/license.html>.
|
---|
63 |
|
---|
64 | =cut
|
---|