Commit e5262c5dd43954677d29820a6cfe37b4609f67ec
1 parent
9edc369c
Exists in
master
and in
2 other branches
Reactivating ./configure option to disable SSL popup.
Showing
2 changed files
with
7 additions
and
48 deletions
Show diff stats
src/core/connect.c
| ... | ... | @@ -34,6 +34,7 @@ |
| 34 | 34 | #include <lib3270/log.h> |
| 35 | 35 | #include <lib3270/trace.h> |
| 36 | 36 | #include <lib3270/toggle.h> |
| 37 | +#include <lib3270/ssl.h> | |
| 37 | 38 | #include <trace_dsc.h> |
| 38 | 39 | #include "utilc.h" |
| 39 | 40 | |
| ... | ... | @@ -143,10 +144,16 @@ |
| 143 | 144 | // Negotiation complete is the connection secure? |
| 144 | 145 | if(hSession->ssl.message->type != LIB3270_NOTIFY_INFO) { |
| 145 | 146 | |
| 147 | +#ifdef SSL_ENABLE_NOTIFICATION_WHEN_FAILED | |
| 146 | 148 | // Ask user what I can do! |
| 147 | 149 | if(lib3270_popup_translated(hSession,(const LIB3270_POPUP *) hSession->ssl.message,1) == ECANCELED) { |
| 148 | 150 | lib3270_disconnect(hSession); |
| 149 | 151 | } |
| 152 | +#else | |
| 153 | + | |
| 154 | + trace_ssl(hSession,"SSL popup message is disabled on this build"); | |
| 155 | + | |
| 156 | +#endif | |
| 150 | 157 | |
| 151 | 158 | } |
| 152 | 159 | ... | ... |
src/include/internals.h
| ... | ... | @@ -766,54 +766,6 @@ LIB3270_INTERNAL int non_blocking(H3270 *session, Boolean on); |
| 766 | 766 | |
| 767 | 767 | LIB3270_INTERNAL void set_ssl_state(H3270 *session, LIB3270_SSL_STATE state); |
| 768 | 768 | |
| 769 | -/* | |
| 770 | -#if defined(HAVE_LIBSSL) | |
| 771 | - | |
| 772 | - typedef struct ssl_status_msg | |
| 773 | - { | |
| 774 | - LIB3270_POPUP_HEAD | |
| 775 | - | |
| 776 | - long id; | |
| 777 | - const char * iconName; ///< @brief Icon name from https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html | |
| 778 | - } SSL_STATUS_MSG; | |
| 779 | - | |
| 780 | - typedef struct _ssl_error_message | |
| 781 | - { | |
| 782 | - int code; | |
| 783 | -#ifdef _WIN32 | |
| 784 | - DWORD lasterror; | |
| 785 | -#endif // _WIN32 | |
| 786 | - | |
| 787 | - const char *body; | |
| 788 | - | |
| 789 | - const LIB3270_POPUP *popup; /// @brief Pointer to popup message. | |
| 790 | - | |
| 791 | - } SSL_ERROR_MESSAGE; | |
| 792 | - | |
| 793 | - | |
| 794 | - LIB3270_INTERNAL int ssl_ctx_init(H3270 *hSession, SSL_ERROR_MESSAGE *message); | |
| 795 | - LIB3270_INTERNAL int ssl_init(H3270 *session); | |
| 796 | - LIB3270_INTERNAL int ssl_negotiate(H3270 *hSession); | |
| 797 | - LIB3270_INTERNAL const struct ssl_status_msg * ssl_get_status_from_error_code(long id); | |
| 798 | - | |
| 799 | - | |
| 800 | - | |
| 801 | - LIB3270_INTERNAL void ssl_info_callback(INFO_CONST SSL *s, int where, int ret); | |
| 802 | - | |
| 803 | - // @brief Global SSL_CTX object as framework to establish TLS/SSL or DTLS enabled connections. | |
| 804 | - LIB3270_INTERNAL SSL_CTX * ssl_ctx; | |
| 805 | - | |
| 806 | - | |
| 807 | - | |
| 808 | - /// @brief Emit popup on ssl error. | |
| 809 | - LIB3270_INTERNAL int popup_ssl_error(H3270 *session, int rc, const SSL_ERROR_MESSAGE *message); | |
| 810 | - | |
| 811 | - /// @brief Emits SSL popup. | |
| 812 | - LIB3270_INTERNAL void ssl_popup_message(H3270 *hSession, const SSL_ERROR_MESSAGE *msg); | |
| 813 | - | |
| 814 | -#endif | |
| 815 | -*/ | |
| 816 | - | |
| 817 | 769 | /// @brief Clear element at adress. |
| 818 | 770 | LIB3270_INTERNAL void clear_chr(H3270 *hSession, int baddr); |
| 819 | 771 | ... | ... |