diff options
author | beck <> | 2017-01-29 17:49:23 +0000 |
---|---|---|
committer | beck <> | 2017-01-29 17:49:23 +0000 |
commit | 957b11334a7afb14537322f0e4795b2e368b3f59 (patch) | |
tree | 1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/x509/x509_v3.c | |
parent | df96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff) | |
download | openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2 openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.zip |
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_v3.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_v3.c | 12 |
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 | ||
183 | err: | 183 | err: |
184 | X509err(X509_F_X509V3_ADD_EXT, ERR_R_MALLOC_FAILURE); | 184 | X509error(ERR_R_MALLOC_FAILURE); |
185 | err2: | 185 | err2: |
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 |