2015-09-21 20:03:42 +08:00
|
|
|
=pod
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
2015-11-02 19:52:01 +08:00
|
|
|
X509_get0_signature, X509_get_signature_nid, X509_get0_tbs_sigalg,
|
|
|
|
X509_REQ_get0_signature, X509_REQ_get_signature_nid, X509_CRL_get0_signature,
|
2016-06-06 12:43:05 +08:00
|
|
|
X509_CRL_get_signature_nid - signature information
|
2015-09-21 20:03:42 +08:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
#include <openssl/x509.h>
|
|
|
|
|
2016-08-17 21:10:52 +08:00
|
|
|
void X509_get0_signature(const ASN1_BIT_STRING **psig,
|
|
|
|
const X509_ALGOR **palg,
|
2015-09-21 20:03:42 +08:00
|
|
|
const X509 *x);
|
|
|
|
int X509_get_signature_nid(const X509 *x);
|
2016-08-17 20:50:48 +08:00
|
|
|
const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
|
2015-09-21 20:03:42 +08:00
|
|
|
|
2016-08-18 22:13:00 +08:00
|
|
|
void X509_REQ_get0_signature(const X509_REQ *crl,
|
|
|
|
const ASN1_BIT_STRING **psig,
|
|
|
|
const X509_ALGOR **palg);
|
2015-09-21 20:03:42 +08:00
|
|
|
int X509_REQ_get_signature_nid(const X509_REQ *crl);
|
|
|
|
|
2016-08-13 21:44:07 +08:00
|
|
|
void X509_CRL_get0_signature(const X509_CRL *crl,
|
|
|
|
const ASN1_BIT_STRING **psig,
|
|
|
|
const X509_ALGOR **palg);
|
2015-09-21 20:03:42 +08:00
|
|
|
int X509_CRL_get_signature_nid(const X509_CRL *crl);
|
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
|
|
X509_get0_signature() sets B<*psig> to the signature of B<x> and B<*palg>
|
|
|
|
to the signature algorithm of B<x>. The values returned are internal
|
|
|
|
pointers which B<MUST NOT> be freed up after the call.
|
|
|
|
|
2015-11-02 19:52:01 +08:00
|
|
|
X509_get0_tbs_sigalg() returns the signature algorithm in the signed
|
|
|
|
portion of B<x>.
|
|
|
|
|
2015-09-21 20:03:42 +08:00
|
|
|
X509_get_signature_nid() returns the NID corresponding to the signature
|
|
|
|
algorithm of B<x>.
|
|
|
|
|
|
|
|
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<d2i_X509(3)>,
|
|
|
|
L<ERR_get_error(3)>,
|
|
|
|
L<X509_CRL_get0_by_serial(3)>,
|
|
|
|
L<X509_get_ext_d2i(3)>,
|
|
|
|
L<X509_get_extension_flags(3)>,
|
|
|
|
L<X509_get_pubkey(3)>,
|
|
|
|
L<X509_get_subject_name(3)>,
|
|
|
|
L<X509_get_version(3)>,
|
|
|
|
L<X509_NAME_add_entry_by_txt(3)>,
|
|
|
|
L<X509_NAME_ENTRY_get_object(3)>,
|
|
|
|
L<X509_NAME_get_index_by_NID(3)>,
|
|
|
|
L<X509_NAME_print_ex(3)>,
|
|
|
|
L<X509_new(3)>,
|
|
|
|
L<X509_sign(3)>,
|
|
|
|
L<X509V3_get_d2i(3)>,
|
|
|
|
L<X509_verify_cert(3)>
|
|
|
|
|
|
|
|
=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.
|
|
|
|
|
2016-05-18 23:44:05 +08:00
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
|
|
|
Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
|
|
|
|
|
|
|
|
Licensed under the OpenSSL license (the "License"). You may not use
|
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|