diff options
author | jsing <> | 2019-08-11 11:04:18 +0000 |
---|---|---|
committer | jsing <> | 2019-08-11 11:04:18 +0000 |
commit | aef380380727e6005f045b926db17dc65d46e675 (patch) | |
tree | 9e89724f288806b16eaed0d3d50667bcb47ddbc3 /src/lib/libcrypto/cms/cms_pwri.c | |
parent | 8e1a02b0b1470213ac669256827ac9f393aaa8a7 (diff) | |
download | openbsd-aef380380727e6005f045b926db17dc65d46e675.tar.gz openbsd-aef380380727e6005f045b926db17dc65d46e675.tar.bz2 openbsd-aef380380727e6005f045b926db17dc65d46e675.zip |
Expand M_ASN1_new_of and M_ASN1_free_of macros.
Diffstat (limited to 'src/lib/libcrypto/cms/cms_pwri.c')
-rw-r--r-- | src/lib/libcrypto/cms/cms_pwri.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/cms/cms_pwri.c b/src/lib/libcrypto/cms/cms_pwri.c index 6423ddeaf9..ef38a3f0f4 100644 --- a/src/lib/libcrypto/cms/cms_pwri.c +++ b/src/lib/libcrypto/cms/cms_pwri.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms_pwri.c,v 1.24 2019/08/11 10:54:11 jsing Exp $ */ | 1 | /* $OpenBSD: cms_pwri.c,v 1.25 2019/08/11 11:04:18 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
4 | * project. | 4 | * project. |
@@ -158,11 +158,11 @@ CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid, | |||
158 | ctx = NULL; | 158 | ctx = NULL; |
159 | 159 | ||
160 | /* Initialize recipient info */ | 160 | /* Initialize recipient info */ |
161 | ri = M_ASN1_new_of(CMS_RecipientInfo); | 161 | ri = (CMS_RecipientInfo *)ASN1_item_new(&CMS_RecipientInfo_it); |
162 | if (ri == NULL) | 162 | if (ri == NULL) |
163 | goto merr; | 163 | goto merr; |
164 | 164 | ||
165 | ri->d.pwri = M_ASN1_new_of(CMS_PasswordRecipientInfo); | 165 | ri->d.pwri = (CMS_PasswordRecipientInfo *)ASN1_item_new(&CMS_PasswordRecipientInfo_it); |
166 | if (ri->d.pwri == NULL) | 166 | if (ri->d.pwri == NULL) |
167 | goto merr; | 167 | goto merr; |
168 | ri->type = CMS_RECIPINFO_PASS; | 168 | ri->type = CMS_RECIPINFO_PASS; |
@@ -206,7 +206,7 @@ CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid, | |||
206 | err: | 206 | err: |
207 | EVP_CIPHER_CTX_free(ctx); | 207 | EVP_CIPHER_CTX_free(ctx); |
208 | if (ri) | 208 | if (ri) |
209 | M_ASN1_free_of(ri, CMS_RecipientInfo); | 209 | ASN1_item_free((ASN1_VALUE *)ri, &CMS_RecipientInfo_it); |
210 | X509_ALGOR_free(encalg); | 210 | X509_ALGOR_free(encalg); |
211 | 211 | ||
212 | return NULL; | 212 | return NULL; |