summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2018-02-14 16:18:11 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2018-02-14 16:18:11 +0000
commitfee4f9d08038b9d5c8d4c8f3b6027b744fa53a9d (patch)
tree1388be32f5e1ee9bdc082fcfff6711a2cd3a6e75 /lib
parent0994a5a76d86ffdf2c30a898425a4916d4afde12 (diff)
Provide X509_get_signature_nid().
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/Symbols.list21
-rw-r--r--lib/libcrypto/asn1/x_x509.c8
-rw-r--r--lib/libcrypto/x509/x509.h4
3 files changed, 21 insertions, 12 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list
index 239b106ae3b..6dfd569e1fd 100644
--- a/lib/libcrypto/Symbols.list
+++ b/lib/libcrypto/Symbols.list
@@ -2800,32 +2800,32 @@ X509_VAL_it
X509_VAL_new
X509_VERIFY_PARAM_add0_policy
X509_VERIFY_PARAM_add0_table
+X509_VERIFY_PARAM_add1_host
X509_VERIFY_PARAM_clear_flags
X509_VERIFY_PARAM_free
+X509_VERIFY_PARAM_get0
+X509_VERIFY_PARAM_get0_name
+X509_VERIFY_PARAM_get0_peername
+X509_VERIFY_PARAM_get_count
X509_VERIFY_PARAM_get_depth
X509_VERIFY_PARAM_get_flags
X509_VERIFY_PARAM_inherit
X509_VERIFY_PARAM_lookup
X509_VERIFY_PARAM_new
X509_VERIFY_PARAM_set1
+X509_VERIFY_PARAM_set1_email
+X509_VERIFY_PARAM_set1_host
+X509_VERIFY_PARAM_set1_ip
+X509_VERIFY_PARAM_set1_ip_asc
X509_VERIFY_PARAM_set1_name
X509_VERIFY_PARAM_set1_policies
X509_VERIFY_PARAM_set_depth
X509_VERIFY_PARAM_set_flags
+X509_VERIFY_PARAM_set_hostflags
X509_VERIFY_PARAM_set_purpose
X509_VERIFY_PARAM_set_time
X509_VERIFY_PARAM_set_trust
X509_VERIFY_PARAM_table_cleanup
-X509_VERIFY_PARAM_set1_host
-X509_VERIFY_PARAM_add1_host
-X509_VERIFY_PARAM_set_hostflags
-X509_VERIFY_PARAM_get0_peername
-X509_VERIFY_PARAM_set1_email
-X509_VERIFY_PARAM_set1_ip
-X509_VERIFY_PARAM_set1_ip_asc
-X509_VERIFY_PARAM_get0_name
-X509_VERIFY_PARAM_get0
-X509_VERIFY_PARAM_get_count
X509_add1_ext_i2d
X509_add1_reject_object
X509_add1_trust_object
@@ -2874,6 +2874,7 @@ X509_get_issuer_name
X509_get_pubkey
X509_get_pubkey_parameters
X509_get_serialNumber
+X509_get_signature_nid
X509_get_subject_name
X509_gmtime_adj
X509_issuer_and_serial_cmp
diff --git a/lib/libcrypto/asn1/x_x509.c b/lib/libcrypto/asn1/x_x509.c
index 168c2c0fcd5..c82301a8917 100644
--- a/lib/libcrypto/asn1/x_x509.c
+++ b/lib/libcrypto/asn1/x_x509.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_x509.c,v 1.24 2015/03/19 14:00:22 tedu Exp $ */
+/* $OpenBSD: x_x509.c,v 1.25 2018/02/14 16:18:10 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -344,3 +344,9 @@ i2d_X509_AUX(X509 *a, unsigned char **pp)
length += i2d_X509_CERT_AUX(a->aux, pp);
return length;
}
+
+int
+X509_get_signature_nid(const X509 *x)
+{
+ return OBJ_obj2nid(x->sig_alg->algorithm);
+}
diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h
index 056b6d118cb..cda89ac5afb 100644
--- a/lib/libcrypto/x509/x509.h
+++ b/lib/libcrypto/x509/x509.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.h,v 1.26 2016/12/27 16:05:57 jsing Exp $ */
+/* $OpenBSD: x509.h,v 1.27 2018/02/14 16:18:10 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -888,6 +888,8 @@ void *X509_get_ex_data(X509 *r, int idx);
int i2d_X509_AUX(X509 *a,unsigned char **pp);
X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length);
+int X509_get_signature_nid(const X509 *x);
+
int X509_alias_set1(X509 *x, unsigned char *name, int len);
int X509_keyid_set1(X509 *x, unsigned char *id, int len);
unsigned char * X509_alias_get0(X509 *x, int *len);