-.\" $OpenBSD: OCSP_REQUEST_new.3,v 1.10 2019/06/10 09:49:48 schwarze Exp $
+.\" $OpenBSD: OCSP_REQUEST_new.3,v 1.11 2021/08/06 21:45:55 schwarze Exp $
.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 10 2019 $
+.Dd $Mdocdate: August 6 2021 $
.Dt OCSP_REQUEST_NEW 3
.Os
.Sh NAME
.Xr OCSP_resp_find_status 3 ,
.Xr OCSP_response_status 3 ,
.Xr OCSP_sendreq_new 3 ,
-.Xr OCSP_SERVICELOC_new 3
+.Xr OCSP_SERVICELOC_new 3 ,
+.Xr X509_ocspid_print 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4.1: Request Syntax
-.\" $OpenBSD: OCSP_cert_to_id.3,v 1.10 2019/06/06 01:06:58 schwarze Exp $
+.\" $OpenBSD: OCSP_cert_to_id.3,v 1.11 2021/08/06 21:45:55 schwarze Exp $
.\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
.\"
.\" This file is a derived work.
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 6 2019 $
+.Dd $Mdocdate: August 6 2021 $
.Dt OCSP_CERT_TO_ID 3
.Os
.Sh NAME
.Xr OCSP_response_status 3 ,
.Xr OCSP_sendreq_new 3 ,
.Xr X509_get_issuer_name 3 ,
-.Xr X509_NAME_new 3
+.Xr X509_NAME_new 3 ,
+.Xr X509_ocspid_print 3
.Sh STANDARDS
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
Status Protocol, section 4: Details of the Protocol
--- /dev/null
+.\" $OpenBSD: X509_ocspid_print.3,v 1.1 2021/08/06 21:45:55 schwarze Exp $
+.\"
+.\" Copyright (c) 2021 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: August 6 2021 $
+.Dt X509_OCSPID_PRINT 3
+.Os
+.Sh NAME
+.Nm X509_ocspid_print
+.Nd pretty-print hashes of subject name and public key
+.Sh SYNOPSIS
+.In openssl/x509.h
+.Ft int
+.Fo X509_ocspid_print
+.Fa "BIO *bio"
+.Fa "X509 *issuer"
+.Fc
+.Sh DESCRIPTION
+.Fn X509_ocspid_print
+produces human-readable output to
+.Fa bio
+containing hexadecimal representations of SHA-1 hashes of the
+DER-encoded forms of the subject name and the public key of the
+.Fa issuer
+certificate, as these hashes appear in OCSP requests.
+.Sh RETURN VALUES
+.Fn X509_ocspid_print
+returns 1 for success or 0 for failure.
+.Sh EXAMPLES
+This function is used by the
+.Fl ocspid
+flag of the
+.Xr openssl 1
+.Cm x509
+command.
+.Sh SEE ALSO
+.Xr EVP_sha1 3 ,
+.Xr i2d_X509_NAME 3 ,
+.Xr OCSP_cert_to_id 3 ,
+.Xr OCSP_REQUEST_new 3 ,
+.Xr X509_get_pubkey 3 ,
+.Xr X509_get_subject_name 3
+.Sh HISTORY
+.Fn X509_ocspid_print
+first appeared in OpenSSL 0.9.7 and has been available since
+.Ox 3.2 .