summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509v3/v3_sxnet.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/x509v3/v3_sxnet.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/x509v3/v3_sxnet.c')
-rw-r--r--src/lib/libcrypto/x509v3/v3_sxnet.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_sxnet.c b/src/lib/libcrypto/x509v3/v3_sxnet.c
index c10feed0ef..29976b1d68 100644
--- a/src/lib/libcrypto/x509v3/v3_sxnet.c
+++ b/src/lib/libcrypto/x509v3/v3_sxnet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: v3_sxnet.c,v 1.16 2015/07/29 16:13:49 jsing Exp $ */ 1/* $OpenBSD: v3_sxnet.c,v 1.17 2015/09/30 17:30:16 jsing 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 */
@@ -272,10 +272,10 @@ SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, char *user, int userlen)
272{ 272{
273 ASN1_INTEGER *izone = NULL; 273 ASN1_INTEGER *izone = NULL;
274 274
275 if (!(izone = M_ASN1_INTEGER_new()) || 275 if (!(izone = ASN1_INTEGER_new()) ||
276 !ASN1_INTEGER_set(izone, lzone)) { 276 !ASN1_INTEGER_set(izone, lzone)) {
277 X509V3err(X509V3_F_SXNET_ADD_ID_ULONG, ERR_R_MALLOC_FAILURE); 277 X509V3err(X509V3_F_SXNET_ADD_ID_ULONG, ERR_R_MALLOC_FAILURE);
278 M_ASN1_INTEGER_free(izone); 278 ASN1_INTEGER_free(izone);
279 return 0; 279 return 0;
280 } 280 }
281 return SXNET_add_id_INTEGER(psx, izone, user, userlen); 281 return SXNET_add_id_INTEGER(psx, izone, user, userlen);
@@ -350,7 +350,7 @@ SXNET_get_id_asc(SXNET *sx, char *zone)
350 return NULL; 350 return NULL;
351 } 351 }
352 oct = SXNET_get_id_INTEGER(sx, izone); 352 oct = SXNET_get_id_INTEGER(sx, izone);
353 M_ASN1_INTEGER_free(izone); 353 ASN1_INTEGER_free(izone);
354 return oct; 354 return oct;
355} 355}
356 356
@@ -360,14 +360,14 @@ SXNET_get_id_ulong(SXNET *sx, unsigned long lzone)
360 ASN1_INTEGER *izone = NULL; 360 ASN1_INTEGER *izone = NULL;
361 ASN1_OCTET_STRING *oct; 361 ASN1_OCTET_STRING *oct;
362 362
363 if (!(izone = M_ASN1_INTEGER_new()) || 363 if (!(izone = ASN1_INTEGER_new()) ||
364 !ASN1_INTEGER_set(izone, lzone)) { 364 !ASN1_INTEGER_set(izone, lzone)) {
365 X509V3err(X509V3_F_SXNET_GET_ID_ULONG, ERR_R_MALLOC_FAILURE); 365 X509V3err(X509V3_F_SXNET_GET_ID_ULONG, ERR_R_MALLOC_FAILURE);
366 M_ASN1_INTEGER_free(izone); 366 ASN1_INTEGER_free(izone);
367 return NULL; 367 return NULL;
368 } 368 }
369 oct = SXNET_get_id_INTEGER(sx, izone); 369 oct = SXNET_get_id_INTEGER(sx, izone);
370 M_ASN1_INTEGER_free(izone); 370 ASN1_INTEGER_free(izone);
371 return oct; 371 return oct;
372} 372}
373 373