summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_int.c
diff options
context:
space:
mode:
authorjsing <>2015-09-30 17:30:16 +0000
committerjsing <>2015-09-30 17:30:16 +0000
commit1c7e31c2bbb07475f068a459f144cb492d148ec2 (patch)
treebd42964b2b7e65328abe72ae9a01fed5d43e31bd /src/lib/libcrypto/asn1/a_int.c
parent91af0933b080d8e84e238dd366f91808c0cdaae3 (diff)
downloadopenbsd-1c7e31c2bbb07475f068a459f144cb492d148ec2.tar.gz
openbsd-1c7e31c2bbb07475f068a459f144cb492d148ec2.tar.bz2
openbsd-1c7e31c2bbb07475f068a459f144cb492d148ec2.zip
Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this is
different from the macro expansion, but the result is the same. Also replace some ASN1_STRING_dup() with ASN1_INTEGER_dup(). ok beck@ doug@
Diffstat (limited to 'src/lib/libcrypto/asn1/a_int.c')
-rw-r--r--src/lib/libcrypto/asn1/a_int.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/a_int.c b/src/lib/libcrypto/asn1/a_int.c
index cbe68ec6d8..5c0103ba36 100644
--- a/src/lib/libcrypto/asn1/a_int.c
+++ b/src/lib/libcrypto/asn1/a_int.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_int.c,v 1.29 2015/09/30 17:04:09 jsing Exp $ */ 1/* $OpenBSD: a_int.c,v 1.30 2015/09/30 17:30:15 jsing 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 *
@@ -196,7 +196,7 @@ c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp, long len)
196 int i; 196 int i;
197 197
198 if ((a == NULL) || ((*a) == NULL)) { 198 if ((a == NULL) || ((*a) == NULL)) {
199 if ((ret = M_ASN1_INTEGER_new()) == NULL) 199 if ((ret = ASN1_INTEGER_new()) == NULL)
200 return (NULL); 200 return (NULL);
201 } else 201 } else
202 ret = (*a); 202 ret = (*a);
@@ -268,7 +268,7 @@ c2i_ASN1_INTEGER(ASN1_INTEGER **a, const unsigned char **pp, long len)
268err: 268err:
269 ASN1err(ASN1_F_C2I_ASN1_INTEGER, i); 269 ASN1err(ASN1_F_C2I_ASN1_INTEGER, i);
270 if (a == NULL || *a != ret) 270 if (a == NULL || *a != ret)
271 M_ASN1_INTEGER_free(ret); 271 ASN1_INTEGER_free(ret);
272 return (NULL); 272 return (NULL);
273} 273}
274 274
@@ -289,7 +289,7 @@ d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, long length)
289 int i; 289 int i;
290 290
291 if ((a == NULL) || ((*a) == NULL)) { 291 if ((a == NULL) || ((*a) == NULL)) {
292 if ((ret = M_ASN1_INTEGER_new()) == NULL) 292 if ((ret = ASN1_INTEGER_new()) == NULL)
293 return (NULL); 293 return (NULL);
294 } else 294 } else
295 ret = (*a); 295 ret = (*a);
@@ -334,7 +334,7 @@ d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp, long length)
334err: 334err:
335 ASN1err(ASN1_F_D2I_ASN1_UINTEGER, i); 335 ASN1err(ASN1_F_D2I_ASN1_UINTEGER, i);
336 if (a == NULL || *a != ret) 336 if (a == NULL || *a != ret)
337 M_ASN1_INTEGER_free(ret); 337 ASN1_INTEGER_free(ret);
338 return (NULL); 338 return (NULL);
339} 339}
340 340
@@ -412,7 +412,7 @@ BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai)
412 int len, j; 412 int len, j;
413 413
414 if (ai == NULL) 414 if (ai == NULL)
415 ret = M_ASN1_INTEGER_new(); 415 ret = ASN1_INTEGER_new();
416 else 416 else
417 ret = ai; 417 ret = ai;
418 if (ret == NULL) { 418 if (ret == NULL) {
@@ -444,7 +444,7 @@ BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai)
444 444
445err: 445err:
446 if (ret != ai) 446 if (ret != ai)
447 M_ASN1_INTEGER_free(ret); 447 ASN1_INTEGER_free(ret);
448 return (NULL); 448 return (NULL);
449} 449}
450 450