From e5262c5dd43954677d29820a6cfe37b4609f67ec Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 3 Sep 2020 18:53:11 -0300 Subject: [PATCH] Reactivating ./configure option to disable SSL popup. --- src/core/connect.c | 7 +++++++ src/include/internals.h | 48 ------------------------------------------------ 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/src/core/connect.c b/src/core/connect.c index c103390..699d05e 100644 --- a/src/core/connect.c +++ b/src/core/connect.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include "utilc.h" @@ -143,10 +144,16 @@ // Negotiation complete is the connection secure? if(hSession->ssl.message->type != LIB3270_NOTIFY_INFO) { +#ifdef SSL_ENABLE_NOTIFICATION_WHEN_FAILED // Ask user what I can do! if(lib3270_popup_translated(hSession,(const LIB3270_POPUP *) hSession->ssl.message,1) == ECANCELED) { lib3270_disconnect(hSession); } +#else + + trace_ssl(hSession,"SSL popup message is disabled on this build"); + +#endif } diff --git a/src/include/internals.h b/src/include/internals.h index 953cd45..7d284ec 100644 --- a/src/include/internals.h +++ b/src/include/internals.h @@ -766,54 +766,6 @@ LIB3270_INTERNAL int non_blocking(H3270 *session, Boolean on); LIB3270_INTERNAL void set_ssl_state(H3270 *session, LIB3270_SSL_STATE state); -/* -#if defined(HAVE_LIBSSL) - - typedef struct ssl_status_msg - { - LIB3270_POPUP_HEAD - - long id; - const char * iconName; ///< @brief Icon name from https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html - } SSL_STATUS_MSG; - - typedef struct _ssl_error_message - { - int code; -#ifdef _WIN32 - DWORD lasterror; -#endif // _WIN32 - - const char *body; - - const LIB3270_POPUP *popup; /// @brief Pointer to popup message. - - } SSL_ERROR_MESSAGE; - - - LIB3270_INTERNAL int ssl_ctx_init(H3270 *hSession, SSL_ERROR_MESSAGE *message); - LIB3270_INTERNAL int ssl_init(H3270 *session); - LIB3270_INTERNAL int ssl_negotiate(H3270 *hSession); - LIB3270_INTERNAL const struct ssl_status_msg * ssl_get_status_from_error_code(long id); - - - - LIB3270_INTERNAL void ssl_info_callback(INFO_CONST SSL *s, int where, int ret); - - // @brief Global SSL_CTX object as framework to establish TLS/SSL or DTLS enabled connections. - LIB3270_INTERNAL SSL_CTX * ssl_ctx; - - - - /// @brief Emit popup on ssl error. - LIB3270_INTERNAL int popup_ssl_error(H3270 *session, int rc, const SSL_ERROR_MESSAGE *message); - - /// @brief Emits SSL popup. - LIB3270_INTERNAL void ssl_popup_message(H3270 *hSession, const SSL_ERROR_MESSAGE *msg); - -#endif -*/ - /// @brief Clear element at adress. LIB3270_INTERNAL void clear_chr(H3270 *hSession, int baddr); -- libgit2 0.21.2