diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-10-11 21:05:49 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-10-15 15:36:58 +0100 |
commit | 81e4943843773a04067703e0dc1668ec5d3b4cf1 (patch) | |
tree | 50da9cccf023fa8790202e609f931a5092c89aed /crypto/x509/x509_cmp.c | |
parent | 4392479c08392feb4be2ecb9d1b5decc50e32df0 (diff) |
embed certificate serial number and signature fields
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509/x509_cmp.c')
-rw-r--r-- | crypto/x509/x509_cmp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/x509/x509_cmp.c b/crypto/x509/x509_cmp.c index 1e469f92db..4017545b64 100644 --- a/crypto/x509/x509_cmp.c +++ b/crypto/x509/x509_cmp.c @@ -72,7 +72,7 @@ int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b) ai = &a->cert_info; bi = &b->cert_info; - i = ASN1_INTEGER_cmp(ai->serialNumber, bi->serialNumber); + i = ASN1_INTEGER_cmp(&ai->serialNumber, &bi->serialNumber); if (i) return (i); return (X509_NAME_cmp(ai->issuer, bi->issuer)); @@ -94,8 +94,8 @@ unsigned long X509_issuer_and_serial_hash(X509 *a) goto err; OPENSSL_free(f); if (!EVP_DigestUpdate - (&ctx, (unsigned char *)a->cert_info.serialNumber->data, - (unsigned long)a->cert_info.serialNumber->length)) + (&ctx, (unsigned char *)a->cert_info.serialNumber.data, + (unsigned long)a->cert_info.serialNumber.length)) goto err; if (!EVP_DigestFinal_ex(&ctx, &(md[0]), NULL)) goto err; @@ -152,7 +152,7 @@ X509_NAME *X509_get_subject_name(X509 *a) ASN1_INTEGER *X509_get_serialNumber(X509 *a) { - return (a->cert_info.serialNumber); + return &a->cert_info.serialNumber; } unsigned long X509_subject_name_hash(X509 *x) @@ -278,7 +278,7 @@ X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name, if (!sk) return NULL; - x.cert_info.serialNumber = serial; + x.cert_info.serialNumber = *serial; x.cert_info.issuer = name; for (i = 0; i < sk_X509_num(sk); i++) { |