aboutsummaryrefslogtreecommitdiff
path: root/crypto/pkcs7
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2015-03-14 04:16:42 +0000
committerDr. Stephen Henson <steve@openssl.org>2015-03-23 13:15:06 +0000
commitf422a51486a3ab415153eccdc3c3746c53da01f4 (patch)
tree7048cd4c4b3857f13ee0468d9059a0e24b17c885 /crypto/pkcs7
parent2ecd32a1f8f0643ae7b38f59bbaf9f0d6ef326fe (diff)
downloadopenssl-f422a51486a3ab415153eccdc3c3746c53da01f4.zip
openssl-f422a51486a3ab415153eccdc3c3746c53da01f4.tar.gz
openssl-f422a51486a3ab415153eccdc3c3746c53da01f4.tar.bz2
Remove old ASN.1 code.
Remove old M_ASN1_ macros and replace any occurences with the corresponding function. Remove d2i_ASN1_bytes, d2i_ASN1_SET, i2d_ASN1_SET: no longer used internally. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/pkcs7')
-rw-r--r--crypto/pkcs7/pk7_doit.c12
-rw-r--r--crypto/pkcs7/pk7_lib.c14
2 files changed, 13 insertions, 13 deletions
diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c
index 25ac2df..0200b3b 100644
--- a/crypto/pkcs7/pk7_doit.c
+++ b/crypto/pkcs7/pk7_doit.c
@@ -409,7 +409,7 @@ static int pkcs7_cmp_ri(PKCS7_RECIP_INFO *ri, X509 *pcert)
pcert->cert_info->issuer);
if (ret)
return ret;
- return M_ASN1_INTEGER_cmp(pcert->cert_info->serialNumber,
+ return ASN1_INTEGER_cmp(pcert->cert_info->serialNumber,
ri->issuer_and_serial->serial);
}
@@ -735,7 +735,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
si_sk = p7->d.signed_and_enveloped->signer_info;
os = p7->d.signed_and_enveloped->enc_data->enc_data;
if (!os) {
- os = M_ASN1_OCTET_STRING_new();
+ os = ASN1_OCTET_STRING_new();
if (!os) {
PKCS7err(PKCS7_F_PKCS7_DATAFINAL, ERR_R_MALLOC_FAILURE);
goto err;
@@ -747,7 +747,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
/* XXXXXXXXXXXXXXXX */
os = p7->d.enveloped->enc_data->enc_data;
if (!os) {
- os = M_ASN1_OCTET_STRING_new();
+ os = ASN1_OCTET_STRING_new();
if (!os) {
PKCS7err(PKCS7_F_PKCS7_DATAFINAL, ERR_R_MALLOC_FAILURE);
goto err;
@@ -760,7 +760,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
os = PKCS7_get_octet_string(p7->d.sign->contents);
/* If detached data then the content is excluded */
if (PKCS7_type_is_data(p7->d.sign->contents) && p7->detached) {
- M_ASN1_OCTET_STRING_free(os);
+ ASN1_OCTET_STRING_free(os);
os = NULL;
p7->d.sign->contents->d.data = NULL;
}
@@ -770,7 +770,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
os = PKCS7_get_octet_string(p7->d.digest->contents);
/* If detached data then the content is excluded */
if (PKCS7_type_is_data(p7->d.digest->contents) && p7->detached) {
- M_ASN1_OCTET_STRING_free(os);
+ ASN1_OCTET_STRING_free(os);
os = NULL;
p7->d.digest->contents->d.data = NULL;
}
@@ -834,7 +834,7 @@ int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
goto err;
if (!EVP_DigestFinal_ex(mdc, md_data, &md_len))
goto err;
- M_ASN1_OCTET_STRING_set(p7->d.digest->digest, md_data, md_len);
+ ASN1_OCTET_STRING_set(p7->d.digest->digest, md_data, md_len);
}
if (!PKCS7_is_detached(p7)) {
diff --git a/crypto/pkcs7/pk7_lib.c b/crypto/pkcs7/pk7_lib.c
index 0c5fcaa..511ae8c 100644
--- a/crypto/pkcs7/pk7_lib.c
+++ b/crypto/pkcs7/pk7_lib.c
@@ -177,7 +177,7 @@ int PKCS7_set_type(PKCS7 *p7, int type)
break;
case NID_pkcs7_data:
p7->type = obj;
- if ((p7->d.data = M_ASN1_OCTET_STRING_new()) == NULL)
+ if ((p7->d.data = ASN1_OCTET_STRING_new()) == NULL)
goto err;
break;
case NID_pkcs7_signedAndEnveloped:
@@ -368,9 +368,9 @@ int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
* because ASN1_INTEGER_set is used to set a 'long' we will do things the
* ugly way.
*/
- M_ASN1_INTEGER_free(p7i->issuer_and_serial->serial);
+ ASN1_INTEGER_free(p7i->issuer_and_serial->serial);
if (!(p7i->issuer_and_serial->serial =
- M_ASN1_INTEGER_dup(X509_get_serialNumber(x509))))
+ ASN1_INTEGER_dup(X509_get_serialNumber(x509))))
goto err;
/* lets keep the pkey around for a while */
@@ -523,9 +523,9 @@ int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509)
X509_get_issuer_name(x509)))
return 0;
- M_ASN1_INTEGER_free(p7i->issuer_and_serial->serial);
+ ASN1_INTEGER_free(p7i->issuer_and_serial->serial);
if (!(p7i->issuer_and_serial->serial =
- M_ASN1_INTEGER_dup(X509_get_serialNumber(x509))))
+ ASN1_INTEGER_dup(X509_get_serialNumber(x509))))
return 0;
pkey = X509_get_pubkey(x509);
@@ -614,7 +614,7 @@ int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7)
case NID_pkcs7_signedAndEnveloped:
os = p7->d.signed_and_enveloped->enc_data->enc_data;
if (os == NULL) {
- os = M_ASN1_OCTET_STRING_new();
+ os = ASN1_OCTET_STRING_new();
p7->d.signed_and_enveloped->enc_data->enc_data = os;
}
break;
@@ -622,7 +622,7 @@ int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7)
case NID_pkcs7_enveloped:
os = p7->d.enveloped->enc_data->enc_data;
if (os == NULL) {
- os = M_ASN1_OCTET_STRING_new();
+ os = ASN1_OCTET_STRING_new();
p7->d.enveloped->enc_data->enc_data = os;
}
break;