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/asn1/a_i2d_fp.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/asn1/a_i2d_fp.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_i2d_fp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/a_i2d_fp.c b/src/lib/libcrypto/asn1/a_i2d_fp.c index 424068d784..6398978aac 100644 --- a/src/lib/libcrypto/asn1/a_i2d_fp.c +++ b/src/lib/libcrypto/asn1/a_i2d_fp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_i2d_fp.c,v 1.14 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: a_i2d_fp.c,v 1.15 2017/01/29 17:49:22 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 | * |
@@ -71,7 +71,7 @@ ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, void *x) | |||
71 | int ret; | 71 | int ret; |
72 | 72 | ||
73 | if ((b = BIO_new(BIO_s_file())) == NULL) { | 73 | if ((b = BIO_new(BIO_s_file())) == NULL) { |
74 | ASN1err(ASN1_F_ASN1_I2D_FP, ERR_R_BUF_LIB); | 74 | ASN1error(ERR_R_BUF_LIB); |
75 | return (0); | 75 | return (0); |
76 | } | 76 | } |
77 | BIO_set_fp(b, out, BIO_NOCLOSE); | 77 | BIO_set_fp(b, out, BIO_NOCLOSE); |
@@ -90,7 +90,7 @@ ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, unsigned char *x) | |||
90 | n = i2d(x, NULL); | 90 | n = i2d(x, NULL); |
91 | b = malloc(n); | 91 | b = malloc(n); |
92 | if (b == NULL) { | 92 | if (b == NULL) { |
93 | ASN1err(ASN1_F_ASN1_I2D_BIO, ERR_R_MALLOC_FAILURE); | 93 | ASN1error(ERR_R_MALLOC_FAILURE); |
94 | return (0); | 94 | return (0); |
95 | } | 95 | } |
96 | 96 | ||
@@ -121,7 +121,7 @@ ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, void *x) | |||
121 | int ret; | 121 | int ret; |
122 | 122 | ||
123 | if ((b = BIO_new(BIO_s_file())) == NULL) { | 123 | if ((b = BIO_new(BIO_s_file())) == NULL) { |
124 | ASN1err(ASN1_F_ASN1_ITEM_I2D_FP, ERR_R_BUF_LIB); | 124 | ASN1error(ERR_R_BUF_LIB); |
125 | return (0); | 125 | return (0); |
126 | } | 126 | } |
127 | BIO_set_fp(b, out, BIO_NOCLOSE); | 127 | BIO_set_fp(b, out, BIO_NOCLOSE); |
@@ -138,7 +138,7 @@ ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, void *x) | |||
138 | 138 | ||
139 | n = ASN1_item_i2d(x, &b, it); | 139 | n = ASN1_item_i2d(x, &b, it); |
140 | if (b == NULL) { | 140 | if (b == NULL) { |
141 | ASN1err(ASN1_F_ASN1_ITEM_I2D_BIO, ERR_R_MALLOC_FAILURE); | 141 | ASN1error(ERR_R_MALLOC_FAILURE); |
142 | return (0); | 142 | return (0); |
143 | } | 143 | } |
144 | 144 | ||