The branch OpenSSL_1_1_0-stable has been updated via 29a7148d4e47cf5c7861ed66679d69d5380c95f2 (commit) from 7afe18bd003ff7477168626d99efb5a297f2df39 (commit)
- Log ----------------------------------------------------------------- commit 29a7148d4e47cf5c7861ed66679d69d5380c95f2 Author: Richard Levitte <levi...@openssl.org> Date: Mon Apr 23 10:22:56 2018 +0200 Fix openssl ca, to correctly make output file binary when using -spkac On Unix, this doesn't matter, but on other platforms, it may. Reviewed-by: Matt Caswell <m...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/6050) (cherry picked from commit 25642ad29e6a2c15c10ceb5e4f029638f73a879e) ----------------------------------------------------------------------- Summary of changes: apps/ca.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/ca.c b/apps/ca.c index d474a2b..eb093d0 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -725,8 +725,12 @@ end_of_options: /*****************************************************************/ if (req || gencrl) { - /* FIXME: Is it really always text? */ - Sout = bio_open_default(outfile, 'w', FORMAT_TEXT); + if (spkac_file != NULL) { + output_der = 1; + batch = 1; + } + Sout = bio_open_default(outfile, 'w', + output_der ? FORMAT_ASN1 : FORMAT_TEXT); if (Sout == NULL) goto end; } @@ -872,10 +876,6 @@ end_of_options: BIO_printf(bio_err, "Memory allocation failure\n"); goto end; } - if (outfile) { - output_der = 1; - batch = 1; - } } } if (ss_cert_file != NULL) { _____ openssl-commits mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits