diff options
author | tb <> | 2024-05-08 07:55:10 +0000 |
---|---|---|
committer | tb <> | 2024-05-08 07:55:10 +0000 |
commit | 0d014c6a704c343d00480d53b33fb668cfdb4627 (patch) | |
tree | f4f18a17b212b74ee0da6216789ddb8bcfe17dde /src | |
parent | a9aff0951ab0bedf74b7be468c7e31f8d2719ebe (diff) | |
download | openbsd-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.c | 35 |
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 | } |
195 | LCRYPTO_ALIAS(X509_REQ_extension_nid); | 195 | LCRYPTO_ALIAS(X509_REQ_extension_nid); |
196 | 196 | ||
197 | int * | ||
198 | X509_REQ_get_extension_nids(void) | ||
199 | { | ||
200 | return ext_nids; | ||
201 | } | ||
202 | LCRYPTO_ALIAS(X509_REQ_get_extension_nids); | ||
203 | |||
204 | void | ||
205 | X509_REQ_set_extension_nids(int *nids) | ||
206 | { | ||
207 | ext_nids = nids; | ||
208 | } | ||
209 | LCRYPTO_ALIAS(X509_REQ_set_extension_nids); | ||
210 | |||
211 | STACK_OF(X509_EXTENSION) * | 197 | STACK_OF(X509_EXTENSION) * |
212 | X509_REQ_get_extensions(X509_REQ *req) | 198 | X509_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 | } |
356 | LCRYPTO_ALIAS(i2d_re_X509_REQ_tbs); | 342 | LCRYPTO_ALIAS(i2d_re_X509_REQ_tbs); |
343 | |||
344 | /* | ||
345 | * XXX - remove the API below in the next major bump | ||
346 | */ | ||
347 | |||
348 | int * | ||
349 | X509_REQ_get_extension_nids(void) | ||
350 | { | ||
351 | X509error(ERR_R_DISABLED); | ||
352 | return NULL; | ||
353 | } | ||
354 | LCRYPTO_ALIAS(X509_REQ_get_extension_nids); | ||
355 | |||
356 | void | ||
357 | X509_REQ_set_extension_nids(int *nids) | ||
358 | { | ||
359 | X509error(ERR_R_DISABLED); | ||
360 | } | ||
361 | LCRYPTO_ALIAS(X509_REQ_set_extension_nids); | ||