Fix late opening of output file
authorRichard Levitte <levitte@openssl.org>
Mon, 23 Apr 2018 08:26:05 +0000 (10:26 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 23 Apr 2018 08:51:36 +0000 (10:51 +0200)
commit10b37541dc7f27b0ca74102970691ce4636cc0bd
tree1878839e35a997a09eecebd699cd846d04ea907c
parent148796291e47ad402ddfd1bbe6f34a2652657ec2
Fix late opening of output file

For 'openssl dhparams', the output file was opened after calculations
were made, which is a waste of cycles and time if the output file
turns out not to be writable.

Fixes #3404

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