Loading crypto/ui/ui_err.c +6 −0 Original line number Diff line number Diff line Loading @@ -19,8 +19,11 @@ # define ERR_REASON(reason) ERR_PACK(ERR_LIB_UI,0,reason) static ERR_STRING_DATA UI_str_functs[] = { {ERR_FUNC(UI_F_CLOSE_CONSOLE), "close_console"}, {ERR_FUNC(UI_F_ECHO_CONSOLE), "echo_console"}, {ERR_FUNC(UI_F_GENERAL_ALLOCATE_BOOLEAN), "general_allocate_boolean"}, {ERR_FUNC(UI_F_GENERAL_ALLOCATE_PROMPT), "general_allocate_prompt"}, {ERR_FUNC(UI_F_NOECHO_CONSOLE), "noecho_console"}, {ERR_FUNC(UI_F_OPEN_CONSOLE), "open_console"}, {ERR_FUNC(UI_F_UI_CREATE_METHOD), "UI_create_method"}, {ERR_FUNC(UI_F_UI_CTRL), "UI_ctrl"}, Loading @@ -45,6 +48,9 @@ static ERR_STRING_DATA UI_str_reasons[] = { {ERR_REASON(UI_R_PROCESSING_ERROR), "processing error"}, {ERR_REASON(UI_R_RESULT_TOO_LARGE), "result too large"}, {ERR_REASON(UI_R_RESULT_TOO_SMALL), "result too small"}, {ERR_REASON(UI_R_SYSASSIGN_ERROR), "sys$assign error"}, {ERR_REASON(UI_R_SYSDASSGN_ERROR), "sys$dassgn error"}, {ERR_REASON(UI_R_SYSQIOW_ERROR), "sys$qiow error"}, {ERR_REASON(UI_R_UNKNOWN_CONTROL_COMMAND), "unknown control command"}, {ERR_REASON(UI_R_UNKNOWN_TTYGET_ERRNO_VALUE), "unknown ttyget errno value"}, Loading crypto/ui/ui_openssl.c +36 −4 Original line number Diff line number Diff line Loading @@ -447,8 +447,14 @@ static int open_console(UI *ui) status = sys$assign(&terminal, &channel, 0, 0); /* if there isn't a TT device, something is very wrong */ if (status != SS$_NORMAL) if (status != SS$_NORMAL) { char tmp_num[12]; BIO_snprintf(tmp_num, sizeof(tmp_num) - 1, "%%X%08X", status); UIerr(UI_F_OPEN_CONSOLE, UI_R_SYSASSIGN_ERROR); ERR_add_error_data(2, "status=", tmp_num); return 0; } status = sys$qiow(0, channel, IO$_SENSEMODE, &iosb, 0, 0, tty_orig, 12, 0, 0, 0, 0); Loading Loading @@ -478,9 +484,19 @@ static int noecho_console(UI *ui) tty_new[2] = tty_orig[2]; status = sys$qiow(0, channel, IO$_SETMODE, &iosb, 0, 0, tty_new, 12, 0, 0, 0, 0); if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) { char tmp_num[2][12]; BIO_snprintf(tmp_num[0], sizeof(tmp_num[0]) - 1, "%%X%08X", status); BIO_snprintf(tmp_num[1], sizeof(tmp_num[1]) - 1, "%%X%08X", iosb.iosb$w_value); UIerr(UI_F_NOECHO_CONSOLE, UI_R_SYSQIOW_ERROR); ERR_add_error_data(5, "status=", tmp_num[0], ",", "iosb.iosb$w_value=", tmp_num[1]); return 0; } } #endif #if defined(_WIN32) && !defined(_WIN32_WCE) if (is_a_tty) { Loading Loading @@ -510,9 +526,19 @@ static int echo_console(UI *ui) tty_new[2] = tty_orig[2]; status = sys$qiow(0, channel, IO$_SETMODE, &iosb, 0, 0, tty_new, 12, 0, 0, 0, 0); if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) { char tmp_num[2][12]; BIO_snprintf(tmp_num[0], sizeof(tmp_num[0]) - 1, "%%X%08X", status); BIO_snprintf(tmp_num[1], sizeof(tmp_num[1]) - 1, "%%X%08X", iosb.iosb$w_value); UIerr(UI_F_ECHO_CONSOLE, UI_R_SYSQIOW_ERROR); ERR_add_error_data(5, "status=", tmp_num[0], ",", "iosb.iosb$w_value=", tmp_num[1]); return 0; } } #endif #if defined(_WIN32) && !defined(_WIN32_WCE) if (is_a_tty) { Loading @@ -532,8 +558,14 @@ static int close_console(UI *ui) fclose(tty_out); #ifdef OPENSSL_SYS_VMS status = sys$dassgn(channel); if (status != SS$_NORMAL) if (status != SS$_NORMAL) { char tmp_num[12]; BIO_snprintf(tmp_num, sizeof(tmp_num) - 1, "%%X%08X", status); UIerr(UI_F_CLOSE_CONSOLE, UI_R_SYSDASSGN_ERROR); ERR_add_error_data(2, "status=", tmp_num); return 0; } #endif CRYPTO_THREAD_unlock(ui->lock); Loading include/openssl/ui.h +6 −0 Original line number Diff line number Diff line Loading @@ -339,8 +339,11 @@ int ERR_load_UI_strings(void); /* Error codes for the UI functions. */ /* Function codes. */ # define UI_F_CLOSE_CONSOLE 115 # define UI_F_ECHO_CONSOLE 116 # define UI_F_GENERAL_ALLOCATE_BOOLEAN 108 # define UI_F_GENERAL_ALLOCATE_PROMPT 109 # define UI_F_NOECHO_CONSOLE 117 # define UI_F_OPEN_CONSOLE 114 # define UI_F_UI_CREATE_METHOD 112 # define UI_F_UI_CTRL 111 Loading @@ -362,6 +365,9 @@ int ERR_load_UI_strings(void); # define UI_R_PROCESSING_ERROR 107 # define UI_R_RESULT_TOO_LARGE 100 # define UI_R_RESULT_TOO_SMALL 101 # define UI_R_SYSASSIGN_ERROR 109 # define UI_R_SYSDASSGN_ERROR 110 # define UI_R_SYSQIOW_ERROR 111 # define UI_R_UNKNOWN_CONTROL_COMMAND 106 # define UI_R_UNKNOWN_TTYGET_ERRNO_VALUE 108 Loading Loading
crypto/ui/ui_err.c +6 −0 Original line number Diff line number Diff line Loading @@ -19,8 +19,11 @@ # define ERR_REASON(reason) ERR_PACK(ERR_LIB_UI,0,reason) static ERR_STRING_DATA UI_str_functs[] = { {ERR_FUNC(UI_F_CLOSE_CONSOLE), "close_console"}, {ERR_FUNC(UI_F_ECHO_CONSOLE), "echo_console"}, {ERR_FUNC(UI_F_GENERAL_ALLOCATE_BOOLEAN), "general_allocate_boolean"}, {ERR_FUNC(UI_F_GENERAL_ALLOCATE_PROMPT), "general_allocate_prompt"}, {ERR_FUNC(UI_F_NOECHO_CONSOLE), "noecho_console"}, {ERR_FUNC(UI_F_OPEN_CONSOLE), "open_console"}, {ERR_FUNC(UI_F_UI_CREATE_METHOD), "UI_create_method"}, {ERR_FUNC(UI_F_UI_CTRL), "UI_ctrl"}, Loading @@ -45,6 +48,9 @@ static ERR_STRING_DATA UI_str_reasons[] = { {ERR_REASON(UI_R_PROCESSING_ERROR), "processing error"}, {ERR_REASON(UI_R_RESULT_TOO_LARGE), "result too large"}, {ERR_REASON(UI_R_RESULT_TOO_SMALL), "result too small"}, {ERR_REASON(UI_R_SYSASSIGN_ERROR), "sys$assign error"}, {ERR_REASON(UI_R_SYSDASSGN_ERROR), "sys$dassgn error"}, {ERR_REASON(UI_R_SYSQIOW_ERROR), "sys$qiow error"}, {ERR_REASON(UI_R_UNKNOWN_CONTROL_COMMAND), "unknown control command"}, {ERR_REASON(UI_R_UNKNOWN_TTYGET_ERRNO_VALUE), "unknown ttyget errno value"}, Loading
crypto/ui/ui_openssl.c +36 −4 Original line number Diff line number Diff line Loading @@ -447,8 +447,14 @@ static int open_console(UI *ui) status = sys$assign(&terminal, &channel, 0, 0); /* if there isn't a TT device, something is very wrong */ if (status != SS$_NORMAL) if (status != SS$_NORMAL) { char tmp_num[12]; BIO_snprintf(tmp_num, sizeof(tmp_num) - 1, "%%X%08X", status); UIerr(UI_F_OPEN_CONSOLE, UI_R_SYSASSIGN_ERROR); ERR_add_error_data(2, "status=", tmp_num); return 0; } status = sys$qiow(0, channel, IO$_SENSEMODE, &iosb, 0, 0, tty_orig, 12, 0, 0, 0, 0); Loading Loading @@ -478,9 +484,19 @@ static int noecho_console(UI *ui) tty_new[2] = tty_orig[2]; status = sys$qiow(0, channel, IO$_SETMODE, &iosb, 0, 0, tty_new, 12, 0, 0, 0, 0); if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) { char tmp_num[2][12]; BIO_snprintf(tmp_num[0], sizeof(tmp_num[0]) - 1, "%%X%08X", status); BIO_snprintf(tmp_num[1], sizeof(tmp_num[1]) - 1, "%%X%08X", iosb.iosb$w_value); UIerr(UI_F_NOECHO_CONSOLE, UI_R_SYSQIOW_ERROR); ERR_add_error_data(5, "status=", tmp_num[0], ",", "iosb.iosb$w_value=", tmp_num[1]); return 0; } } #endif #if defined(_WIN32) && !defined(_WIN32_WCE) if (is_a_tty) { Loading Loading @@ -510,9 +526,19 @@ static int echo_console(UI *ui) tty_new[2] = tty_orig[2]; status = sys$qiow(0, channel, IO$_SETMODE, &iosb, 0, 0, tty_new, 12, 0, 0, 0, 0); if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) { char tmp_num[2][12]; BIO_snprintf(tmp_num[0], sizeof(tmp_num[0]) - 1, "%%X%08X", status); BIO_snprintf(tmp_num[1], sizeof(tmp_num[1]) - 1, "%%X%08X", iosb.iosb$w_value); UIerr(UI_F_ECHO_CONSOLE, UI_R_SYSQIOW_ERROR); ERR_add_error_data(5, "status=", tmp_num[0], ",", "iosb.iosb$w_value=", tmp_num[1]); return 0; } } #endif #if defined(_WIN32) && !defined(_WIN32_WCE) if (is_a_tty) { Loading @@ -532,8 +558,14 @@ static int close_console(UI *ui) fclose(tty_out); #ifdef OPENSSL_SYS_VMS status = sys$dassgn(channel); if (status != SS$_NORMAL) if (status != SS$_NORMAL) { char tmp_num[12]; BIO_snprintf(tmp_num, sizeof(tmp_num) - 1, "%%X%08X", status); UIerr(UI_F_CLOSE_CONSOLE, UI_R_SYSDASSGN_ERROR); ERR_add_error_data(2, "status=", tmp_num); return 0; } #endif CRYPTO_THREAD_unlock(ui->lock); Loading
include/openssl/ui.h +6 −0 Original line number Diff line number Diff line Loading @@ -339,8 +339,11 @@ int ERR_load_UI_strings(void); /* Error codes for the UI functions. */ /* Function codes. */ # define UI_F_CLOSE_CONSOLE 115 # define UI_F_ECHO_CONSOLE 116 # define UI_F_GENERAL_ALLOCATE_BOOLEAN 108 # define UI_F_GENERAL_ALLOCATE_PROMPT 109 # define UI_F_NOECHO_CONSOLE 117 # define UI_F_OPEN_CONSOLE 114 # define UI_F_UI_CREATE_METHOD 112 # define UI_F_UI_CTRL 111 Loading @@ -362,6 +365,9 @@ int ERR_load_UI_strings(void); # define UI_R_PROCESSING_ERROR 107 # define UI_R_RESULT_TOO_LARGE 100 # define UI_R_RESULT_TOO_SMALL 101 # define UI_R_SYSASSIGN_ERROR 109 # define UI_R_SYSDASSGN_ERROR 110 # define UI_R_SYSQIOW_ERROR 111 # define UI_R_UNKNOWN_CONTROL_COMMAND 106 # define UI_R_UNKNOWN_TTYGET_ERRNO_VALUE 108 Loading