diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-10-11 21:13:42 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-10-15 15:36:58 +0100 |
commit | 34a42e1489bf4f45bfad069eceba56315d4713be (patch) | |
tree | 4760645e956a4a508f52e46cfd51286d3038fe3e /crypto/x509/x509cset.c | |
parent | 81e4943843773a04067703e0dc1668ec5d3b4cf1 (diff) | |
download | openssl-34a42e1489bf4f45bfad069eceba56315d4713be.tar.gz |
embed CRL serial number and signature fields
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509/x509cset.c')
-rw-r--r-- | crypto/x509/x509cset.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c index a779fd4f48..899d4925ae 100644 --- a/crypto/x509/x509cset.c +++ b/crypto/x509/x509cset.c @@ -172,7 +172,7 @@ void X509_CRL_get0_signature(ASN1_BIT_STRING **psig, X509_ALGOR **palg, X509_CRL *crl) { if (psig != NULL) - *psig = crl->signature; + *psig = &crl->signature; if (palg != NULL) *palg = &crl->sig_alg; } @@ -206,7 +206,7 @@ int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) ASN1_INTEGER *X509_REVOKED_get0_serialNumber(X509_REVOKED *x) { - return x->serialNumber; + return &x->serialNumber; } int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial) @@ -215,15 +215,10 @@ int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial) if (x == NULL) return (0); - in = x->serialNumber; - if (in != serial) { - in = ASN1_INTEGER_dup(serial); - if (in != NULL) { - ASN1_INTEGER_free(x->serialNumber); - x->serialNumber = in; - } - } - return (in != NULL); + in = &x->serialNumber; + if (in != serial) + return ASN1_STRING_copy(in, serial); + return 1; } STACK_OF(X509_EXTENSION) *X509_REVOKED_get0_extensions(X509_REVOKED *r) |