summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509cset.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-10-11 22:13:42 +0200
committerDr. Stephen Henson <steve@openssl.org>2015-10-15 16:36:58 +0200
commit34a42e1489bf4f45bfad069eceba56315d4713be (patch)
tree4760645e956a4a508f52e46cfd51286d3038fe3e /crypto/x509/x509cset.c
parentembed certificate serial number and signature fields (diff)
downloadopenssl-34a42e1489bf4f45bfad069eceba56315d4713be.tar.xz
openssl-34a42e1489bf4f45bfad069eceba56315d4713be.zip
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.c17
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)