summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/asn1/x_req.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2018-02-20 17:06:19 +0000
committerjsing <jsing@openbsd.org>2018-02-20 17:06:19 +0000
commit2b65c176cd085e0f59d8b374162e97575ef2185e (patch)
tree90cae9499c2ad866d6cbed33c91807faec3929b5 /lib/libcrypto/asn1/x_req.c
parentProvide X509_CRL_get0_{last,next}Update() and X509_CRL_get0_signature(). (diff)
downloadwireguard-openbsd-2b65c176cd085e0f59d8b374162e97575ef2185e.tar.xz
wireguard-openbsd-2b65c176cd085e0f59d8b374162e97575ef2185e.zip
Provide X509_REQ_get0_signature()
Diffstat (limited to 'lib/libcrypto/asn1/x_req.c')
-rw-r--r--lib/libcrypto/asn1/x_req.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libcrypto/asn1/x_req.c b/lib/libcrypto/asn1/x_req.c
index 5ffa11e2ddf..38a6ec885cf 100644
--- a/lib/libcrypto/asn1/x_req.c
+++ b/lib/libcrypto/asn1/x_req.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_req.c,v 1.15 2015/02/11 04:00:39 jsing Exp $ */
+/* $OpenBSD: x_req.c,v 1.16 2018/02/20 17:06:19 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -225,3 +225,13 @@ X509_REQ_dup(X509_REQ *x)
{
return ASN1_item_dup(&X509_REQ_it, x);
}
+
+void
+X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
+ const X509_ALGOR **palg)
+{
+ if (psig != NULL)
+ *psig = req->signature;
+ if (palg != NULL)
+ *palg = req->sig_alg;
+}