summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_bytes.c
diff options
context:
space:
mode:
authorbeck <>2017-01-29 17:49:23 +0000
committerbeck <>2017-01-29 17:49:23 +0000
commit957b11334a7afb14537322f0e4795b2e368b3f59 (patch)
tree1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/asn1/a_bytes.c
parentdf96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff)
downloadopenbsd-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_bytes.c')
-rw-r--r--src/lib/libcrypto/asn1/a_bytes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/a_bytes.c b/src/lib/libcrypto/asn1/a_bytes.c
index 727ad3ed9b..f3fe234851 100644
--- a/src/lib/libcrypto/asn1/a_bytes.c
+++ b/src/lib/libcrypto/asn1/a_bytes.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_bytes.c,v 1.18 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: a_bytes.c,v 1.19 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 *
@@ -123,7 +123,7 @@ d2i_ASN1_type_bytes(ASN1_STRING **a, const unsigned char **pp,
123 return (ret); 123 return (ret);
124 124
125err: 125err:
126 ASN1err(ASN1_F_D2I_ASN1_TYPE_BYTES, i); 126 ASN1error(i);
127 if (a == NULL || *a != ret) 127 if (a == NULL || *a != ret)
128 ASN1_STRING_free(ret); 128 ASN1_STRING_free(ret);
129 return (NULL); 129 return (NULL);
@@ -235,7 +235,7 @@ d2i_ASN1_bytes(ASN1_STRING **a, const unsigned char **pp,
235err: 235err:
236 if (a == NULL || *a != ret) 236 if (a == NULL || *a != ret)
237 ASN1_STRING_free(ret); 237 ASN1_STRING_free(ret);
238 ASN1err(ASN1_F_D2I_ASN1_BYTES, i); 238 ASN1error(i);
239 return (NULL); 239 return (NULL);
240} 240}
241 241
@@ -299,7 +299,7 @@ asn1_collate_primitive(ASN1_STRING *a, ASN1_const_CTX *c)
299 return (1); 299 return (1);
300 300
301err: 301err:
302 ASN1err(ASN1_F_ASN1_COLLATE_PRIMITIVE, c->error); 302 ASN1error(c->error);
303 ASN1_STRING_free(os); 303 ASN1_STRING_free(os);
304 free(b.data); 304 free(b.data);
305 return (0); 305 return (0);