blob: 875868448270d972c56c14e5bc9fc7f753ef3565 [file] [log] [blame]
Dr. Stephen Hensondd332ce2015-09-21 13:03:42 +01001=pod
2
3=head1 NAME
4
Dr. Stephen Hensonff7fbfd2015-11-02 11:52:01 +00005X509_get0_signature, X509_get_signature_nid, X509_get0_tbs_sigalg,
6X509_REQ_get0_signature, X509_REQ_get_signature_nid, X509_CRL_get0_signature,
Dr. Stephen Hensondd332ce2015-09-21 13:03:42 +01007X509_CRL_get_signature_nid - signature information.
8
9=head1 SYNOPSIS
10
11 #include <openssl/x509.h>
12
13 void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
14 const X509 *x);
15 int X509_get_signature_nid(const X509 *x);
Dr. Stephen Hensonff7fbfd2015-11-02 11:52:01 +000016 X509_ALGOR *X509_get0_tbs_sigalg(X509 *x);
Dr. Stephen Hensondd332ce2015-09-21 13:03:42 +010017
18 void X509_REQ_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
19 const X509_REQ *crl);
20 int X509_REQ_get_signature_nid(const X509_REQ *crl);
21
22 void X509_CRL_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
23 const X509_CRL *crl);
24 int X509_CRL_get_signature_nid(const X509_CRL *crl);
25
26=head1 DESCRIPTION
27
28X509_get0_signature() sets B<*psig> to the signature of B<x> and B<*palg>
29to the signature algorithm of B<x>. The values returned are internal
30pointers which B<MUST NOT> be freed up after the call.
31
Dr. Stephen Hensonff7fbfd2015-11-02 11:52:01 +000032X509_get0_tbs_sigalg() returns the signature algorithm in the signed
33portion of B<x>.
34
Dr. Stephen Hensondd332ce2015-09-21 13:03:42 +010035X509_get_signature_nid() returns the NID corresponding to the signature
36algorithm of B<x>.
37
38X509_REQ_get0_signature(), X509_REQ_get_signature_nid()
39X509_CRL_get0_signature() and X509_CRL_get_signature_nid() perform the
40same function for certificate requests and CRLs.
41
42=head1 NOTES
43
44These functions provide lower level access to signatures in certificates
45where an application wishes to analyse or generate a signature in a form
46where X509_sign() et al is not appropriate (for example a non standard
47or unsupported format).
48
49=head1 RETURN VALUES
50
51X509_get_signature_nid(), X509_REQ_get_signature_nid() and
52X509_CRL_get_signature_nid() return a NID.
53
54X509_get0_signature(), X509_REQ_get0_signature() and
55X509_CRL_get0_signature() do not return values.
56
57=head1 SEE ALSO
58
59L<d2i_X509(3)>,
60L<ERR_get_error(3)>,
61L<X509_CRL_get0_by_serial(3)>,
62L<X509_get_ext_d2i(3)>,
63L<X509_get_extension_flags(3)>,
64L<X509_get_pubkey(3)>,
65L<X509_get_subject_name(3)>,
66L<X509_get_version(3)>,
67L<X509_NAME_add_entry_by_txt(3)>,
68L<X509_NAME_ENTRY_get_object(3)>,
69L<X509_NAME_get_index_by_NID(3)>,
70L<X509_NAME_print_ex(3)>,
71L<X509_new(3)>,
72L<X509_sign(3)>,
73L<X509V3_get_d2i(3)>,
74L<X509_verify_cert(3)>
75
76=head1 HISTORY
77
78X509_get0_signature() and X509_get_signature_nid() were first added to
79OpenSSL 1.0.2.
80
81X509_REQ_get0_signature(), X509_REQ_get_signature_nid(),
82X509_CRL_get0_signature() and X509_CRL_get_signature_nid() were first added
83to OpenSSL 1.1.0.
84
85=cut