diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-09-07 16:51:05 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-09-22 12:28:45 +0100 |
commit | a9732d04fa4ace9b4d86218e0818c47c68c08d4d (patch) | |
tree | 5073d9abca4ea5bb5a99e6d3063fb26e0ba22118 /crypto/x509/x509cset.c | |
parent | 18cd23df8a8f2edd800182e1ab62111e4b7f1dbe (diff) | |
download | openssl-a9732d04fa4ace9b4d86218e0818c47c68c08d4d.tar.gz |
Add accessors for request and CRL signatures
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Diffstat (limited to 'crypto/x509/x509cset.c')
-rw-r--r-- | crypto/x509/x509cset.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c index 6215cf0123..4dbe6d087f 100644 --- a/crypto/x509/x509cset.c +++ b/crypto/x509/x509cset.c @@ -166,12 +166,17 @@ STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl) void X509_CRL_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, X509_CRL *crl) { - if (psig) + if (psig == NULL) *psig = crl->signature; - if (palg) + if (palg == NULL) *palg = &crl->sig_alg; } +int X509_CRL_get_signature_nid(const X509_CRL *crl) +{ + return OBJ_obj2nid(crl->sig_alg.algorithm); +} + int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) { ASN1_TIME *in; @@ -205,3 +210,9 @@ int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial) } return (in != NULL); } + +int i2d_re_X509_CRL_tbs(X509_CRL *crl, unsigned char **pp) +{ + crl->crl.enc.modified = 1; + return i2d_X509_CRL_INFO(&crl->crl, pp); +} |