summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2018-02-18 22:19:00 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2018-02-18 22:19:00 +0000
commit053f35d77df5a4c267c5801de6cfa0360f1dfcba (patch)
treebef940c2d632e1885d2c912bb9cd87a66e649f9c /lib/libssl
parent412ef70387017de4c7a42f7610c2a7eb14539a0f (diff)
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.
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/man/Makefile3
-rw-r--r--lib/libssl/man/SSL_CTX_get0_certificate.346
2 files changed, 48 insertions, 1 deletions
diff --git a/lib/libssl/man/Makefile b/lib/libssl/man/Makefile
index 96daeb89755..963e1037e9d 100644
--- a/lib/libssl/man/Makefile
+++ b/lib/libssl/man/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.59 2017/08/21 10:10:25 schwarze Exp $
+# $OpenBSD: Makefile,v 1.60 2018/02/18 22:18:59 schwarze Exp $
.include <bsd.own.mk>
@@ -14,6 +14,7 @@ MAN = BIO_f_ssl.3 \
SSL_CTX_free.3 \
SSL_CTX_get_ex_new_index.3 \
SSL_CTX_get_verify_mode.3 \
+ SSL_CTX_get0_certificate.3 \
SSL_CTX_load_verify_locations.3 \
SSL_CTX_new.3 \
SSL_CTX_sess_number.3 \
diff --git a/lib/libssl/man/SSL_CTX_get0_certificate.3 b/lib/libssl/man/SSL_CTX_get0_certificate.3
new file mode 100644
index 00000000000..39869120351
--- /dev/null
+++ b/lib/libssl/man/SSL_CTX_get0_certificate.3
@@ -0,0 +1,46 @@
+.\" $OpenBSD: SSL_CTX_get0_certificate.3,v 1.1 2018/02/18 22:18:59 schwarze Exp $
+.\"
+.\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: February 18 2018 $
+.Dt SSL_CTX_GET0_CERTIFICATE 3
+.Os
+.Sh NAME
+.Nm SSL_CTX_get0_certificate
+.Nd get the active certificate from an SSL context
+.Sh SYNOPSIS
+.Ft X509 *
+.Fo SSL_CTX_get0_certificate
+.Fa "const SSL_CTX *ctx"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn SSL_CTX_get0_certificate
+function returns an internal pointer
+to the ASN.1 certificate currently active in
+.Fa ctx
+or
+.Dv NULL
+if none was installed with
+.Xr SSL_CTX_use_certificate 3
+or similar functions.
+.Pp
+The returned pointer must not be freed by the caller.
+.Sh SEE ALSO
+.Xr SSL_CTX_new 3 ,
+.Xr SSL_CTX_use_certificate 3 ,
+.Xr X509_get_pubkey 3 ,
+.Xr X509_get_subject_name 3 ,
+.Xr X509_new 3