diff options
author | Richard Levitte <levitte@openssl.org> | 2018-04-23 10:22:56 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-04-23 11:07:46 +0200 |
commit | 25642ad29e6a2c15c10ceb5e4f029638f73a879e (patch) | |
tree | cb3e50119494230753e9bafa3248a0f7917fb23f /apps/ca.c | |
parent | 10b37541dc7f27b0ca74102970691ce4636cc0bd (diff) |
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 <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6050)
Diffstat (limited to 'apps/ca.c')
-rw-r--r-- | apps/ca.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -722,8 +722,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; } @@ -877,10 +881,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) { |