Commit 10a50374 authored by Richard Levitte's avatar Richard Levitte
Browse files

UI_OpenSSL()'s session opener fails on MacOS X



If on a non-tty stdin, TTY_get() will fail with errno == ENODEV.
We didn't catch that.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2039)
(cherry picked from commit c901bcce)
parent 78a3e80a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -508,6 +508,15 @@ static int open_console(UI *ui)
        if (errno == EINVAL)
            is_a_tty = 0;
        else
# endif
# ifdef ENODEV
            /*
             * MacOS X returns ENODEV (Operation not supported by device),
             * which seems appropriate.
             */
        if (errno == ENODEV)
            is_a_tty = 0;
        else
# endif
            return 0;
    }