From dd332cea9f709721e72b72fd73eda959c6f5c4bd Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Mon, 21 Sep 2015 13:03:42 +0100 Subject: [PATCH] Document signature accessors. Reviewed-by: Matt Caswell --- doc/crypto/X509_get0_signature.pod | 81 ++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 doc/crypto/X509_get0_signature.pod diff --git a/doc/crypto/X509_get0_signature.pod b/doc/crypto/X509_get0_signature.pod new file mode 100644 index 0000000000..102c0c6e97 --- /dev/null +++ b/doc/crypto/X509_get0_signature.pod @@ -0,0 +1,81 @@ +=pod + +=head1 NAME + +X509_get0_signature, X509_get_signature_nid, X509_REQ_get0_signature, +X509_REQ_get_signature_nid, X509_CRL_get0_signature, +X509_CRL_get_signature_nid - signature information. + +=head1 SYNOPSIS + + #include + + void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, + const X509 *x); + int X509_get_signature_nid(const X509 *x); + + void X509_REQ_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, + const X509_REQ *crl); + int X509_REQ_get_signature_nid(const X509_REQ *crl); + + void X509_CRL_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, + const X509_CRL *crl); + int X509_CRL_get_signature_nid(const X509_CRL *crl); + +=head1 DESCRIPTION + +X509_get0_signature() sets B<*psig> to the signature of B and B<*palg> +to the signature algorithm of B. The values returned are internal +pointers which B be freed up after the call. + +X509_get_signature_nid() returns the NID corresponding to the signature +algorithm of B. + +X509_REQ_get0_signature(), X509_REQ_get_signature_nid() +X509_CRL_get0_signature() and X509_CRL_get_signature_nid() perform the +same function for certificate requests and CRLs. + +=head1 NOTES + +These functions provide lower level access to signatures in certificates +where an application wishes to analyse or generate a signature in a form +where X509_sign() et al is not appropriate (for example a non standard +or unsupported format). + +=head1 RETURN VALUES + +X509_get_signature_nid(), X509_REQ_get_signature_nid() and +X509_CRL_get_signature_nid() return a NID. + +X509_get0_signature(), X509_REQ_get0_signature() and +X509_CRL_get0_signature() do not return values. + +=head1 SEE ALSO + +L, +L, +L, +L, +L, +L, +L, +L, +L, +L, +L, +L, +L, +L, +L, +L + +=head1 HISTORY + +X509_get0_signature() and X509_get_signature_nid() were first added to +OpenSSL 1.0.2. + +X509_REQ_get0_signature(), X509_REQ_get_signature_nid(), +X509_CRL_get0_signature() and X509_CRL_get_signature_nid() were first added +to OpenSSL 1.1.0. + +=cut -- 2.40.0