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_sd.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_sd.c')
-rw-r--r-- | src/lib/libcrypto/cms/cms_sd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/cms/cms_sd.c b/src/lib/libcrypto/cms/cms_sd.c index 5333d2c9d2..596e5f27a8 100644 --- a/src/lib/libcrypto/cms/cms_sd.c +++ b/src/lib/libcrypto/cms/cms_sd.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms_sd.c,v 1.21 2019/08/11 10:50:23 jsing Exp $ */ | 1 | /* $OpenBSD: cms_sd.c,v 1.22 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. |
@@ -81,7 +81,7 @@ static CMS_SignedData * | |||
81 | cms_signed_data_init(CMS_ContentInfo *cms) | 81 | cms_signed_data_init(CMS_ContentInfo *cms) |
82 | { | 82 | { |
83 | if (cms->d.other == NULL) { | 83 | if (cms->d.other == NULL) { |
84 | cms->d.signedData = M_ASN1_new_of(CMS_SignedData); | 84 | cms->d.signedData = (CMS_SignedData *)ASN1_item_new(&CMS_SignedData_it); |
85 | if (!cms->d.signedData) { | 85 | if (!cms->d.signedData) { |
86 | CMSerror(ERR_R_MALLOC_FAILURE); | 86 | CMSerror(ERR_R_MALLOC_FAILURE); |
87 | return NULL; | 87 | return NULL; |
@@ -288,7 +288,7 @@ CMS_add1_signer(CMS_ContentInfo *cms, X509 *signer, EVP_PKEY *pk, | |||
288 | sd = cms_signed_data_init(cms); | 288 | sd = cms_signed_data_init(cms); |
289 | if (!sd) | 289 | if (!sd) |
290 | goto err; | 290 | goto err; |
291 | si = M_ASN1_new_of(CMS_SignerInfo); | 291 | si = (CMS_SignerInfo *)ASN1_item_new(&CMS_SignerInfo_it); |
292 | if (!si) | 292 | if (!si) |
293 | goto merr; | 293 | goto merr; |
294 | /* Call for side-effect of computing hash and caching extensions */ | 294 | /* Call for side-effect of computing hash and caching extensions */ |
@@ -420,7 +420,7 @@ CMS_add1_signer(CMS_ContentInfo *cms, X509 *signer, EVP_PKEY *pk, | |||
420 | merr: | 420 | merr: |
421 | CMSerror(ERR_R_MALLOC_FAILURE); | 421 | CMSerror(ERR_R_MALLOC_FAILURE); |
422 | err: | 422 | err: |
423 | M_ASN1_free_of(si, CMS_SignerInfo); | 423 | ASN1_item_free((ASN1_VALUE *)si, &CMS_SignerInfo_it); |
424 | 424 | ||
425 | return NULL; | 425 | return NULL; |
426 | } | 426 | } |