-# $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>
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 \
--- /dev/null
+.\" $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