goto opthelp;
}
+ if (flags & CMS_CADES) {
+ if (flags & CMS_NOATTR) {
+ BIO_puts(bio_err, "Incompatible options: "
+ "CAdES required signed attributes\n");
+ goto opthelp;
+ }
+ }
+
if (operation & SMIME_SIGNERS) {
if (keyfile != NULL && signerfile == NULL) {
BIO_puts(bio_err, "Illegal -inkey without -signer\n");
if (!i)
goto merr;
}
- if (flags & CMS_REUSE_DIGEST) {
- if (!cms_copy_messageDigest(cms, si))
- goto err;
- if (!(flags & (CMS_PARTIAL | CMS_KEY_PARAM)) &&
- !CMS_SignerInfo_sign(si))
- goto err;
- }
if (flags & CMS_CADES) {
ESS_SIGNING_CERT *sc = NULL;
ESS_SIGNING_CERT_V2 *sc2 = NULL;
if (!add_sc)
goto err;
}
+ if (flags & CMS_REUSE_DIGEST) {
+ if (!cms_copy_messageDigest(cms, si))
+ goto err;
+ if (!(flags & (CMS_PARTIAL | CMS_KEY_PARAM)) &&
+ !CMS_SignerInfo_sign(si))
+ goto err;
+ }
}
if (!(flags & CMS_NOCERTS)) {
goto err;
if (EVP_PKEY_CTX_set_signature_md(si->pctx, md) <= 0)
goto err;
- } else if (EVP_DigestSignInit(si->mctx, &si->pctx, md, NULL, pk) <=
- 0)
+ } else if (EVP_DigestSignInit(si->mctx, &si->pctx, md, NULL, pk) <= 0)
goto err;
}