apps/ca.c: only output DER with SPKAC input and when -out is chosen
authorRichard Levitte <levitte@openssl.org>
Thu, 28 Feb 2019 10:30:19 +0000 (11:30 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 28 Feb 2019 12:06:32 +0000 (13:06 +0100)
So say the docs

Fixes #8055

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8368)

apps/ca.c

index b4ac86d..4464b2b 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -722,7 +722,7 @@ end_of_options:
 
     /*****************************************************************/
     if (req || gencrl) {
-        if (spkac_file != NULL) {
+        if (spkac_file != NULL && outfile != NULL) {
             output_der = 1;
             batch = 1;
         }