Refactoring BIO: add wrappers around sockaddr et al
[openssl.git] / doc / crypto / X509_get0_signature.pod
1 =pod
2
3 =head1 NAME
4
5 X509_get0_signature, X509_get_signature_nid, X509_get0_tbs_sigalg,
6 X509_REQ_get0_signature, X509_REQ_get_signature_nid, X509_CRL_get0_signature,
7 X509_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  X509_ALGOR *X509_get0_tbs_sigalg(X509 *x);
17
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
28 X509_get0_signature() sets B<*psig> to the signature of B<x> and B<*palg>
29 to the signature algorithm of B<x>. The values returned are internal
30 pointers which B<MUST NOT> be freed up after the call.
31
32 X509_get0_tbs_sigalg() returns the signature algorithm in the signed
33 portion of B<x>.
34
35 X509_get_signature_nid() returns the NID corresponding to the signature
36 algorithm of B<x>.
37
38 X509_REQ_get0_signature(), X509_REQ_get_signature_nid()
39 X509_CRL_get0_signature() and X509_CRL_get_signature_nid() perform the
40 same function for certificate requests and CRLs.
41
42 =head1 NOTES
43
44 These functions provide lower level access to signatures in certificates
45 where an application wishes to analyse or generate a signature in a form
46 where X509_sign() et al is not appropriate (for example a non standard
47 or unsupported format).
48
49 =head1 RETURN VALUES
50
51 X509_get_signature_nid(), X509_REQ_get_signature_nid() and
52 X509_CRL_get_signature_nid() return a NID.
53
54 X509_get0_signature(), X509_REQ_get0_signature() and
55 X509_CRL_get0_signature() do not return values.
56
57 =head1 SEE ALSO
58
59 L<d2i_X509(3)>,
60 L<ERR_get_error(3)>,
61 L<X509_CRL_get0_by_serial(3)>,
62 L<X509_get_ext_d2i(3)>,
63 L<X509_get_extension_flags(3)>,
64 L<X509_get_pubkey(3)>,
65 L<X509_get_subject_name(3)>,
66 L<X509_get_version(3)>,
67 L<X509_NAME_add_entry_by_txt(3)>,
68 L<X509_NAME_ENTRY_get_object(3)>,
69 L<X509_NAME_get_index_by_NID(3)>,
70 L<X509_NAME_print_ex(3)>,
71 L<X509_new(3)>,
72 L<X509_sign(3)>,
73 L<X509V3_get_d2i(3)>,
74 L<X509_verify_cert(3)>
75
76 =head1 HISTORY
77
78 X509_get0_signature() and X509_get_signature_nid() were first added to
79 OpenSSL 1.0.2.
80
81 X509_REQ_get0_signature(), X509_REQ_get_signature_nid(),
82 X509_CRL_get0_signature() and X509_CRL_get_signature_nid() were first added
83 to OpenSSL 1.1.0.
84
85 =cut