summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_req.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/x509/x509_req.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_req.c b/src/lib/libcrypto/x509/x509_req.c
index b44306b00d..fe20b1c70d 100644
--- a/src/lib/libcrypto/x509/x509_req.c
+++ b/src/lib/libcrypto/x509/x509_req.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_req.c,v 1.21 2018/05/13 06:48:00 tb Exp $ */ 1/* $OpenBSD: x509_req.c,v 1.22 2021/10/22 16:42:13 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -121,6 +121,14 @@ X509_REQ_get_pubkey(X509_REQ *req)
121 return (X509_PUBKEY_get(req->req_info->pubkey)); 121 return (X509_PUBKEY_get(req->req_info->pubkey));
122} 122}
123 123
124EVP_PKEY *
125X509_REQ_get0_pubkey(X509_REQ *req)
126{
127 if (req == NULL || req->req_info == NULL)
128 return NULL;
129 return X509_PUBKEY_get0(req->req_info->pubkey);
130}
131
124int 132int
125X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k) 133X509_REQ_check_private_key(X509_REQ *x, EVP_PKEY *k)
126{ 134{