summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-02-18 22:18:59 +0000
committerschwarze <>2018-02-18 22:18:59 +0000
commitc9bcd09e602950a5943cd8274f7d5a8ce842a99f (patch)
tree84e96d1dacb3bc8cdfaec0e2177e71b4f9f2ce08
parent689c61a86df17ce8778a973d39e4ce5b482c51e3 (diff)
downloadopenbsd-c9bcd09e602950a5943cd8274f7d5a8ce842a99f.tar.gz
openbsd-c9bcd09e602950a5943cd8274f7d5a8ce842a99f.tar.bz2
openbsd-c9bcd09e602950a5943cd8274f7d5a8ce842a99f.zip
In ssl.h rev. 1.138 2018/02/17 15:13:12, jsing@ provided
SSL_CTX_get0_certificate(3). It is public in OpenSSL, too, but OpenSSL has no documentation, so write some from scratch.
-rw-r--r--src/lib/libssl/man/Makefile3
-rw-r--r--src/lib/libssl/man/SSL_CTX_get0_certificate.346
2 files changed, 48 insertions, 1 deletions
diff --git a/src/lib/libssl/man/Makefile b/src/lib/libssl/man/Makefile
index 96daeb8975..963e1037e9 100644
--- a/src/lib/libssl/man/Makefile
+++ b/src/lib/libssl/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.59 2017/08/21 10:10:25 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.60 2018/02/18 22:18:59 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -14,6 +14,7 @@ MAN = BIO_f_ssl.3 \
14 SSL_CTX_free.3 \ 14 SSL_CTX_free.3 \
15 SSL_CTX_get_ex_new_index.3 \ 15 SSL_CTX_get_ex_new_index.3 \
16 SSL_CTX_get_verify_mode.3 \ 16 SSL_CTX_get_verify_mode.3 \
17 SSL_CTX_get0_certificate.3 \
17 SSL_CTX_load_verify_locations.3 \ 18 SSL_CTX_load_verify_locations.3 \
18 SSL_CTX_new.3 \ 19 SSL_CTX_new.3 \
19 SSL_CTX_sess_number.3 \ 20 SSL_CTX_sess_number.3 \
diff --git a/src/lib/libssl/man/SSL_CTX_get0_certificate.3 b/src/lib/libssl/man/SSL_CTX_get0_certificate.3
new file mode 100644
index 0000000000..3986912035
--- /dev/null
+++ b/src/lib/libssl/man/SSL_CTX_get0_certificate.3
@@ -0,0 +1,46 @@
1.\" $OpenBSD: SSL_CTX_get0_certificate.3,v 1.1 2018/02/18 22:18:59 schwarze Exp $
2.\"
3.\" Copyright (c) 2018 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: February 18 2018 $
18.Dt SSL_CTX_GET0_CERTIFICATE 3
19.Os
20.Sh NAME
21.Nm SSL_CTX_get0_certificate
22.Nd get the active certificate from an SSL context
23.Sh SYNOPSIS
24.Ft X509 *
25.Fo SSL_CTX_get0_certificate
26.Fa "const SSL_CTX *ctx"
27.Fc
28.Sh DESCRIPTION
29The
30.Fn SSL_CTX_get0_certificate
31function returns an internal pointer
32to the ASN.1 certificate currently active in
33.Fa ctx
34or
35.Dv NULL
36if none was installed with
37.Xr SSL_CTX_use_certificate 3
38or similar functions.
39.Pp
40The returned pointer must not be freed by the caller.
41.Sh SEE ALSO
42.Xr SSL_CTX_new 3 ,
43.Xr SSL_CTX_use_certificate 3 ,
44.Xr X509_get_pubkey 3 ,
45.Xr X509_get_subject_name 3 ,
46.Xr X509_new 3