Ignore nonsensical flags for signed receipts.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 10 Apr 2008 11:12:42 +0000 (11:12 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 10 Apr 2008 11:12:42 +0000 (11:12 +0000)
crypto/cms/cms_smime.c

index 1e778e866d64f6f7490c842e3076942706b9bc60..b18c789f643fc4cf181169d8c8ae8cea4c8529bd 100644 (file)
@@ -426,6 +426,7 @@ int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
                        X509_STORE *store, unsigned int flags)
        {
        int r;
+       flags &= ~(CMS_DETACHED|CMS_TEXT);
        r = CMS_verify(rcms, certs, store, NULL, NULL, flags);
        if (r <= 0)
                return r;
@@ -483,7 +484,7 @@ CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
        BIO *rct_cont = NULL;
        int r = 0;
 
-       flags &= ~CMS_STREAM;
+       flags &= ~(CMS_STREAM|CMS_TEXT);
        /* Not really detached but avoids content being allocated */
        flags |= CMS_PARTIAL|CMS_BINARY|CMS_DETACHED;
        if (!pkey || !signcert)