#include <openssl/err.h>
#include <openssl/cms.h>
#include "cms_lcl.h"
-#include "asn1_locl.h"
DECLARE_ASN1_ITEM(CMS_DigestedData)
BIO *cms_DigestedData_init_bio(CMS_ContentInfo *cms)
{
CMS_DigestedData *dd;
- if (OBJ_obj2nid(cms->contentType) != NID_pkcs7_digest)
- return NULL;
dd = cms->d.digestedData;
return cms_DigestAlgorithm_init_bio(dd->digestAlgorithm);
}
if (verify)
{
- if (mdlen != dd->digest->length)
+ if (mdlen != (unsigned int)dd->digest->length)
{
CMSerr(CMS_F_CMS_DIGESTEDDATA_DO_FINAL,
CMS_R_MESSAGEDIGEST_WRONG_LENGTH);