Commit 6f187def33d9e3ccd72155e680422abdbb915134
1 parent
6e811eaa
Exists in
master
and in
3 other branches
Debugging possible failure in TLS/SSL negotiation.
Showing
3 changed files
with
6 additions
and
5 deletions
Show diff stats
src/core/linux/connect.c
@@ -196,10 +196,11 @@ static void net_connected(H3270 *hSession, int GNUC_UNUSED(fd), LIB3270_IO_FLAG | @@ -196,10 +196,11 @@ static void net_connected(H3270 *hSession, int GNUC_UNUSED(fd), LIB3270_IO_FLAG | ||
196 | hSession->ever_3270 = False; | 196 | hSession->ever_3270 = False; |
197 | 197 | ||
198 | #if defined(HAVE_LIBSSL) | 198 | #if defined(HAVE_LIBSSL) |
199 | + debug("%s: TLS/SSL is %s",__FUNCTION__,hSession->ssl.enabled ? "ENABLED" : "DISABLED") | ||
200 | + trace_dsn(hSession,"TLS/SSL is %s\n", hSession->ssl.enabled ? "enabled" : "disabled" ); | ||
199 | if(hSession->ssl.enabled) | 201 | if(hSession->ssl.enabled) |
200 | { | 202 | { |
201 | hSession->ssl.host = 1; | 203 | hSession->ssl.host = 1; |
202 | - | ||
203 | if(ssl_init(hSession)) | 204 | if(ssl_init(hSession)) |
204 | return errno = ENOTCONN; | 205 | return errno = ENOTCONN; |
205 | 206 |
src/core/telnet.c
@@ -1060,6 +1060,8 @@ static int telnet_fsm(H3270 *hSession, unsigned char c) | @@ -1060,6 +1060,8 @@ static int telnet_fsm(H3270 *hSession, unsigned char c) | ||
1060 | cmd(SB), | 1060 | cmd(SB), |
1061 | opt(TELOPT_STARTTLS), | 1061 | opt(TELOPT_STARTTLS), |
1062 | cmd(SE)); | 1062 | cmd(SE)); |
1063 | + | ||
1064 | + debug("%s: %s requires TLS/SSL",__FUNCTION__,opt(TELOPT_STARTTLS)); | ||
1063 | hSession->need_tls_follows = 1; | 1065 | hSession->need_tls_follows = 1; |
1064 | } | 1066 | } |
1065 | #endif /*]*/ | 1067 | #endif /*]*/ |
src/testprogram/testprogram.c
@@ -57,7 +57,8 @@ int main(int argc, char *argv[]) | @@ -57,7 +57,8 @@ int main(int argc, char *argv[]) | ||
57 | lib3270_crl_set_preferred_protocol(h,"ldap"); | 57 | lib3270_crl_set_preferred_protocol(h,"ldap"); |
58 | #endif // HAVE_LDAP | 58 | #endif // HAVE_LDAP |
59 | 59 | ||
60 | - lib3270_set_url(h,NULL); | 60 | + if(lib3270_set_url(h,NULL)) |
61 | + lib3270_set_url(h,"tn3270://fandezhi.efglobe.com"); | ||
61 | 62 | ||
62 | int long_index =0; | 63 | int long_index =0; |
63 | int opt; | 64 | int opt; |
@@ -104,9 +105,6 @@ int main(int argc, char *argv[]) | @@ -104,9 +105,6 @@ int main(int argc, char *argv[]) | ||
104 | } | 105 | } |
105 | 106 | ||
106 | 107 | ||
107 | - if(lib3270_set_url(h,NULL)) | ||
108 | - lib3270_set_url(h,"tn3270://fandezhi.efglobe.com"); | ||
109 | - | ||
110 | //lib3270_set_toggle(h,LIB3270_TOGGLE_DS_TRACE,1); | 108 | //lib3270_set_toggle(h,LIB3270_TOGGLE_DS_TRACE,1); |
111 | lib3270_set_toggle(h,LIB3270_TOGGLE_SSL_TRACE,1); | 109 | lib3270_set_toggle(h,LIB3270_TOGGLE_SSL_TRACE,1); |
112 | 110 |