diff options
| author | steve <steve> | 2010-03-11 13:29:39 +0000 |
|---|---|---|
| committer | steve <steve> | 2010-03-11 13:29:39 +0000 |
| commit | ff0daa848cb889976e45fb0b42e12faf2b4e72f7 (patch) | |
| tree | a74b034895b23b9ecd577bfa23e3c85d45fb3aac /crypto/cms | |
| parent | 8b2dd3631ee8140c74238b9d383fc5ef487e35d6 (diff) | |
| download | openssl-ff0daa848cb889976e45fb0b42e12faf2b4e72f7.tar.gz | |
update cms code to use X509_ALGOR_set_md instead of internal function
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 8919c15be..93d6747ae 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 5aea7f837..0839ed673 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 b62d1bfac..a5a186c5a 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 77fbd1359..f448a3506 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); |
