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_ia5.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_ia5.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_ia5.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_ia5.c b/src/lib/libcrypto/x509v3/v3_ia5.c index 74b6439346..a92041e691 100644 --- a/src/lib/libcrypto/x509v3/v3_ia5.c +++ b/src/lib/libcrypto/x509v3/v3_ia5.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_ia5.c,v 1.16 2016/12/30 15:54:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_ia5.c,v 1.17 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 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -207,7 +207,7 @@ i2s_ASN1_IA5STRING(X509V3_EXT_METHOD *method, ASN1_IA5STRING *ia5) | |||
207 | if (!ia5 || !ia5->length) | 207 | if (!ia5 || !ia5->length) |
208 | return NULL; | 208 | return NULL; |
209 | if (!(tmp = malloc(ia5->length + 1))) { | 209 | if (!(tmp = malloc(ia5->length + 1))) { |
210 | X509V3err(X509V3_F_I2S_ASN1_IA5STRING, ERR_R_MALLOC_FAILURE); | 210 | X509V3error(ERR_R_MALLOC_FAILURE); |
211 | return NULL; | 211 | return NULL; |
212 | } | 212 | } |
213 | memcpy(tmp, ia5->data, ia5->length); | 213 | memcpy(tmp, ia5->data, ia5->length); |
@@ -220,8 +220,7 @@ s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | |||
220 | { | 220 | { |
221 | ASN1_IA5STRING *ia5; | 221 | ASN1_IA5STRING *ia5; |
222 | if (!str) { | 222 | if (!str) { |
223 | X509V3err(X509V3_F_S2I_ASN1_IA5STRING, | 223 | X509V3error(X509V3_R_INVALID_NULL_ARGUMENT); |
224 | X509V3_R_INVALID_NULL_ARGUMENT); | ||
225 | return NULL; | 224 | return NULL; |
226 | } | 225 | } |
227 | if (!(ia5 = ASN1_IA5STRING_new())) | 226 | if (!(ia5 = ASN1_IA5STRING_new())) |
@@ -234,6 +233,6 @@ s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | |||
234 | return ia5; | 233 | return ia5; |
235 | 234 | ||
236 | err: | 235 | err: |
237 | X509V3err(X509V3_F_S2I_ASN1_IA5STRING, ERR_R_MALLOC_FAILURE); | 236 | X509V3error(ERR_R_MALLOC_FAILURE); |
238 | return NULL; | 237 | return NULL; |
239 | } | 238 | } |