Deprecate the low level DSA functions.
[openssl.git] / doc / man3 / SSL_CTX_get0_param.pod
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<ssl(7)>,
50 L<X509_VERIFY_PARAM_set_flags(3)>
51
52 =head1 HISTORY
53
54 These functions were added in OpenSSL 1.0.2.
55
56 =head1 COPYRIGHT
57
58 Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
59
60 Licensed under the Apache License 2.0 (the "License").  You may not use
61 this file except in compliance with the License.  You can obtain a copy
62 in the file LICENSE in the source distribution or at
63 L<https://www.openssl.org/source/license.html>.
64
65 =cut