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/x509v3/v3_pcons.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/x509v3/v3_pcons.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_pcons.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_pcons.c b/src/lib/libcrypto/x509v3/v3_pcons.c index 144ba88e8d..30487a4d18 100644 --- a/src/lib/libcrypto/x509v3/v3_pcons.c +++ b/src/lib/libcrypto/x509v3/v3_pcons.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_pcons.c,v 1.10 2016/12/30 15:54:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_pcons.c,v 1.11 2017/01/29 17:49:23 beck Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project. | 3 | * project. |
4 | */ | 4 | */ |
@@ -150,8 +150,7 @@ v2i_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
150 | int i; | 150 | int i; |
151 | 151 | ||
152 | if (!(pcons = POLICY_CONSTRAINTS_new())) { | 152 | if (!(pcons = POLICY_CONSTRAINTS_new())) { |
153 | X509V3err(X509V3_F_V2I_POLICY_CONSTRAINTS, | 153 | X509V3error(ERR_R_MALLOC_FAILURE); |
154 | ERR_R_MALLOC_FAILURE); | ||
155 | return NULL; | 154 | return NULL; |
156 | } | 155 | } |
157 | for (i = 0; i < sk_CONF_VALUE_num(values); i++) { | 156 | for (i = 0; i < sk_CONF_VALUE_num(values); i++) { |
@@ -163,15 +162,13 @@ v2i_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, | |||
163 | if (!X509V3_get_value_int(val, | 162 | if (!X509V3_get_value_int(val, |
164 | &pcons->inhibitPolicyMapping)) goto err; | 163 | &pcons->inhibitPolicyMapping)) goto err; |
165 | } else { | 164 | } else { |
166 | X509V3err(X509V3_F_V2I_POLICY_CONSTRAINTS, | 165 | X509V3error(X509V3_R_INVALID_NAME); |
167 | X509V3_R_INVALID_NAME); | ||
168 | X509V3_conf_err(val); | 166 | X509V3_conf_err(val); |
169 | goto err; | 167 | goto err; |
170 | } | 168 | } |
171 | } | 169 | } |
172 | if (!pcons->inhibitPolicyMapping && !pcons->requireExplicitPolicy) { | 170 | if (!pcons->inhibitPolicyMapping && !pcons->requireExplicitPolicy) { |
173 | X509V3err(X509V3_F_V2I_POLICY_CONSTRAINTS, | 171 | X509V3error(X509V3_R_ILLEGAL_EMPTY_EXTENSION); |
174 | X509V3_R_ILLEGAL_EMPTY_EXTENSION); | ||
175 | goto err; | 172 | goto err; |
176 | } | 173 | } |
177 | 174 | ||