summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1
diff options
context:
space:
mode:
authorjsing <>2015-09-30 18:41:06 +0000
committerjsing <>2015-09-30 18:41:06 +0000
commitbfadb4881fd0184be7b44bec090d8c18a238fd40 (patch)
tree90db6850a94839986c4ccd8ae4e62b0c6926d5f3 /src/lib/libcrypto/asn1
parent05e5d9a5bb40624d103cbce35faadc1092d0662f (diff)
downloadopenbsd-bfadb4881fd0184be7b44bec090d8c18a238fd40.tar.gz
openbsd-bfadb4881fd0184be7b44bec090d8c18a238fd40.tar.bz2
openbsd-bfadb4881fd0184be7b44bec090d8c18a238fd40.zip
Replace M_ASN1_OCTET_STRING_(free|new) with ASN1_OCTET_STRING_(free|new).
Diffstat (limited to 'src/lib/libcrypto/asn1')
-rw-r--r--src/lib/libcrypto/asn1/asn1_par.c6
-rw-r--r--src/lib/libcrypto/asn1/evp_asn1.c8
-rw-r--r--src/lib/libcrypto/asn1/p5_pbev2.c4
-rw-r--r--src/lib/libcrypto/asn1/x_pkey.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libcrypto/asn1/asn1_par.c b/src/lib/libcrypto/asn1/asn1_par.c
index 9057185e74..aaf8decd6c 100644
--- a/src/lib/libcrypto/asn1/asn1_par.c
+++ b/src/lib/libcrypto/asn1/asn1_par.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_par.c,v 1.23 2015/09/30 17:30:15 jsing Exp $ */ 1/* $OpenBSD: asn1_par.c,v 1.24 2015/09/30 18:41:06 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 *
@@ -286,7 +286,7 @@ asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offset,
286 nl = 1; 286 nl = 1;
287 } 287 }
288 } 288 }
289 M_ASN1_OCTET_STRING_free(os); 289 ASN1_OCTET_STRING_free(os);
290 os = NULL; 290 os = NULL;
291 } else if (tag == V_ASN1_INTEGER) { 291 } else if (tag == V_ASN1_INTEGER) {
292 ASN1_INTEGER *bs; 292 ASN1_INTEGER *bs;
@@ -369,7 +369,7 @@ asn1_parse2(BIO *bp, const unsigned char **pp, long length, int offset,
369end: 369end:
370 if (o != NULL) 370 if (o != NULL)
371 ASN1_OBJECT_free(o); 371 ASN1_OBJECT_free(o);
372 M_ASN1_OCTET_STRING_free(os); 372 ASN1_OCTET_STRING_free(os);
373 *pp = p; 373 *pp = p;
374 return (ret); 374 return (ret);
375} 375}
diff --git a/src/lib/libcrypto/asn1/evp_asn1.c b/src/lib/libcrypto/asn1/evp_asn1.c
index e5fcf26030..66f89c8b98 100644
--- a/src/lib/libcrypto/asn1/evp_asn1.c
+++ b/src/lib/libcrypto/asn1/evp_asn1.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_asn1.c,v 1.16 2015/09/30 17:30:15 jsing Exp $ */ 1/* $OpenBSD: evp_asn1.c,v 1.17 2015/09/30 18:41:06 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 *
@@ -68,10 +68,10 @@ ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len)
68{ 68{
69 ASN1_STRING *os; 69 ASN1_STRING *os;
70 70
71 if ((os = M_ASN1_OCTET_STRING_new()) == NULL) 71 if ((os = ASN1_OCTET_STRING_new()) == NULL)
72 return (0); 72 return (0);
73 if (!ASN1_STRING_set(os, data, len)) { 73 if (!ASN1_STRING_set(os, data, len)) {
74 M_ASN1_OCTET_STRING_free(os); 74 ASN1_OCTET_STRING_free(os);
75 return (0); 75 return (0);
76 } 76 }
77 ASN1_TYPE_set(a, V_ASN1_OCTET_STRING, os); 77 ASN1_TYPE_set(a, V_ASN1_OCTET_STRING, os);
@@ -193,7 +193,7 @@ err:
193 ASN1err(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING, 193 ASN1err(ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING,
194 ASN1_R_DATA_IS_WRONG); 194 ASN1_R_DATA_IS_WRONG);
195 } 195 }
196 M_ASN1_OCTET_STRING_free(os); 196 ASN1_OCTET_STRING_free(os);
197 ASN1_INTEGER_free(ai); 197 ASN1_INTEGER_free(ai);
198 return (ret); 198 return (ret);
199} 199}
diff --git a/src/lib/libcrypto/asn1/p5_pbev2.c b/src/lib/libcrypto/asn1/p5_pbev2.c
index 0a6d18d154..9be7e0205c 100644
--- a/src/lib/libcrypto/asn1/p5_pbev2.c
+++ b/src/lib/libcrypto/asn1/p5_pbev2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p5_pbev2.c,v 1.22 2015/09/30 17:30:15 jsing Exp $ */ 1/* $OpenBSD: p5_pbev2.c,v 1.23 2015/09/30 18:41:06 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-2004. 3 * project 1999-2004.
4 */ 4 */
@@ -303,7 +303,7 @@ PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, int prf_nid,
303 303
304 if (!(kdf = PBKDF2PARAM_new())) 304 if (!(kdf = PBKDF2PARAM_new()))
305 goto merr; 305 goto merr;
306 if (!(osalt = M_ASN1_OCTET_STRING_new())) 306 if (!(osalt = ASN1_OCTET_STRING_new()))
307 goto merr; 307 goto merr;
308 308
309 kdf->salt->value.octet_string = osalt; 309 kdf->salt->value.octet_string = osalt;
diff --git a/src/lib/libcrypto/asn1/x_pkey.c b/src/lib/libcrypto/asn1/x_pkey.c
index 28e79858b5..701db0fc6d 100644
--- a/src/lib/libcrypto/asn1/x_pkey.c
+++ b/src/lib/libcrypto/asn1/x_pkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x_pkey.c,v 1.18 2015/07/27 12:53:56 jsing Exp $ */ 1/* $OpenBSD: x_pkey.c,v 1.19 2015/09/30 18:41:06 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 *
@@ -78,7 +78,7 @@ X509_PKEY_new(void)
78 ASN1err(ASN1_F_X509_PKEY_NEW, ERR_R_MALLOC_FAILURE); 78 ASN1err(ASN1_F_X509_PKEY_NEW, ERR_R_MALLOC_FAILURE);
79 goto err; 79 goto err;
80 } 80 }
81 if ((ret->enc_pkey = M_ASN1_OCTET_STRING_new()) == NULL) { 81 if ((ret->enc_pkey = ASN1_OCTET_STRING_new()) == NULL) {
82 ASN1err(ASN1_F_X509_PKEY_NEW, ERR_R_MALLOC_FAILURE); 82 ASN1err(ASN1_F_X509_PKEY_NEW, ERR_R_MALLOC_FAILURE);
83 goto err; 83 goto err;
84 } 84 }
@@ -113,7 +113,7 @@ X509_PKEY_free(X509_PKEY *x)
113 113
114 if (x->enc_algor != NULL) 114 if (x->enc_algor != NULL)
115 X509_ALGOR_free(x->enc_algor); 115 X509_ALGOR_free(x->enc_algor);
116 M_ASN1_OCTET_STRING_free(x->enc_pkey); 116 ASN1_OCTET_STRING_free(x->enc_pkey);
117 EVP_PKEY_free(x->dec_pkey); 117 EVP_PKEY_free(x->dec_pkey);
118 if ((x->key_data != NULL) && (x->key_free)) 118 if ((x->key_data != NULL) && (x->key_free))
119 free(x->key_data); 119 free(x->key_data);