summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2018-02-22 17:09:29 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2018-02-22 17:09:29 +0000
commit49dec6892a2b3cde0817a47d1f8c589bb2fe62af (patch)
tree934601475d54bb32f895982a57dc3f24ddd0ed57 /lib
parentb04538640f71a870a948e9323fb6b4fdc4567c80 (diff)
Provide X509_get0_tbs_sigalg().
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/Symbols.list1
-rw-r--r--lib/libcrypto/x509/x509.h5
-rw-r--r--lib/libcrypto/x509/x509_set.c8
3 files changed, 11 insertions, 3 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list
index c4daf0e7680..fe4c0d1c4ed 100644
--- a/lib/libcrypto/Symbols.list
+++ b/lib/libcrypto/Symbols.list
@@ -2958,6 +2958,7 @@ X509_get0_notBefore
X509_get0_pubkey
X509_get0_pubkey_bitstr
X509_get0_signature
+X509_get0_tbs_sigalg
X509_get1_email
X509_get1_ocsp
X509_get_default_cert_area
diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h
index cfa08b41b1b..92f012ea6d2 100644
--- a/lib/libcrypto/x509/x509.h
+++ b/lib/libcrypto/x509/x509.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.h,v 1.39 2018/02/22 17:06:42 jsing Exp $ */
+/* $OpenBSD: x509.h,v 1.40 2018/02/22 17:09:28 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -979,7 +979,8 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
#endif
const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x);
-int X509_set_version(X509 *x,long version);
+const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
+int X509_set_version(X509 *x, long version);
int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
ASN1_INTEGER * X509_get_serialNumber(X509 *x);
int X509_set_issuer_name(X509 *x, X509_NAME *name);
diff --git a/lib/libcrypto/x509/x509_set.c b/lib/libcrypto/x509/x509_set.c
index 06ff12c1467..becdaf6ce5b 100644
--- a/lib/libcrypto/x509/x509_set.c
+++ b/lib/libcrypto/x509/x509_set.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_set.c,v 1.15 2018/02/22 17:06:42 jsing Exp $ */
+/* $OpenBSD: x509_set.c,v 1.16 2018/02/22 17:09:28 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -69,6 +69,12 @@ X509_get0_extensions(const X509 *x)
return x->cert_info->extensions;
}
+const X509_ALGOR *
+X509_get0_tbs_sigalg(const X509 *x)
+{
+ return x->cert_info->signature;
+}
+
int
X509_set_version(X509 *x, long version)
{