-.\" $OpenBSD: X509_get_pubkey.3,v 1.10 2021/10/26 18:01:00 tb Exp $
+.\" $OpenBSD: X509_get_pubkey.3,v 1.11 2021/10/26 18:04:24 tb Exp $
.\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400
-.\" X509_REQ_get0_pubkey and X509_REQ_get_X509_PUBKEY not yet in LibreSSL
+.\" X509_REQ_get_X509_PUBKEY not yet in LibreSSL
.\"
.\" This file is a derived work.
.\" The changes are covered by the following Copyright and license:
.Nm X509_get_X509_PUBKEY ,
.Nm X509_get0_pubkey_bitstr ,
.Nm X509_REQ_get_pubkey ,
+.Nm X509_REQ_get0_pubkey ,
.Nm X509_REQ_set_pubkey ,
.Nm X509_extract_key ,
.Nm X509_REQ_extract_key
.Fo X509_REQ_get_pubkey
.Fa "X509_REQ *req"
.Fc
+.Ft EVP_PKEY *
+.Fo X509_REQ_get0_pubkey
+.Fa "X509_REQ *req"
+.Fc
.Ft int
.Fo X509_REQ_set_pubkey
.Fa "X509_REQ *x"
.Fa pkey
should be freed up after use.
.Pp
-.Fn X509_REQ_get_pubkey
+.Fn X509_REQ_get_pubkey ,
+.Fn X509_REQ_get0_pubkey ,
and
.Fn X509_REQ_set_pubkey
are similar but operate on certificate request
.Fn X509_get_X509_PUBKEY ,
.Fn X509_get0_pubkey_bitstr ,
.Fn X509_REQ_get_pubkey ,
+.Fn X509_REQ_get0_pubkey ,
.Fn X509_extract_key ,
and
.Fn X509_REQ_extract_key
.Fn X509_get0_pubkey ,
.Fn X509_set_pubkey ,
.Fn X509_REQ_get_pubkey ,
+.Fn X509_REQ_get0_pubkey ,
and
.Fn X509_REQ_set_pubkey ,
the reason can be determined with
.Fn X509_get0_pubkey
first appeared in OpenSSL 1.1.0 and has been available since
.Ox 6.3 .
+.Fn X509_REQ_get0_pubkey
+first appeared in OpenSSL 1.1.0 and has been available since
+.Ox 7.1 .