4

I am tring to get openssl to generate a CSR for an existing private key using the windows binary of OpenSSL.

Normally the command line for this would be:

openssl.exe req -new -sha256 -out test.csr -key privkey.pem

However for security reasons I'd like to provide the key via standard input so I don't need to store the private key file on disk.

There was a similar question with a solution specific to Linux, however I am using Windows so that cannot be applied.

cjs
  • 1,385
  • 1
  • 12
  • 23
leepfrog
  • 488
  • 2
  • 9

1 Answers1

2

Unlike the Linux build the Windows build of openssl supports - to tell the application to read from stdin.

openssl.exe req -new -sha256 -out test.csr -key -

Another option would be to use a RAM drive to store the key file temporarily.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89