-.\" $OpenBSD: X509_ALGOR_dup.3,v 1.5 2016/12/25 22:15:10 schwarze Exp $
+.\" $OpenBSD: X509_ALGOR_dup.3,v 1.6 2018/02/24 23:42:40 schwarze Exp $
.\" OpenSSL 4692340e Jun 7 15:49:08 2016 -0400
.\"
.\" 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: December 25 2016 $
+.Dd $Mdocdate: February 24 2018 $
.Dt X509_ALGOR_DUP 3
.Os
.Sh NAME
.Sh SEE ALSO
.Xr ASN1_TYPE_set 3 ,
.Xr d2i_X509_ALGOR 3 ,
+.Xr X509_get0_signature 3 ,
.Xr X509_PUBKEY_get0_param 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
-.\" $OpenBSD: X509_get0_signature.3,v 1.2 2018/02/22 16:26:27 schwarze Exp $
+.\" $OpenBSD: X509_get0_signature.3,v 1.3 2018/02/24 23:42:40 schwarze Exp $
.\" selective merge up to:
.\" OpenSSL man3/X509_get0_signature 2f7a2520 Apr 25 17:28:08 2017 +0100
.\"
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: February 22 2018 $
+.Dd $Mdocdate: February 24 2018 $
.Dt X509_GET0_SIGNATURE 3
.Os
.Sh NAME
.Nm X509_get0_signature ,
.Nm X509_REQ_get0_signature ,
.Nm X509_CRL_get0_signature ,
-.Nm X509_get_signature_nid
+.Nm X509_get0_tbs_sigalg ,
+.Nm X509_get_signature_nid ,
+.Nm X509_REQ_get_signature_nid ,
+.Nm X509_CRL_get_signature_nid
.Nd signature information
.Sh SYNOPSIS
.In openssl/x509.h
.Fa "const ASN1_BIT_STRING **psig"
.Fa "const X509_ALGOR **palg"
.Fc
+.Ft const X509_ALGOR *
+.Fo X509_get0_tbs_sigalg
+.Fa "const X509 *x"
+.Fc
.Ft int
.Fo X509_get_signature_nid
.Fa "const X509 *x"
.Fc
+.Ft int
+.Fo X509_REQ_get_signature_nid
+.Fa "const X509_REQ *req"
+.Fc
+.Ft int
+.Fo X509_CRL_get_signature_nid
+.Fa "const X509_CRL *crl"
+.Fc
.Sh DESCRIPTION
.Fn X509_get0_signature ,
.Fn X509_REQ_get0_signature ,
or
.Fa crl ,
respectively.
+.Fn X509_get0_tbs_sigalg
+returns the signature algorithm in the signed portion of
+.Fa x .
The values returned are internal pointers
that must not be freed by the caller.
.Pp
-.Fn X509_get_signature_nid
-returns the NID corresponding to the signature algorithm of
-.Fa x .
+.Fn X509_get_signature_nid ,
+.Fn X509_REQ_get_signature_nid ,
+and
+.Fn X509_CRL_get_signature_nid
+return the NID corresponding to the signature algorithm of
+.Fa x ,
+.Fa req ,
+or
+.Fa crl ,
+respectively.
.Pp
These functions provide lower level access to the signature
for cases where an application wishes to analyse or generate a
is not appropriate, for example in a non-standard or unsupported format.
.Sh SEE ALSO
.Xr OBJ_obj2nid 3 ,
+.Xr X509_ALGOR_new 3 ,
.Xr X509_CRL_get0_by_serial 3 ,
.Xr X509_CRL_new 3 ,
.Xr X509_get_pubkey 3 ,
and
.Fn X509_get_signature_nid
first appeared in OpenSSL 1.0.2.
+.Pp
+.Fn X509_REQ_get0_signature ,
+.Fn X509_CRL_get0_signature ,
+.Fn X509_REQ_get_signature_nid ,
+and
+.Fn X509_CRL_get_signature_nid
+first appeared in OpenSSL 1.1.0.