diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-06-13 13:08:12 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-06-13 13:08:12 +0000 |
commit | dfcf48f499f19fd17a3aee03151ea301814ea6ec (patch) | |
tree | c7fe09cbfb9522c42ab19e74ae1e50009f16e676 /crypto/asn1/x_x509.c | |
parent | 0bf8f110e0b6ef6161183bfeec18fc6a2d6945e7 (diff) | |
download | openssl-dfcf48f499f19fd17a3aee03151ea301814ea6ec.tar.gz |
New functions to retrieve certificate signatures and signature OID NID.
Diffstat (limited to 'crypto/asn1/x_x509.c')
-rw-r--r-- | crypto/asn1/x_x509.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/asn1/x_x509.c b/crypto/asn1/x_x509.c index de3df9eb51..fd5e6c6428 100644 --- a/crypto/asn1/x_x509.c +++ b/crypto/asn1/x_x509.c @@ -192,3 +192,17 @@ int i2d_X509_AUX(X509 *a, unsigned char **pp) if(a) length += i2d_X509_CERT_AUX(a->aux, pp); return length; } + +void X509_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, + const X509 *x) + { + if (psig) + *psig = x->signature; + if (palg) + *palg = x->sig_alg; + } + +int X509_get_signature_nid(const X509 *x) + { + return OBJ_obj2nid(x->sig_alg->algorithm); + } |