summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_v3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509/x509_v3.c')
-rw-r--r--src/lib/libcrypto/x509/x509_v3.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/libcrypto/x509/x509_v3.c b/src/lib/libcrypto/x509/x509_v3.c
index d9ec9c8c14..446ef319f8 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.13 2016/03/21 04:05:33 mmcc Exp $ */ 1/* $OpenBSD: x509_v3.c,v 1.14 2017/01/29 17:49:23 beck 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 *
@@ -156,7 +156,7 @@ X509v3_add_ext(STACK_OF(X509_EXTENSION) **x, X509_EXTENSION *ex, int loc)
156 STACK_OF(X509_EXTENSION) *sk = NULL; 156 STACK_OF(X509_EXTENSION) *sk = NULL;
157 157
158 if (x == NULL) { 158 if (x == NULL) {
159 X509err(X509_F_X509V3_ADD_EXT, ERR_R_PASSED_NULL_PARAMETER); 159 X509error(ERR_R_PASSED_NULL_PARAMETER);
160 goto err2; 160 goto err2;
161 } 161 }
162 162
@@ -181,7 +181,7 @@ X509v3_add_ext(STACK_OF(X509_EXTENSION) **x, X509_EXTENSION *ex, int loc)
181 return (sk); 181 return (sk);
182 182
183err: 183err:
184 X509err(X509_F_X509V3_ADD_EXT, ERR_R_MALLOC_FAILURE); 184 X509error(ERR_R_MALLOC_FAILURE);
185err2: 185err2:
186 if (new_ex != NULL) 186 if (new_ex != NULL)
187 X509_EXTENSION_free(new_ex); 187 X509_EXTENSION_free(new_ex);
@@ -199,8 +199,7 @@ X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, int nid, int crit,
199 199
200 obj = OBJ_nid2obj(nid); 200 obj = OBJ_nid2obj(nid);
201 if (obj == NULL) { 201 if (obj == NULL) {
202 X509err(X509_F_X509_EXTENSION_CREATE_BY_NID, 202 X509error(X509_R_UNKNOWN_NID);
203 X509_R_UNKNOWN_NID);
204 return (NULL); 203 return (NULL);
205 } 204 }
206 ret = X509_EXTENSION_create_by_OBJ(ex, obj, crit, data); 205 ret = X509_EXTENSION_create_by_OBJ(ex, obj, crit, data);
@@ -217,8 +216,7 @@ X509_EXTENSION_create_by_OBJ(X509_EXTENSION **ex, ASN1_OBJECT *obj, int crit,
217 216
218 if ((ex == NULL) || (*ex == NULL)) { 217 if ((ex == NULL) || (*ex == NULL)) {
219 if ((ret = X509_EXTENSION_new()) == NULL) { 218 if ((ret = X509_EXTENSION_new()) == NULL) {
220 X509err(X509_F_X509_EXTENSION_CREATE_BY_OBJ, 219 X509error(ERR_R_MALLOC_FAILURE);
221 ERR_R_MALLOC_FAILURE);
222 return (NULL); 220 return (NULL);
223 } 221 }
224 } else 222 } else