apps/ca.c: only output DER with SPKAC input and when -out is chosen
[openssl.git] / apps / ca.c
index b4ac86d4aac95e418eaf179616a08679ec552dbc..4464b2ba86a20736b61dec9c9fe967616eb6821e 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;
         }