diff options
author | jsing <> | 2015-09-30 18:41:06 +0000 |
---|---|---|
committer | jsing <> | 2015-09-30 18:41:06 +0000 |
commit | bfadb4881fd0184be7b44bec090d8c18a238fd40 (patch) | |
tree | 90db6850a94839986c4ccd8ae4e62b0c6926d5f3 /src/lib | |
parent | 05e5d9a5bb40624d103cbce35faadc1092d0662f (diff) | |
download | openbsd-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')
30 files changed, 98 insertions, 98 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, | |||
369 | end: | 369 | end: |
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); |
diff --git a/src/lib/libcrypto/pkcs12/p12_add.c b/src/lib/libcrypto/pkcs12/p12_add.c index b141851514..cb7f72b365 100644 --- a/src/lib/libcrypto/pkcs12/p12_add.c +++ b/src/lib/libcrypto/pkcs12/p12_add.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_add.c,v 1.12 2015/02/14 12:43:07 miod Exp $ */ | 1 | /* $OpenBSD: p12_add.c,v 1.13 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -151,7 +151,7 @@ PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk) | |||
151 | return NULL; | 151 | return NULL; |
152 | } | 152 | } |
153 | p7->type = OBJ_nid2obj(NID_pkcs7_data); | 153 | p7->type = OBJ_nid2obj(NID_pkcs7_data); |
154 | if (!(p7->d.data = M_ASN1_OCTET_STRING_new())) { | 154 | if (!(p7->d.data = ASN1_OCTET_STRING_new())) { |
155 | PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, ERR_R_MALLOC_FAILURE); | 155 | PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, ERR_R_MALLOC_FAILURE); |
156 | goto err; | 156 | goto err; |
157 | } | 157 | } |
@@ -213,7 +213,7 @@ PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, | |||
213 | } | 213 | } |
214 | X509_ALGOR_free(p7->d.encrypted->enc_data->algorithm); | 214 | X509_ALGOR_free(p7->d.encrypted->enc_data->algorithm); |
215 | p7->d.encrypted->enc_data->algorithm = pbe; | 215 | p7->d.encrypted->enc_data->algorithm = pbe; |
216 | M_ASN1_OCTET_STRING_free(p7->d.encrypted->enc_data->enc_data); | 216 | ASN1_OCTET_STRING_free(p7->d.encrypted->enc_data->enc_data); |
217 | if (!(p7->d.encrypted->enc_data->enc_data = PKCS12_item_i2d_encrypt( | 217 | if (!(p7->d.encrypted->enc_data->enc_data = PKCS12_item_i2d_encrypt( |
218 | pbe, ASN1_ITEM_rptr(PKCS12_SAFEBAGS), pass, passlen, bags, 1))) { | 218 | pbe, ASN1_ITEM_rptr(PKCS12_SAFEBAGS), pass, passlen, bags, 1))) { |
219 | PKCS12err(PKCS12_F_PKCS12_PACK_P7ENCDATA, | 219 | PKCS12err(PKCS12_F_PKCS12_PACK_P7ENCDATA, |
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c index 00195f0a98..ad4e0bc660 100644 --- a/src/lib/libcrypto/pkcs12/p12_decr.c +++ b/src/lib/libcrypto/pkcs12/p12_decr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_decr.c,v 1.16 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: p12_decr.c,v 1.17 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -159,7 +159,7 @@ PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *it, | |||
159 | unsigned char *in = NULL; | 159 | unsigned char *in = NULL; |
160 | int inlen; | 160 | int inlen; |
161 | 161 | ||
162 | if (!(oct = M_ASN1_OCTET_STRING_new ())) { | 162 | if (!(oct = ASN1_OCTET_STRING_new ())) { |
163 | PKCS12err(PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT, | 163 | PKCS12err(PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT, |
164 | ERR_R_MALLOC_FAILURE); | 164 | ERR_R_MALLOC_FAILURE); |
165 | return NULL; | 165 | return NULL; |
@@ -183,7 +183,7 @@ PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *it, | |||
183 | 183 | ||
184 | err: | 184 | err: |
185 | free(in); | 185 | free(in); |
186 | M_ASN1_OCTET_STRING_free(oct); | 186 | ASN1_OCTET_STRING_free(oct); |
187 | return NULL; | 187 | return NULL; |
188 | } | 188 | } |
189 | 189 | ||
diff --git a/src/lib/libcrypto/pkcs12/p12_init.c b/src/lib/libcrypto/pkcs12/p12_init.c index 2db73d34c2..cd01196b6f 100644 --- a/src/lib/libcrypto/pkcs12/p12_init.c +++ b/src/lib/libcrypto/pkcs12/p12_init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_init.c,v 1.9 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: p12_init.c,v 1.10 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -77,7 +77,7 @@ PKCS12_init(int mode) | |||
77 | switch (mode) { | 77 | switch (mode) { |
78 | case NID_pkcs7_data: | 78 | case NID_pkcs7_data: |
79 | if (!(pkcs12->authsafes->d.data = | 79 | if (!(pkcs12->authsafes->d.data = |
80 | M_ASN1_OCTET_STRING_new())) { | 80 | ASN1_OCTET_STRING_new())) { |
81 | PKCS12err(PKCS12_F_PKCS12_INIT, ERR_R_MALLOC_FAILURE); | 81 | PKCS12err(PKCS12_F_PKCS12_INIT, ERR_R_MALLOC_FAILURE); |
82 | goto err; | 82 | goto err; |
83 | } | 83 | } |
diff --git a/src/lib/libcrypto/pkcs12/p12_p8e.c b/src/lib/libcrypto/pkcs12/p12_p8e.c index 24ed7f69ed..db3db87214 100644 --- a/src/lib/libcrypto/pkcs12/p12_p8e.c +++ b/src/lib/libcrypto/pkcs12/p12_p8e.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_p8e.c,v 1.5 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: p12_p8e.c,v 1.6 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 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -84,7 +84,7 @@ PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass, | |||
84 | } | 84 | } |
85 | X509_ALGOR_free(p8->algor); | 85 | X509_ALGOR_free(p8->algor); |
86 | p8->algor = pbe; | 86 | p8->algor = pbe; |
87 | M_ASN1_OCTET_STRING_free(p8->digest); | 87 | ASN1_OCTET_STRING_free(p8->digest); |
88 | p8->digest = PKCS12_item_i2d_encrypt(pbe, | 88 | p8->digest = PKCS12_item_i2d_encrypt(pbe, |
89 | ASN1_ITEM_rptr(PKCS8_PRIV_KEY_INFO), pass, passlen, p8inf, 1); | 89 | ASN1_ITEM_rptr(PKCS8_PRIV_KEY_INFO), pass, passlen, p8inf, 1); |
90 | if (!p8->digest) { | 90 | if (!p8->digest) { |
diff --git a/src/lib/libcrypto/pkcs7/pk7_doit.c b/src/lib/libcrypto/pkcs7/pk7_doit.c index 7755c3c30e..50e4fe39c1 100644 --- a/src/lib/libcrypto/pkcs7/pk7_doit.c +++ b/src/lib/libcrypto/pkcs7/pk7_doit.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pk7_doit.c,v 1.37 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: pk7_doit.c,v 1.38 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 | * |
@@ -745,7 +745,7 @@ PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
745 | si_sk = p7->d.signed_and_enveloped->signer_info; | 745 | si_sk = p7->d.signed_and_enveloped->signer_info; |
746 | os = p7->d.signed_and_enveloped->enc_data->enc_data; | 746 | os = p7->d.signed_and_enveloped->enc_data->enc_data; |
747 | if (!os) { | 747 | if (!os) { |
748 | os = M_ASN1_OCTET_STRING_new(); | 748 | os = ASN1_OCTET_STRING_new(); |
749 | if (!os) { | 749 | if (!os) { |
750 | PKCS7err(PKCS7_F_PKCS7_DATAFINAL, | 750 | PKCS7err(PKCS7_F_PKCS7_DATAFINAL, |
751 | ERR_R_MALLOC_FAILURE); | 751 | ERR_R_MALLOC_FAILURE); |
@@ -758,7 +758,7 @@ PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
758 | /* XXX */ | 758 | /* XXX */ |
759 | os = p7->d.enveloped->enc_data->enc_data; | 759 | os = p7->d.enveloped->enc_data->enc_data; |
760 | if (!os) { | 760 | if (!os) { |
761 | os = M_ASN1_OCTET_STRING_new(); | 761 | os = ASN1_OCTET_STRING_new(); |
762 | if (!os) { | 762 | if (!os) { |
763 | PKCS7err(PKCS7_F_PKCS7_DATAFINAL, | 763 | PKCS7err(PKCS7_F_PKCS7_DATAFINAL, |
764 | ERR_R_MALLOC_FAILURE); | 764 | ERR_R_MALLOC_FAILURE); |
@@ -776,7 +776,7 @@ PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
776 | } | 776 | } |
777 | /* If detached data then the content is excluded */ | 777 | /* If detached data then the content is excluded */ |
778 | if (PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) { | 778 | if (PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) { |
779 | M_ASN1_OCTET_STRING_free(os); | 779 | ASN1_OCTET_STRING_free(os); |
780 | os = NULL; | 780 | os = NULL; |
781 | p7->d.sign->contents->d.data = NULL; | 781 | p7->d.sign->contents->d.data = NULL; |
782 | } | 782 | } |
@@ -791,7 +791,7 @@ PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
791 | /* If detached data then the content is excluded */ | 791 | /* If detached data then the content is excluded */ |
792 | if (PKCS7_type_is_data(p7->d.digest->contents) && | 792 | if (PKCS7_type_is_data(p7->d.digest->contents) && |
793 | p7->detached) { | 793 | p7->detached) { |
794 | M_ASN1_OCTET_STRING_free(os); | 794 | ASN1_OCTET_STRING_free(os); |
795 | os = NULL; | 795 | os = NULL; |
796 | p7->d.digest->contents->d.data = NULL; | 796 | p7->d.digest->contents->d.data = NULL; |
797 | } | 797 | } |
diff --git a/src/lib/libcrypto/pkcs7/pk7_lib.c b/src/lib/libcrypto/pkcs7/pk7_lib.c index 7aedc3c44e..b3dc068f3d 100644 --- a/src/lib/libcrypto/pkcs7/pk7_lib.c +++ b/src/lib/libcrypto/pkcs7/pk7_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pk7_lib.c,v 1.17 2015/09/30 17:30:15 jsing Exp $ */ | 1 | /* $OpenBSD: pk7_lib.c,v 1.18 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 | * |
@@ -181,7 +181,7 @@ PKCS7_set_type(PKCS7 *p7, int type) | |||
181 | break; | 181 | break; |
182 | case NID_pkcs7_data: | 182 | case NID_pkcs7_data: |
183 | p7->type = obj; | 183 | p7->type = obj; |
184 | if ((p7->d.data = M_ASN1_OCTET_STRING_new()) == NULL) | 184 | if ((p7->d.data = ASN1_OCTET_STRING_new()) == NULL) |
185 | goto err; | 185 | goto err; |
186 | break; | 186 | break; |
187 | case NID_pkcs7_signedAndEnveloped: | 187 | case NID_pkcs7_signedAndEnveloped: |
@@ -636,7 +636,7 @@ PKCS7_stream(unsigned char ***boundary, PKCS7 *p7) | |||
636 | case NID_pkcs7_signedAndEnveloped: | 636 | case NID_pkcs7_signedAndEnveloped: |
637 | os = p7->d.signed_and_enveloped->enc_data->enc_data; | 637 | os = p7->d.signed_and_enveloped->enc_data->enc_data; |
638 | if (os == NULL) { | 638 | if (os == NULL) { |
639 | os = M_ASN1_OCTET_STRING_new(); | 639 | os = ASN1_OCTET_STRING_new(); |
640 | p7->d.signed_and_enveloped->enc_data->enc_data = os; | 640 | p7->d.signed_and_enveloped->enc_data->enc_data = os; |
641 | } | 641 | } |
642 | break; | 642 | break; |
@@ -644,7 +644,7 @@ PKCS7_stream(unsigned char ***boundary, PKCS7 *p7) | |||
644 | case NID_pkcs7_enveloped: | 644 | case NID_pkcs7_enveloped: |
645 | os = p7->d.enveloped->enc_data->enc_data; | 645 | os = p7->d.enveloped->enc_data->enc_data; |
646 | if (os == NULL) { | 646 | if (os == NULL) { |
647 | os = M_ASN1_OCTET_STRING_new(); | 647 | os = ASN1_OCTET_STRING_new(); |
648 | p7->d.enveloped->enc_data->enc_data = os; | 648 | p7->d.enveloped->enc_data->enc_data = os; |
649 | } | 649 | } |
650 | break; | 650 | break; |
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c index 0a4f37a3da..5dbc10dbb2 100644 --- a/src/lib/libcrypto/rsa/rsa_saos.c +++ b/src/lib/libcrypto/rsa/rsa_saos.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_saos.c,v 1.18 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_saos.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 | * |
@@ -140,7 +140,7 @@ RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, | |||
140 | } else | 140 | } else |
141 | ret = 1; | 141 | ret = 1; |
142 | err: | 142 | err: |
143 | M_ASN1_OCTET_STRING_free(sig); | 143 | ASN1_OCTET_STRING_free(sig); |
144 | if (s != NULL) { | 144 | if (s != NULL) { |
145 | explicit_bzero(s, (unsigned int)siglen); | 145 | explicit_bzero(s, (unsigned int)siglen); |
146 | free(s); | 146 | free(s); |
diff --git a/src/lib/libcrypto/x509v3/v3_akey.c b/src/lib/libcrypto/x509v3/v3_akey.c index 2b652deee8..3071baf9ac 100644 --- a/src/lib/libcrypto/x509v3/v3_akey.c +++ b/src/lib/libcrypto/x509v3/v3_akey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_akey.c,v 1.16 2015/09/30 17:30:16 jsing Exp $ */ | 1 | /* $OpenBSD: v3_akey.c,v 1.17 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -210,6 +210,6 @@ err: | |||
210 | sk_GENERAL_NAME_free(gens); | 210 | sk_GENERAL_NAME_free(gens); |
211 | X509_NAME_free(isname); | 211 | X509_NAME_free(isname); |
212 | ASN1_INTEGER_free(serial); | 212 | ASN1_INTEGER_free(serial); |
213 | M_ASN1_OCTET_STRING_free(ikeyid); | 213 | ASN1_OCTET_STRING_free(ikeyid); |
214 | return NULL; | 214 | return NULL; |
215 | } | 215 | } |
diff --git a/src/lib/libcrypto/x509v3/v3_conf.c b/src/lib/libcrypto/x509v3/v3_conf.c index d48a4ac65c..37834813c7 100644 --- a/src/lib/libcrypto/x509v3/v3_conf.c +++ b/src/lib/libcrypto/x509v3/v3_conf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_conf.c,v 1.17 2015/02/17 05:14:38 miod Exp $ */ | 1 | /* $OpenBSD: v3_conf.c,v 1.18 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -203,7 +203,7 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int ext_nid, int crit, | |||
203 | p = ext_der; | 203 | p = ext_der; |
204 | method->i2d(ext_struc, &p); | 204 | method->i2d(ext_struc, &p); |
205 | } | 205 | } |
206 | if (!(ext_oct = M_ASN1_OCTET_STRING_new())) | 206 | if (!(ext_oct = ASN1_OCTET_STRING_new())) |
207 | goto merr; | 207 | goto merr; |
208 | ext_oct->data = ext_der; | 208 | ext_oct->data = ext_der; |
209 | ext_oct->length = ext_len; | 209 | ext_oct->length = ext_len; |
@@ -211,12 +211,12 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int ext_nid, int crit, | |||
211 | ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct); | 211 | ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct); |
212 | if (!ext) | 212 | if (!ext) |
213 | goto merr; | 213 | goto merr; |
214 | M_ASN1_OCTET_STRING_free(ext_oct); | 214 | ASN1_OCTET_STRING_free(ext_oct); |
215 | 215 | ||
216 | return ext; | 216 | return ext; |
217 | 217 | ||
218 | merr: | 218 | merr: |
219 | M_ASN1_OCTET_STRING_free(ext_oct); | 219 | ASN1_OCTET_STRING_free(ext_oct); |
220 | X509V3err(X509V3_F_DO_EXT_I2D, ERR_R_MALLOC_FAILURE); | 220 | X509V3err(X509V3_F_DO_EXT_I2D, ERR_R_MALLOC_FAILURE); |
221 | return NULL; | 221 | return NULL; |
222 | 222 | ||
@@ -302,7 +302,7 @@ v3_generic_extension(const char *ext, char *value, int crit, int gen_type, | |||
302 | goto err; | 302 | goto err; |
303 | } | 303 | } |
304 | 304 | ||
305 | if (!(oct = M_ASN1_OCTET_STRING_new())) { | 305 | if (!(oct = ASN1_OCTET_STRING_new())) { |
306 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION, ERR_R_MALLOC_FAILURE); | 306 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION, ERR_R_MALLOC_FAILURE); |
307 | goto err; | 307 | goto err; |
308 | } | 308 | } |
@@ -315,7 +315,7 @@ v3_generic_extension(const char *ext, char *value, int crit, int gen_type, | |||
315 | 315 | ||
316 | err: | 316 | err: |
317 | ASN1_OBJECT_free(obj); | 317 | ASN1_OBJECT_free(obj); |
318 | M_ASN1_OCTET_STRING_free(oct); | 318 | ASN1_OCTET_STRING_free(oct); |
319 | free(ext_der); | 319 | free(ext_der); |
320 | return extension; | 320 | return extension; |
321 | } | 321 | } |
diff --git a/src/lib/libcrypto/x509v3/v3_ocsp.c b/src/lib/libcrypto/x509v3/v3_ocsp.c index 9d1390a520..696eee5adc 100644 --- a/src/lib/libcrypto/x509v3/v3_ocsp.c +++ b/src/lib/libcrypto/x509v3/v3_ocsp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_ocsp.c,v 1.12 2015/07/29 16:13:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_ocsp.c,v 1.13 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -312,7 +312,7 @@ d2i_ocsp_nonce(void *a, const unsigned char **pp, long length) | |||
312 | 312 | ||
313 | err: | 313 | err: |
314 | if (pos == NULL || *pos != os) | 314 | if (pos == NULL || *pos != os) |
315 | M_ASN1_OCTET_STRING_free(os); | 315 | ASN1_OCTET_STRING_free(os); |
316 | OCSPerr(OCSP_F_D2I_OCSP_NONCE, ERR_R_MALLOC_FAILURE); | 316 | OCSPerr(OCSP_F_D2I_OCSP_NONCE, ERR_R_MALLOC_FAILURE); |
317 | return NULL; | 317 | return NULL; |
318 | } | 318 | } |
@@ -320,7 +320,7 @@ err: | |||
320 | static void | 320 | static void |
321 | ocsp_nonce_free(void *a) | 321 | ocsp_nonce_free(void *a) |
322 | { | 322 | { |
323 | M_ASN1_OCTET_STRING_free(a); | 323 | ASN1_OCTET_STRING_free(a); |
324 | } | 324 | } |
325 | 325 | ||
326 | static int | 326 | static int |
diff --git a/src/lib/libcrypto/x509v3/v3_skey.c b/src/lib/libcrypto/x509v3/v3_skey.c index 252fec3b08..f742b67b33 100644 --- a/src/lib/libcrypto/x509v3/v3_skey.c +++ b/src/lib/libcrypto/x509v3/v3_skey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_skey.c,v 1.12 2015/07/29 16:13:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_skey.c,v 1.13 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -94,13 +94,13 @@ s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | |||
94 | ASN1_OCTET_STRING *oct; | 94 | ASN1_OCTET_STRING *oct; |
95 | long length; | 95 | long length; |
96 | 96 | ||
97 | if (!(oct = M_ASN1_OCTET_STRING_new())) { | 97 | if (!(oct = ASN1_OCTET_STRING_new())) { |
98 | X509V3err(X509V3_F_S2I_ASN1_OCTET_STRING, ERR_R_MALLOC_FAILURE); | 98 | X509V3err(X509V3_F_S2I_ASN1_OCTET_STRING, ERR_R_MALLOC_FAILURE); |
99 | return NULL; | 99 | return NULL; |
100 | } | 100 | } |
101 | 101 | ||
102 | if (!(oct->data = string_to_hex(str, &length))) { | 102 | if (!(oct->data = string_to_hex(str, &length))) { |
103 | M_ASN1_OCTET_STRING_free(oct); | 103 | ASN1_OCTET_STRING_free(oct); |
104 | return NULL; | 104 | return NULL; |
105 | } | 105 | } |
106 | 106 | ||
@@ -120,7 +120,7 @@ s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | |||
120 | if (strcmp(str, "hash")) | 120 | if (strcmp(str, "hash")) |
121 | return s2i_ASN1_OCTET_STRING(method, ctx, str); | 121 | return s2i_ASN1_OCTET_STRING(method, ctx, str); |
122 | 122 | ||
123 | if (!(oct = M_ASN1_OCTET_STRING_new())) { | 123 | if (!(oct = ASN1_OCTET_STRING_new())) { |
124 | X509V3err(X509V3_F_S2I_SKEY_ID, ERR_R_MALLOC_FAILURE); | 124 | X509V3err(X509V3_F_S2I_SKEY_ID, ERR_R_MALLOC_FAILURE); |
125 | return NULL; | 125 | return NULL; |
126 | } | 126 | } |
@@ -155,6 +155,6 @@ s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | |||
155 | return oct; | 155 | return oct; |
156 | 156 | ||
157 | err: | 157 | err: |
158 | M_ASN1_OCTET_STRING_free(oct); | 158 | ASN1_OCTET_STRING_free(oct); |
159 | return NULL; | 159 | return NULL; |
160 | } | 160 | } |
diff --git a/src/lib/libssl/src/crypto/asn1/asn1_par.c b/src/lib/libssl/src/crypto/asn1/asn1_par.c index 9057185e74..aaf8decd6c 100644 --- a/src/lib/libssl/src/crypto/asn1/asn1_par.c +++ b/src/lib/libssl/src/crypto/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, | |||
369 | end: | 369 | end: |
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/libssl/src/crypto/asn1/evp_asn1.c b/src/lib/libssl/src/crypto/asn1/evp_asn1.c index e5fcf26030..66f89c8b98 100644 --- a/src/lib/libssl/src/crypto/asn1/evp_asn1.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/asn1/p5_pbev2.c b/src/lib/libssl/src/crypto/asn1/p5_pbev2.c index 0a6d18d154..9be7e0205c 100644 --- a/src/lib/libssl/src/crypto/asn1/p5_pbev2.c +++ b/src/lib/libssl/src/crypto/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/libssl/src/crypto/asn1/x_pkey.c b/src/lib/libssl/src/crypto/asn1/x_pkey.c index 28e79858b5..701db0fc6d 100644 --- a/src/lib/libssl/src/crypto/asn1/x_pkey.c +++ b/src/lib/libssl/src/crypto/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); |
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_add.c b/src/lib/libssl/src/crypto/pkcs12/p12_add.c index b141851514..cb7f72b365 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_add.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_add.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_add.c,v 1.12 2015/02/14 12:43:07 miod Exp $ */ | 1 | /* $OpenBSD: p12_add.c,v 1.13 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -151,7 +151,7 @@ PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk) | |||
151 | return NULL; | 151 | return NULL; |
152 | } | 152 | } |
153 | p7->type = OBJ_nid2obj(NID_pkcs7_data); | 153 | p7->type = OBJ_nid2obj(NID_pkcs7_data); |
154 | if (!(p7->d.data = M_ASN1_OCTET_STRING_new())) { | 154 | if (!(p7->d.data = ASN1_OCTET_STRING_new())) { |
155 | PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, ERR_R_MALLOC_FAILURE); | 155 | PKCS12err(PKCS12_F_PKCS12_PACK_P7DATA, ERR_R_MALLOC_FAILURE); |
156 | goto err; | 156 | goto err; |
157 | } | 157 | } |
@@ -213,7 +213,7 @@ PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen, | |||
213 | } | 213 | } |
214 | X509_ALGOR_free(p7->d.encrypted->enc_data->algorithm); | 214 | X509_ALGOR_free(p7->d.encrypted->enc_data->algorithm); |
215 | p7->d.encrypted->enc_data->algorithm = pbe; | 215 | p7->d.encrypted->enc_data->algorithm = pbe; |
216 | M_ASN1_OCTET_STRING_free(p7->d.encrypted->enc_data->enc_data); | 216 | ASN1_OCTET_STRING_free(p7->d.encrypted->enc_data->enc_data); |
217 | if (!(p7->d.encrypted->enc_data->enc_data = PKCS12_item_i2d_encrypt( | 217 | if (!(p7->d.encrypted->enc_data->enc_data = PKCS12_item_i2d_encrypt( |
218 | pbe, ASN1_ITEM_rptr(PKCS12_SAFEBAGS), pass, passlen, bags, 1))) { | 218 | pbe, ASN1_ITEM_rptr(PKCS12_SAFEBAGS), pass, passlen, bags, 1))) { |
219 | PKCS12err(PKCS12_F_PKCS12_PACK_P7ENCDATA, | 219 | PKCS12err(PKCS12_F_PKCS12_PACK_P7ENCDATA, |
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_decr.c b/src/lib/libssl/src/crypto/pkcs12/p12_decr.c index 00195f0a98..ad4e0bc660 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_decr.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_decr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_decr.c,v 1.16 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: p12_decr.c,v 1.17 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -159,7 +159,7 @@ PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *it, | |||
159 | unsigned char *in = NULL; | 159 | unsigned char *in = NULL; |
160 | int inlen; | 160 | int inlen; |
161 | 161 | ||
162 | if (!(oct = M_ASN1_OCTET_STRING_new ())) { | 162 | if (!(oct = ASN1_OCTET_STRING_new ())) { |
163 | PKCS12err(PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT, | 163 | PKCS12err(PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT, |
164 | ERR_R_MALLOC_FAILURE); | 164 | ERR_R_MALLOC_FAILURE); |
165 | return NULL; | 165 | return NULL; |
@@ -183,7 +183,7 @@ PKCS12_item_i2d_encrypt(X509_ALGOR *algor, const ASN1_ITEM *it, | |||
183 | 183 | ||
184 | err: | 184 | err: |
185 | free(in); | 185 | free(in); |
186 | M_ASN1_OCTET_STRING_free(oct); | 186 | ASN1_OCTET_STRING_free(oct); |
187 | return NULL; | 187 | return NULL; |
188 | } | 188 | } |
189 | 189 | ||
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_init.c b/src/lib/libssl/src/crypto/pkcs12/p12_init.c index 2db73d34c2..cd01196b6f 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_init.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_init.c,v 1.9 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: p12_init.c,v 1.10 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -77,7 +77,7 @@ PKCS12_init(int mode) | |||
77 | switch (mode) { | 77 | switch (mode) { |
78 | case NID_pkcs7_data: | 78 | case NID_pkcs7_data: |
79 | if (!(pkcs12->authsafes->d.data = | 79 | if (!(pkcs12->authsafes->d.data = |
80 | M_ASN1_OCTET_STRING_new())) { | 80 | ASN1_OCTET_STRING_new())) { |
81 | PKCS12err(PKCS12_F_PKCS12_INIT, ERR_R_MALLOC_FAILURE); | 81 | PKCS12err(PKCS12_F_PKCS12_INIT, ERR_R_MALLOC_FAILURE); |
82 | goto err; | 82 | goto err; |
83 | } | 83 | } |
diff --git a/src/lib/libssl/src/crypto/pkcs12/p12_p8e.c b/src/lib/libssl/src/crypto/pkcs12/p12_p8e.c index 24ed7f69ed..db3db87214 100644 --- a/src/lib/libssl/src/crypto/pkcs12/p12_p8e.c +++ b/src/lib/libssl/src/crypto/pkcs12/p12_p8e.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_p8e.c,v 1.5 2014/07/11 08:44:49 jsing Exp $ */ | 1 | /* $OpenBSD: p12_p8e.c,v 1.6 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 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -84,7 +84,7 @@ PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass, | |||
84 | } | 84 | } |
85 | X509_ALGOR_free(p8->algor); | 85 | X509_ALGOR_free(p8->algor); |
86 | p8->algor = pbe; | 86 | p8->algor = pbe; |
87 | M_ASN1_OCTET_STRING_free(p8->digest); | 87 | ASN1_OCTET_STRING_free(p8->digest); |
88 | p8->digest = PKCS12_item_i2d_encrypt(pbe, | 88 | p8->digest = PKCS12_item_i2d_encrypt(pbe, |
89 | ASN1_ITEM_rptr(PKCS8_PRIV_KEY_INFO), pass, passlen, p8inf, 1); | 89 | ASN1_ITEM_rptr(PKCS8_PRIV_KEY_INFO), pass, passlen, p8inf, 1); |
90 | if (!p8->digest) { | 90 | if (!p8->digest) { |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c index 7755c3c30e..50e4fe39c1 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_doit.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pk7_doit.c,v 1.37 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: pk7_doit.c,v 1.38 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 | * |
@@ -745,7 +745,7 @@ PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
745 | si_sk = p7->d.signed_and_enveloped->signer_info; | 745 | si_sk = p7->d.signed_and_enveloped->signer_info; |
746 | os = p7->d.signed_and_enveloped->enc_data->enc_data; | 746 | os = p7->d.signed_and_enveloped->enc_data->enc_data; |
747 | if (!os) { | 747 | if (!os) { |
748 | os = M_ASN1_OCTET_STRING_new(); | 748 | os = ASN1_OCTET_STRING_new(); |
749 | if (!os) { | 749 | if (!os) { |
750 | PKCS7err(PKCS7_F_PKCS7_DATAFINAL, | 750 | PKCS7err(PKCS7_F_PKCS7_DATAFINAL, |
751 | ERR_R_MALLOC_FAILURE); | 751 | ERR_R_MALLOC_FAILURE); |
@@ -758,7 +758,7 @@ PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
758 | /* XXX */ | 758 | /* XXX */ |
759 | os = p7->d.enveloped->enc_data->enc_data; | 759 | os = p7->d.enveloped->enc_data->enc_data; |
760 | if (!os) { | 760 | if (!os) { |
761 | os = M_ASN1_OCTET_STRING_new(); | 761 | os = ASN1_OCTET_STRING_new(); |
762 | if (!os) { | 762 | if (!os) { |
763 | PKCS7err(PKCS7_F_PKCS7_DATAFINAL, | 763 | PKCS7err(PKCS7_F_PKCS7_DATAFINAL, |
764 | ERR_R_MALLOC_FAILURE); | 764 | ERR_R_MALLOC_FAILURE); |
@@ -776,7 +776,7 @@ PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
776 | } | 776 | } |
777 | /* If detached data then the content is excluded */ | 777 | /* If detached data then the content is excluded */ |
778 | if (PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) { | 778 | if (PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) { |
779 | M_ASN1_OCTET_STRING_free(os); | 779 | ASN1_OCTET_STRING_free(os); |
780 | os = NULL; | 780 | os = NULL; |
781 | p7->d.sign->contents->d.data = NULL; | 781 | p7->d.sign->contents->d.data = NULL; |
782 | } | 782 | } |
@@ -791,7 +791,7 @@ PKCS7_dataFinal(PKCS7 *p7, BIO *bio) | |||
791 | /* If detached data then the content is excluded */ | 791 | /* If detached data then the content is excluded */ |
792 | if (PKCS7_type_is_data(p7->d.digest->contents) && | 792 | if (PKCS7_type_is_data(p7->d.digest->contents) && |
793 | p7->detached) { | 793 | p7->detached) { |
794 | M_ASN1_OCTET_STRING_free(os); | 794 | ASN1_OCTET_STRING_free(os); |
795 | os = NULL; | 795 | os = NULL; |
796 | p7->d.digest->contents->d.data = NULL; | 796 | p7->d.digest->contents->d.data = NULL; |
797 | } | 797 | } |
diff --git a/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c b/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c index 7aedc3c44e..b3dc068f3d 100644 --- a/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c +++ b/src/lib/libssl/src/crypto/pkcs7/pk7_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pk7_lib.c,v 1.17 2015/09/30 17:30:15 jsing Exp $ */ | 1 | /* $OpenBSD: pk7_lib.c,v 1.18 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 | * |
@@ -181,7 +181,7 @@ PKCS7_set_type(PKCS7 *p7, int type) | |||
181 | break; | 181 | break; |
182 | case NID_pkcs7_data: | 182 | case NID_pkcs7_data: |
183 | p7->type = obj; | 183 | p7->type = obj; |
184 | if ((p7->d.data = M_ASN1_OCTET_STRING_new()) == NULL) | 184 | if ((p7->d.data = ASN1_OCTET_STRING_new()) == NULL) |
185 | goto err; | 185 | goto err; |
186 | break; | 186 | break; |
187 | case NID_pkcs7_signedAndEnveloped: | 187 | case NID_pkcs7_signedAndEnveloped: |
@@ -636,7 +636,7 @@ PKCS7_stream(unsigned char ***boundary, PKCS7 *p7) | |||
636 | case NID_pkcs7_signedAndEnveloped: | 636 | case NID_pkcs7_signedAndEnveloped: |
637 | os = p7->d.signed_and_enveloped->enc_data->enc_data; | 637 | os = p7->d.signed_and_enveloped->enc_data->enc_data; |
638 | if (os == NULL) { | 638 | if (os == NULL) { |
639 | os = M_ASN1_OCTET_STRING_new(); | 639 | os = ASN1_OCTET_STRING_new(); |
640 | p7->d.signed_and_enveloped->enc_data->enc_data = os; | 640 | p7->d.signed_and_enveloped->enc_data->enc_data = os; |
641 | } | 641 | } |
642 | break; | 642 | break; |
@@ -644,7 +644,7 @@ PKCS7_stream(unsigned char ***boundary, PKCS7 *p7) | |||
644 | case NID_pkcs7_enveloped: | 644 | case NID_pkcs7_enveloped: |
645 | os = p7->d.enveloped->enc_data->enc_data; | 645 | os = p7->d.enveloped->enc_data->enc_data; |
646 | if (os == NULL) { | 646 | if (os == NULL) { |
647 | os = M_ASN1_OCTET_STRING_new(); | 647 | os = ASN1_OCTET_STRING_new(); |
648 | p7->d.enveloped->enc_data->enc_data = os; | 648 | p7->d.enveloped->enc_data->enc_data = os; |
649 | } | 649 | } |
650 | break; | 650 | break; |
diff --git a/src/lib/libssl/src/crypto/rsa/rsa_saos.c b/src/lib/libssl/src/crypto/rsa/rsa_saos.c index 0a4f37a3da..5dbc10dbb2 100644 --- a/src/lib/libssl/src/crypto/rsa/rsa_saos.c +++ b/src/lib/libssl/src/crypto/rsa/rsa_saos.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_saos.c,v 1.18 2015/09/10 15:56:25 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_saos.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 | * |
@@ -140,7 +140,7 @@ RSA_verify_ASN1_OCTET_STRING(int dtype, const unsigned char *m, | |||
140 | } else | 140 | } else |
141 | ret = 1; | 141 | ret = 1; |
142 | err: | 142 | err: |
143 | M_ASN1_OCTET_STRING_free(sig); | 143 | ASN1_OCTET_STRING_free(sig); |
144 | if (s != NULL) { | 144 | if (s != NULL) { |
145 | explicit_bzero(s, (unsigned int)siglen); | 145 | explicit_bzero(s, (unsigned int)siglen); |
146 | free(s); | 146 | free(s); |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_akey.c b/src/lib/libssl/src/crypto/x509v3/v3_akey.c index 2b652deee8..3071baf9ac 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_akey.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_akey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_akey.c,v 1.16 2015/09/30 17:30:16 jsing Exp $ */ | 1 | /* $OpenBSD: v3_akey.c,v 1.17 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -210,6 +210,6 @@ err: | |||
210 | sk_GENERAL_NAME_free(gens); | 210 | sk_GENERAL_NAME_free(gens); |
211 | X509_NAME_free(isname); | 211 | X509_NAME_free(isname); |
212 | ASN1_INTEGER_free(serial); | 212 | ASN1_INTEGER_free(serial); |
213 | M_ASN1_OCTET_STRING_free(ikeyid); | 213 | ASN1_OCTET_STRING_free(ikeyid); |
214 | return NULL; | 214 | return NULL; |
215 | } | 215 | } |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_conf.c b/src/lib/libssl/src/crypto/x509v3/v3_conf.c index d48a4ac65c..37834813c7 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_conf.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_conf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_conf.c,v 1.17 2015/02/17 05:14:38 miod Exp $ */ | 1 | /* $OpenBSD: v3_conf.c,v 1.18 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -203,7 +203,7 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int ext_nid, int crit, | |||
203 | p = ext_der; | 203 | p = ext_der; |
204 | method->i2d(ext_struc, &p); | 204 | method->i2d(ext_struc, &p); |
205 | } | 205 | } |
206 | if (!(ext_oct = M_ASN1_OCTET_STRING_new())) | 206 | if (!(ext_oct = ASN1_OCTET_STRING_new())) |
207 | goto merr; | 207 | goto merr; |
208 | ext_oct->data = ext_der; | 208 | ext_oct->data = ext_der; |
209 | ext_oct->length = ext_len; | 209 | ext_oct->length = ext_len; |
@@ -211,12 +211,12 @@ do_ext_i2d(const X509V3_EXT_METHOD *method, int ext_nid, int crit, | |||
211 | ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct); | 211 | ext = X509_EXTENSION_create_by_NID(NULL, ext_nid, crit, ext_oct); |
212 | if (!ext) | 212 | if (!ext) |
213 | goto merr; | 213 | goto merr; |
214 | M_ASN1_OCTET_STRING_free(ext_oct); | 214 | ASN1_OCTET_STRING_free(ext_oct); |
215 | 215 | ||
216 | return ext; | 216 | return ext; |
217 | 217 | ||
218 | merr: | 218 | merr: |
219 | M_ASN1_OCTET_STRING_free(ext_oct); | 219 | ASN1_OCTET_STRING_free(ext_oct); |
220 | X509V3err(X509V3_F_DO_EXT_I2D, ERR_R_MALLOC_FAILURE); | 220 | X509V3err(X509V3_F_DO_EXT_I2D, ERR_R_MALLOC_FAILURE); |
221 | return NULL; | 221 | return NULL; |
222 | 222 | ||
@@ -302,7 +302,7 @@ v3_generic_extension(const char *ext, char *value, int crit, int gen_type, | |||
302 | goto err; | 302 | goto err; |
303 | } | 303 | } |
304 | 304 | ||
305 | if (!(oct = M_ASN1_OCTET_STRING_new())) { | 305 | if (!(oct = ASN1_OCTET_STRING_new())) { |
306 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION, ERR_R_MALLOC_FAILURE); | 306 | X509V3err(X509V3_F_V3_GENERIC_EXTENSION, ERR_R_MALLOC_FAILURE); |
307 | goto err; | 307 | goto err; |
308 | } | 308 | } |
@@ -315,7 +315,7 @@ v3_generic_extension(const char *ext, char *value, int crit, int gen_type, | |||
315 | 315 | ||
316 | err: | 316 | err: |
317 | ASN1_OBJECT_free(obj); | 317 | ASN1_OBJECT_free(obj); |
318 | M_ASN1_OCTET_STRING_free(oct); | 318 | ASN1_OCTET_STRING_free(oct); |
319 | free(ext_der); | 319 | free(ext_der); |
320 | return extension; | 320 | return extension; |
321 | } | 321 | } |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c b/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c index 9d1390a520..696eee5adc 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_ocsp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_ocsp.c,v 1.12 2015/07/29 16:13:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_ocsp.c,v 1.13 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -312,7 +312,7 @@ d2i_ocsp_nonce(void *a, const unsigned char **pp, long length) | |||
312 | 312 | ||
313 | err: | 313 | err: |
314 | if (pos == NULL || *pos != os) | 314 | if (pos == NULL || *pos != os) |
315 | M_ASN1_OCTET_STRING_free(os); | 315 | ASN1_OCTET_STRING_free(os); |
316 | OCSPerr(OCSP_F_D2I_OCSP_NONCE, ERR_R_MALLOC_FAILURE); | 316 | OCSPerr(OCSP_F_D2I_OCSP_NONCE, ERR_R_MALLOC_FAILURE); |
317 | return NULL; | 317 | return NULL; |
318 | } | 318 | } |
@@ -320,7 +320,7 @@ err: | |||
320 | static void | 320 | static void |
321 | ocsp_nonce_free(void *a) | 321 | ocsp_nonce_free(void *a) |
322 | { | 322 | { |
323 | M_ASN1_OCTET_STRING_free(a); | 323 | ASN1_OCTET_STRING_free(a); |
324 | } | 324 | } |
325 | 325 | ||
326 | static int | 326 | static int |
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_skey.c b/src/lib/libssl/src/crypto/x509v3/v3_skey.c index 252fec3b08..f742b67b33 100644 --- a/src/lib/libssl/src/crypto/x509v3/v3_skey.c +++ b/src/lib/libssl/src/crypto/x509v3/v3_skey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: v3_skey.c,v 1.12 2015/07/29 16:13:49 jsing Exp $ */ | 1 | /* $OpenBSD: v3_skey.c,v 1.13 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. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -94,13 +94,13 @@ s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | |||
94 | ASN1_OCTET_STRING *oct; | 94 | ASN1_OCTET_STRING *oct; |
95 | long length; | 95 | long length; |
96 | 96 | ||
97 | if (!(oct = M_ASN1_OCTET_STRING_new())) { | 97 | if (!(oct = ASN1_OCTET_STRING_new())) { |
98 | X509V3err(X509V3_F_S2I_ASN1_OCTET_STRING, ERR_R_MALLOC_FAILURE); | 98 | X509V3err(X509V3_F_S2I_ASN1_OCTET_STRING, ERR_R_MALLOC_FAILURE); |
99 | return NULL; | 99 | return NULL; |
100 | } | 100 | } |
101 | 101 | ||
102 | if (!(oct->data = string_to_hex(str, &length))) { | 102 | if (!(oct->data = string_to_hex(str, &length))) { |
103 | M_ASN1_OCTET_STRING_free(oct); | 103 | ASN1_OCTET_STRING_free(oct); |
104 | return NULL; | 104 | return NULL; |
105 | } | 105 | } |
106 | 106 | ||
@@ -120,7 +120,7 @@ s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | |||
120 | if (strcmp(str, "hash")) | 120 | if (strcmp(str, "hash")) |
121 | return s2i_ASN1_OCTET_STRING(method, ctx, str); | 121 | return s2i_ASN1_OCTET_STRING(method, ctx, str); |
122 | 122 | ||
123 | if (!(oct = M_ASN1_OCTET_STRING_new())) { | 123 | if (!(oct = ASN1_OCTET_STRING_new())) { |
124 | X509V3err(X509V3_F_S2I_SKEY_ID, ERR_R_MALLOC_FAILURE); | 124 | X509V3err(X509V3_F_S2I_SKEY_ID, ERR_R_MALLOC_FAILURE); |
125 | return NULL; | 125 | return NULL; |
126 | } | 126 | } |
@@ -155,6 +155,6 @@ s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str) | |||
155 | return oct; | 155 | return oct; |
156 | 156 | ||
157 | err: | 157 | err: |
158 | M_ASN1_OCTET_STRING_free(oct); | 158 | ASN1_OCTET_STRING_free(oct); |
159 | return NULL; | 159 | return NULL; |
160 | } | 160 | } |