summaryrefslogtreecommitdiffstats
path: root/apps/cms.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2019-01-29 23:54:30 +0100
committerShane Lontis <shane.lontis@oracle.com>2019-05-29 11:14:46 +1000
commit8c89c80a5580419bcc3e35abf18dd187c73881e4 (patch)
treecab49a3e79269da6031538f81215433f0802f22e /apps/cms.c
parentf4a96507fb880d5f5a707c138388cb8b5b1ba8c8 (diff)
CAdES: Fix SignerInfo attribute construction order.
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8117)
Diffstat (limited to 'apps/cms.c')
-rw-r--r--apps/cms.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/cms.c b/apps/cms.c
index 2863a92eee..9c9f01d3ee 100644
--- a/apps/cms.c
+++ b/apps/cms.c
@@ -603,6 +603,14 @@ int cms_main(int argc, char **argv)
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");