]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/SSL_CTX_get0_param.pod
Don't exclude quite so much in a no-sock build
[thirdparty/openssl.git] / doc / man3 / SSL_CTX_get0_param.pod
CommitLineData
77672802
DSH
1=pod
2
3=head1 NAME
4
5SSL_CTX_get0_param, SSL_get0_param, SSL_CTX_set1_param, SSL_set1_param -
6get 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
19SSL_CTX_get0_param() and SSL_get0_param() retrieve an internal pointer to
20the verification parameters for B<ctx> or B<ssl> respectively. The returned
21pointer must not be freed by the calling application.
22
23SSL_CTX_set1_param() and SSL_set1_param() set the verification parameters
24to B<vpm> for B<ctx> or B<ssl>.
25
26=head1 NOTES
27
28Typically parameters are retrieved from an B<SSL_CTX> or B<SSL> structure
29using SSL_CTX_get0_param() or SSL_get0_param() and an application modifies
30them to suit its needs: for example to add a hostname check.
31
77672802
DSH
32=head1 RETURN VALUES
33
34SSL_CTX_get0_param() and SSL_get0_param() return a pointer to an
35B<X509_VERIFY_PARAM> structure.
36
37SSL_CTX_set1_param() and SSL_set1_param() return 1 for success and 0
38for failure.
39
cda77422 40=head1 EXAMPLES
39a117d1
RS
41
42Check 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
77672802
DSH
47=head1 SEE ALSO
48
98ca37e4 49L<ssl(7)>,
9b86974e 50L<X509_VERIFY_PARAM_set_flags(3)>
77672802
DSH
51
52=head1 HISTORY
53
fc5ecadd 54These functions were added in OpenSSL 1.0.2.
77672802 55
e2f92610
RS
56=head1 COPYRIGHT
57
58Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
59
4746f25a 60Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
61this file except in compliance with the License. You can obtain a copy
62in the file LICENSE in the source distribution or at
63L<https://www.openssl.org/source/license.html>.
64
65=cut