Fix some doc nits.
[oweals/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(const ASN1_BIT_STRING **psig,
14                           const X509_ALGOR **palg,
15                           const X509 *x);
16  int X509_get_signature_nid(const X509 *x);
17  const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
18
19  void X509_REQ_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg,
20                               const X509_REQ *crl);
21  int X509_REQ_get_signature_nid(const X509_REQ *crl);
22
23  void X509_CRL_get0_signature(const X509_CRL *crl,
24                               const ASN1_BIT_STRING **psig,
25                               const X509_ALGOR **palg);
26  int X509_CRL_get_signature_nid(const X509_CRL *crl);
27
28 =head1 DESCRIPTION
29
30 X509_get0_signature() sets B<*psig> to the signature of B<x> and B<*palg>
31 to the signature algorithm of B<x>. The values returned are internal
32 pointers which B<MUST NOT> be freed up after the call.
33
34 X509_get0_tbs_sigalg() returns the signature algorithm in the signed
35 portion of B<x>.
36
37 X509_get_signature_nid() returns the NID corresponding to the signature
38 algorithm of B<x>.
39
40 X509_REQ_get0_signature(), X509_REQ_get_signature_nid()
41 X509_CRL_get0_signature() and X509_CRL_get_signature_nid() perform the
42 same function for certificate requests and CRLs.
43
44 =head1 NOTES
45
46 These functions provide lower level access to signatures in certificates
47 where an application wishes to analyse or generate a signature in a form
48 where X509_sign() et al is not appropriate (for example a non standard
49 or unsupported format).
50
51 =head1 RETURN VALUES
52
53 X509_get_signature_nid(), X509_REQ_get_signature_nid() and
54 X509_CRL_get_signature_nid() return a NID.
55
56 X509_get0_signature(), X509_REQ_get0_signature() and
57 X509_CRL_get0_signature() do not return values.
58
59 =head1 SEE ALSO
60
61 L<d2i_X509(3)>,
62 L<ERR_get_error(3)>,
63 L<X509_CRL_get0_by_serial(3)>,
64 L<X509_get_ext_d2i(3)>,
65 L<X509_get_extension_flags(3)>,
66 L<X509_get_pubkey(3)>,
67 L<X509_get_subject_name(3)>,
68 L<X509_get_version(3)>,
69 L<X509_NAME_add_entry_by_txt(3)>,
70 L<X509_NAME_ENTRY_get_object(3)>,
71 L<X509_NAME_get_index_by_NID(3)>,
72 L<X509_NAME_print_ex(3)>,
73 L<X509_new(3)>,
74 L<X509_sign(3)>,
75 L<X509V3_get_d2i(3)>,
76 L<X509_verify_cert(3)>
77
78 =head1 HISTORY
79
80 X509_get0_signature() and X509_get_signature_nid() were first added to
81 OpenSSL 1.0.2.
82
83 X509_REQ_get0_signature(), X509_REQ_get_signature_nid(),
84 X509_CRL_get0_signature() and X509_CRL_get_signature_nid() were first added
85 to OpenSSL 1.1.0.
86
87 =head1 COPYRIGHT
88
89 Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
90
91 Licensed under the OpenSSL license (the "License").  You may not use
92 this file except in compliance with the License.  You can obtain a copy
93 in the file LICENSE in the source distribution or at
94 L<https://www.openssl.org/source/license.html>.
95
96 =cut