[openssl-dev] [openssl.org #3935] TTY echo flag not correctly restored after reading pass phrase

William Freeman via RT rt at openssl.org
Fri Jul 10 20:36:39 UTC 2015


I use openssl inside an emacs shell window.  Emacs runs the tty with echo off, collects the line I'm typing (letting me edit it with emacs commands), then sends the whole line when I hit enter.  Since the line as I typed it is already on the screen, I don't need the tty to echo it, or I'll see two copies.

When openssl reads a pass phrase, it turns off echo.  That's a good thing, in general.  (Emacs recognizes the password prompt, and collects the password in a separate window, masking by echoing asterisk for each character, and sends the pass phrase to the tty when collected.)

But then, since, without, apparently, checking, it believes that it turned echo off, openssl unconditionally turns echo on.  This means my subsequent commands (or inputs) appear twice, until I run "stty -echo".

A user of a half duplex terminal (if one can still find any) would be similarly offended.

What is needed is for openssl to record the state of the echo flag before turning it off, and then, after the pass phrase is read, only turn it back on if it was on before.

-------------- next part --------------
_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod


More information about the openssl-dev mailing list