diff options
Diffstat (limited to 'crypto/cms')
-rw-r--r-- | crypto/cms/cms_dd.c | 2 | ||||
-rw-r--r-- | crypto/cms/cms_lcl.h | 1 | ||||
-rw-r--r-- | crypto/cms/cms_lib.c | 15 | ||||
-rw-r--r-- | crypto/cms/cms_sd.c | 4 |
4 files changed, 3 insertions, 19 deletions
diff --git a/crypto/cms/cms_dd.c b/crypto/cms/cms_dd.c index 8919c15be1..93d6747ae8 100644 --- a/crypto/cms/cms_dd.c +++ b/crypto/cms/cms_dd.c @@ -82,7 +82,7 @@ CMS_ContentInfo *cms_DigestedData_create(const EVP_MD *md) dd->version = 0; dd->encapContentInfo->eContentType = OBJ_nid2obj(NID_pkcs7_data); - cms_DigestAlgorithm_set(dd->digestAlgorithm, md); + X509_ALGOR_set_md(dd->digestAlgorithm, md); return cms; diff --git a/crypto/cms/cms_lcl.h b/crypto/cms/cms_lcl.h index 5aea7f837f..0839ed6730 100644 --- a/crypto/cms/cms_lcl.h +++ b/crypto/cms/cms_lcl.h @@ -443,7 +443,6 @@ int cms_SignerIdentifier_cert_cmp(CMS_SignerIdentifier *sid, X509 *cert); CMS_ContentInfo *cms_CompressedData_create(int comp_nid); BIO *cms_CompressedData_init_bio(CMS_ContentInfo *cms); -void cms_DigestAlgorithm_set(X509_ALGOR *alg, const EVP_MD *md); BIO *cms_DigestAlgorithm_init_bio(X509_ALGOR *digestAlgorithm); int cms_DigestAlgorithm_find_ctx(EVP_MD_CTX *mctx, BIO *chain, X509_ALGOR *mdalg); diff --git a/crypto/cms/cms_lib.c b/crypto/cms/cms_lib.c index b62d1bfac0..a5a186c5ac 100644 --- a/crypto/cms/cms_lib.c +++ b/crypto/cms/cms_lib.c @@ -341,21 +341,6 @@ int CMS_set_detached(CMS_ContentInfo *cms, int detached) return 0; } -/* Set up an X509_ALGOR DigestAlgorithmIdentifier from an EVP_MD */ - -void cms_DigestAlgorithm_set(X509_ALGOR *alg, const EVP_MD *md) - { - int param_type; - - if (md->flags & EVP_MD_FLAG_DIGALGID_ABSENT) - param_type = V_ASN1_UNDEF; - else - param_type = V_ASN1_NULL; - - X509_ALGOR_set0(alg, OBJ_nid2obj(EVP_MD_type(md)), param_type, NULL); - - } - /* Create a digest BIO from an X509_ALGOR structure */ BIO *cms_DigestAlgorithm_init_bio(X509_ALGOR *digestAlgorithm) diff --git a/crypto/cms/cms_sd.c b/crypto/cms/cms_sd.c index 77fbd13596..f448a35066 100644 --- a/crypto/cms/cms_sd.c +++ b/crypto/cms/cms_sd.c @@ -360,7 +360,7 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, goto err; } - cms_DigestAlgorithm_set(si->digestAlgorithm, md); + X509_ALGOR_set_md(si->digestAlgorithm, md); /* See if digest is present in digestAlgorithms */ for (i = 0; i < sk_X509_ALGOR_num(sd->digestAlgorithms); i++) @@ -377,7 +377,7 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, alg = X509_ALGOR_new(); if (!alg) goto merr; - cms_DigestAlgorithm_set(alg, md); + X509_ALGOR_set_md(alg, md); if (!sk_X509_ALGOR_push(sd->digestAlgorithms, alg)) { X509_ALGOR_free(alg); |