X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fui%2Fui_openssl.c;h=abf223b5d154a1f765add510e304d0b66d8f89c8;hp=3555ae6275c8f906b20072570962e0c774abddc7;hb=b49a5b2dc02545b137101797cacb060ae19c264a;hpb=713f22611450ea878bfe65ec34d02ad18928ce36 diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c index 3555ae6275..abf223b5d1 100644 --- a/crypto/ui/ui_openssl.c +++ b/crypto/ui/ui_openssl.c @@ -430,7 +430,10 @@ static int open_console(UI *ui) is_a_tty = 1; #ifdef OPENSSL_SYS_MSDOS - if ((tty=fopen("con","w+")) == NULL) + /* For some bizarre reason this call to fopen() on Windows + * fails if the mode is "w+" or "r+", whereas "w" works fine. + */ + if ((tty=fopen("con","w")) == NULL) tty=stdin; #elif defined(OPENSSL_SYS_MACINTOSH_CLASSIC) tty=stdin;