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