1

I'm running macOS 10.12.1 with OpenSSL 0.9.8zh 14 Jan 2016

When generating an RSA key with the OpenSSL cli you are prompted to enter your passphrase.

With most command-line interfaces pressing C-d or C-c will exit the process; however, with openssl it seems like it's impossible to exit the program once you've started the key generation process.

Shown below is a session where I'm trying C-c and C-d, only after entering foobar twice do I exit:

$ openssl genrsa -aes128 -out fd.key 2048
Generating RSA private key, 2048 bit long modulus
.........+++
.................................................+++
e is 65537 (0x10001)
Enter pass phrase for fd.key:
73496:error:28069065:lib(40):UI_set_result:result too small:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-64/src/crypto/ui/ui_lib.c:850:You must type in 4 to 1023 characters
Enter pass phrase for fd.key:
73496:error:28069065:lib(40):UI_set_result:result too small:/BuildRoot/Library/Caches/com.apple.xbs/Sources/OpenSSL098/OpenSSL098-64/src/crypto/ui/ui_lib.c:850:You must type in 4 to 1023 characters
Enter pass phrase for fd.key:
Enter pass phrase for fd.key:
Enter pass phrase for fd.key:
Enter pass phrase for fd.key:
Enter pass phrase for fd.key:
Enter pass phrase for fd.key:
Verifying - Enter pass phrase for fd.key:
  • How do I exit the genrsa openssl command?
3
  • I can reproduce that. Maybe you want to file a bug report?
    – Arminius
    Mar 29, 2017 at 15:23
  • github.com/openssl/openssl/issues/3076
    – mbigras
    Mar 29, 2017 at 15:28
  • They probably didn't get that you have to enter the password twice beforehand. I can't even close it with SIGQUIT as suggested.
    – Arminius
    Mar 29, 2017 at 15:37

0

You must log in to answer this question.

Browse other questions tagged .