On 2014/06/03 13:29, ian kremlin wrote:
> hi, this is my first time submitting a bug, please let me know if
> I'm doing anything wrong.
> 
> OpenSSL irritatingly waits until after it generates diffie-hellman
> parameters to check to see if the outpath is writable, throwing them
> away if it is not:
> 
> $ uname -a
> OpenBSD uglyman.kremlin.cc 5.5 GENERIC.MP#165 amd64
> $ rm -rf baddir
> $ openssl dhparam -outform PEM -out baddir/test.pem 1024
> Generating DH parameters, 1024 bit long safe prime, generator 2
> This is going to take a long time
> <many breadcrumbs>
> baddir/test.pem: No such file or directory
> 
> thanks,
> ian
> 

There's a very simple workaround for this one:

openssl dhparam 1024 > baddir/test.pem

Of course, using this method gives a bigger window where a failing
command could trash the file - but then, the same would apply if
openssl -out were to open the file for overwriting before starting
to generate params.

Reply via email to