update libressl to 2.8.2
[unleashed.git] / lib / libssl / man / SSL_get_certificate.3
blobe3730c2150ff4208b04b1faac8a365e70c66542b
1 .\"     $OpenBSD: SSL_get_certificate.3,v 1.4 2018/04/25 13:51:34 schwarze Exp $
2 .\"
3 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd $Mdocdate: April 25 2018 $
18 .Dt SSL_GET_CERTIFICATE 3
19 .Os
20 .Sh NAME
21 .Nm SSL_get_certificate ,
22 .Nm SSL_get_privatekey
23 .Nd get SSL certificate and private key
24 .Sh SYNOPSIS
25 .In openssl/ssl.h
26 .Ft X509 *
27 .Fo SSL_get_certificate
28 .Fa "const SSL *ssl"
29 .Fc
30 .Ft EVP_PKEY *
31 .Fo SSL_get_privatekey
32 .Fa "const SSL *ssl"
33 .Fc
34 .Sh DESCRIPTION
35 These functions retrieve certificate and key data from an
36 .Vt SSL
37 object.
38 They return internal pointers that must not be freed by the application
39 program.
40 .Sh RETURN VALUES
41 .Fn SSL_get_certificate
42 returns the active X.509 certificate currently used by
43 .Fa ssl
45 .Dv NULL
46 if none is active.
47 .Pp
48 .Fn SSL_get_privatekey
49 returns the active private key currently used by
50 .Fa ssl
52 .Dv NULL
53 if none is active.
54 .Sh SEE ALSO
55 .Xr SSL_check_private_key 3 ,
56 .Xr SSL_use_certificate 3
57 .Sh HISTORY
58 .Fn SSL_get_certificate
59 first appeared in SSLeay 0.5.2a.
60 .Fn SSL_get_privatekey
61 first appeared in SSLeay 0.8.0.
62 Both functions have been available since
63 .Ox 2.4 .