summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-05-08 07:55:10 +0000
committertb <>2024-05-08 07:55:10 +0000
commit0d014c6a704c343d00480d53b33fb668cfdb4627 (patch)
treef4f18a17b212b74ee0da6216789ddb8bcfe17dde /src
parenta9aff0951ab0bedf74b7be468c7e31f8d2719ebe (diff)
downloadopenbsd-0d014c6a704c343d00480d53b33fb668cfdb4627.tar.gz
openbsd-0d014c6a704c343d00480d53b33fb668cfdb4627.tar.bz2
openbsd-0d014c6a704c343d00480d53b33fb668cfdb4627.zip
Defang X509_REQ_{s,g}et_extension_nids()
These fiddle with unprotected global state, so aren't thread safe and of course there was no good reason to have this API in the first place. Nothing uses it, so it becomes a noop and will be removed in the next major bump. ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/x509/x509_req.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/lib/libcrypto/x509/x509_req.c b/src/lib/libcrypto/x509/x509_req.c
index 7ed106241a..60e1a074b8 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.33 2023/04/25 09:46:36 job Exp $ */ 1/* $OpenBSD: x509_req.c,v 1.34 2024/05/08 07:55:10 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 *
@@ -194,20 +194,6 @@ X509_REQ_extension_nid(int req_nid)
194} 194}
195LCRYPTO_ALIAS(X509_REQ_extension_nid); 195LCRYPTO_ALIAS(X509_REQ_extension_nid);
196 196
197int *
198X509_REQ_get_extension_nids(void)
199{
200 return ext_nids;
201}
202LCRYPTO_ALIAS(X509_REQ_get_extension_nids);
203
204void
205X509_REQ_set_extension_nids(int *nids)
206{
207 ext_nids = nids;
208}
209LCRYPTO_ALIAS(X509_REQ_set_extension_nids);
210
211STACK_OF(X509_EXTENSION) * 197STACK_OF(X509_EXTENSION) *
212X509_REQ_get_extensions(X509_REQ *req) 198X509_REQ_get_extensions(X509_REQ *req)
213{ 199{
@@ -354,3 +340,22 @@ i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp)
354 return i2d_X509_REQ_INFO(req->req_info, pp); 340 return i2d_X509_REQ_INFO(req->req_info, pp);
355} 341}
356LCRYPTO_ALIAS(i2d_re_X509_REQ_tbs); 342LCRYPTO_ALIAS(i2d_re_X509_REQ_tbs);
343
344/*
345 * XXX - remove the API below in the next major bump
346 */
347
348int *
349X509_REQ_get_extension_nids(void)
350{
351 X509error(ERR_R_DISABLED);
352 return NULL;
353}
354LCRYPTO_ALIAS(X509_REQ_get_extension_nids);
355
356void
357X509_REQ_set_extension_nids(int *nids)
358{
359 X509error(ERR_R_DISABLED);
360}
361LCRYPTO_ALIAS(X509_REQ_set_extension_nids);