summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-08-24 19:59:33 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-08-24 19:59:33 +0000
commitac64d298bccf658003e02506d76c3f34c12c8827 (patch)
treea15b1e1ad27c42323cb6374a9be1ae770419d0d6 /lib/libcrypto
parent722be7fe34e427b176ef68bf955a8b69d604de39 (diff)
Provide X509_get0_serialNumber()
tested in a bulk by sthen ok jsing
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/Symbols.list1
-rw-r--r--lib/libcrypto/x509/x509.h3
-rw-r--r--lib/libcrypto/x509/x509_cmp.c8
3 files changed, 10 insertions, 2 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list
index dc11ea497fc..191e967e345 100644
--- a/lib/libcrypto/Symbols.list
+++ b/lib/libcrypto/Symbols.list
@@ -3016,6 +3016,7 @@ X509_get_ext_d2i
X509_get_issuer_name
X509_get_pubkey
X509_get_pubkey_parameters
+X509_get0_serialNumber
X509_get_serialNumber
X509_get_signature_nid
X509_get_signature_type
diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h
index e6b205b7fce..25af8314b24 100644
--- a/lib/libcrypto/x509/x509.h
+++ b/lib/libcrypto/x509/x509.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.h,v 1.70 2018/08/24 19:55:58 tb Exp $ */
+/* $OpenBSD: x509.h,v 1.71 2018/08/24 19:59:32 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -979,6 +979,7 @@ int X509_set_version(X509 *x, long version);
long X509_get_version(const X509 *x);
int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
ASN1_INTEGER * X509_get_serialNumber(X509 *x);
+const ASN1_INTEGER *X509_get0_serialNumber(const X509 *x);
int X509_set_issuer_name(X509 *x, X509_NAME *name);
X509_NAME * X509_get_issuer_name(const X509 *a);
int X509_set_subject_name(X509 *x, X509_NAME *name);
diff --git a/lib/libcrypto/x509/x509_cmp.c b/lib/libcrypto/x509/x509_cmp.c
index 6819c3b1f7a..2141f871e5e 100644
--- a/lib/libcrypto/x509/x509_cmp.c
+++ b/lib/libcrypto/x509/x509_cmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_cmp.c,v 1.33 2018/05/18 19:24:08 tb Exp $ */
+/* $OpenBSD: x509_cmp.c,v 1.34 2018/08/24 19:59:32 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -176,6 +176,12 @@ X509_get_serialNumber(X509 *a)
return (a->cert_info->serialNumber);
}
+const ASN1_INTEGER *
+X509_get0_serialNumber(const X509 *a)
+{
+ return (a->cert_info->serialNumber);
+}
+
unsigned long
X509_subject_name_hash(X509 *x)
{