diff options
| author | jsing <> | 2019-08-11 11:04:18 +0000 |
|---|---|---|
| committer | jsing <> | 2019-08-11 11:04:18 +0000 |
| commit | b62b2cda811eb26882ba6eb737b566e44c3e7d04 (patch) | |
| tree | 9e89724f288806b16eaed0d3d50667bcb47ddbc3 /src/lib/libcrypto/cms/cms_pwri.c | |
| parent | 88e0c6439bf7c4df34ed7092dc9fe18ad406e4b3 (diff) | |
| download | openbsd-b62b2cda811eb26882ba6eb737b566e44c3e7d04.tar.gz openbsd-b62b2cda811eb26882ba6eb737b566e44c3e7d04.tar.bz2 openbsd-b62b2cda811eb26882ba6eb737b566e44c3e7d04.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; |
