diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/x509/x509_v3.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/libcrypto/x509/x509_v3.c b/src/lib/libcrypto/x509/x509_v3.c index b0a30db2e8..76e9777c25 100644 --- a/src/lib/libcrypto/x509/x509_v3.c +++ b/src/lib/libcrypto/x509/x509_v3.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_v3.c,v 1.34 2024/07/12 08:58:59 tb Exp $ */ | 1 | /* $OpenBSD: x509_v3.c,v 1.35 2024/07/12 09:25:43 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 | * |
@@ -188,18 +188,14 @@ X509_EXTENSION * | |||
188 | X509_EXTENSION_create_by_NID(X509_EXTENSION **ext, int nid, int crit, | 188 | X509_EXTENSION_create_by_NID(X509_EXTENSION **ext, int nid, int crit, |
189 | ASN1_OCTET_STRING *data) | 189 | ASN1_OCTET_STRING *data) |
190 | { | 190 | { |
191 | ASN1_OBJECT *obj; | 191 | const ASN1_OBJECT *obj; |
192 | X509_EXTENSION *ret; | ||
193 | 192 | ||
194 | obj = OBJ_nid2obj(nid); | 193 | if ((obj = OBJ_nid2obj(nid)) == NULL) { |
195 | if (obj == NULL) { | ||
196 | X509error(X509_R_UNKNOWN_NID); | 194 | X509error(X509_R_UNKNOWN_NID); |
197 | return NULL; | 195 | return NULL; |
198 | } | 196 | } |
199 | ret = X509_EXTENSION_create_by_OBJ(ext, obj, crit, data); | 197 | |
200 | if (ret == NULL) | 198 | return X509_EXTENSION_create_by_OBJ(ext, obj, crit, data); |
201 | ASN1_OBJECT_free(obj); | ||
202 | return ret; | ||
203 | } | 199 | } |
204 | LCRYPTO_ALIAS(X509_EXTENSION_create_by_NID); | 200 | LCRYPTO_ALIAS(X509_EXTENSION_create_by_NID); |
205 | 201 | ||