Commit 6750617b8ea6e7b593e511f8c0a8a18934330acb
1 parent
423a6f75
Exists in
master
and in
3 other branches
Partial fix of non-ssl windows build.
Showing
6 changed files
with
16 additions
and
8 deletions
Show diff stats
src/core/connect.c
... | ... | @@ -233,6 +233,7 @@ static int notify_crl_error(H3270 *hSession, int rc, const SSL_ERROR_MESSAGE *me |
233 | 233 | |
234 | 234 | #if defined(HAVE_LIBSSL) |
235 | 235 | set_ssl_state(hSession,LIB3270_SSL_UNDEFINED); |
236 | + hSession->ssl.host = 0; | |
236 | 237 | #endif // HAVE_LIBSSL |
237 | 238 | |
238 | 239 | snprintf(hSession->full_model_name,LIB3270_FULL_MODEL_NAME_LENGTH,"IBM-327%c-%d",hSession->m3279 ? '9' : '8', hSession->model_num); |
... | ... | @@ -240,7 +241,6 @@ static int notify_crl_error(H3270 *hSession, int rc, const SSL_ERROR_MESSAGE *me |
240 | 241 | lib3270_trace_event(hSession,"Reconnecting to %s\n",lib3270_get_url(hSession)); |
241 | 242 | |
242 | 243 | hSession->ever_3270 = False; |
243 | - hSession->ssl.host = 0; | |
244 | 244 | |
245 | 245 | return net_reconnect(hSession,seconds); |
246 | 246 | ... | ... |
src/core/host.c
... | ... | @@ -153,7 +153,10 @@ void lib3270_set_disconnected(H3270 *hSession) |
153 | 153 | |
154 | 154 | hSession->cstate = LIB3270_NOT_CONNECTED; |
155 | 155 | hSession->starting = 0; |
156 | + | |
157 | +#if defined(HAVE_LIBSSL) | |
156 | 158 | hSession->ssl.state = LIB3270_SSL_UNDEFINED; |
159 | +#endif // HAVE_LIBSSL | |
157 | 160 | |
158 | 161 | set_status(hSession,LIB3270_FLAG_UNDERA,False); |
159 | 162 | |
... | ... | @@ -164,7 +167,9 @@ void lib3270_set_disconnected(H3270 *hSession) |
164 | 167 | if(hSession->cbk.update_connect) |
165 | 168 | hSession->cbk.update_connect(hSession,0); |
166 | 169 | |
170 | +#if defined(HAVE_LIBSSL) | |
167 | 171 | hSession->cbk.update_ssl(hSession,hSession->ssl.state); |
172 | +#endif // HAVE_LIBSSL | |
168 | 173 | |
169 | 174 | } |
170 | 175 | |
... | ... | @@ -304,8 +309,6 @@ static void update_host(H3270 *h) |
304 | 309 | h->host.srvc |
305 | 310 | )); |
306 | 311 | |
307 | - trace("hosturl=[%s] ssl=%s",h->host.full,h->ssl.enabled ? "yes" : "no"); | |
308 | - | |
309 | 312 | } |
310 | 313 | |
311 | 314 | LIB3270_EXPORT int lib3270_set_luname(H3270 *hSession, const char *luname) | ... | ... |
src/core/session.c
src/core/telnet.c
... | ... | @@ -435,15 +435,18 @@ static int net_connected(H3270 *hSession) |
435 | 435 | } |
436 | 436 | */ |
437 | 437 | |
438 | - trace_dsn(hSession,"Connected to %s%s.\n", hSession->host.current,hSession->ssl.host? " using SSL": ""); | |
439 | - | |
440 | 438 | #if defined(HAVE_LIBSSL) |
441 | 439 | /* Set up SSL. */ |
440 | + trace_dsn(hSession,"Connected to %s%s.\n", hSession->host.current,hSession->ssl.host? " using SSL": ""); | |
441 | + | |
442 | 442 | if(hSession->ssl.con && hSession->ssl.state == LIB3270_SSL_UNDEFINED) |
443 | 443 | { |
444 | 444 | if(ssl_negotiate(hSession)) |
445 | 445 | return -1; |
446 | 446 | } |
447 | +#else | |
448 | + trace_dsn(hSession,"Connected to %s.\n", hSession->host.current); | |
449 | + | |
447 | 450 | #endif |
448 | 451 | |
449 | 452 | lib3270_setup_session(hSession); | ... | ... |
src/core/windows/connect.c
... | ... | @@ -308,9 +308,10 @@ int net_reconnect(H3270 *hSession, int seconds) |
308 | 308 | } |
309 | 309 | |
310 | 310 | hSession->ever_3270 = False; |
311 | - hSession->ssl.host = 0; | |
312 | 311 | |
313 | 312 | #if defined(HAVE_LIBSSL) |
313 | + hSession->ssl.host = 0; | |
314 | + | |
314 | 315 | if(hSession->ssl.enabled) |
315 | 316 | { |
316 | 317 | hSession->ssl.host = 1; | ... | ... |
src/include/lib3270-internals.h
... | ... | @@ -837,6 +837,8 @@ LIB3270_INTERNAL int non_blocking(H3270 *session, Boolean on); |
837 | 837 | LIB3270_INTERNAL X509_CRL * lib3270_get_crl(H3270 *hSession, SSL_ERROR_MESSAGE * message, const char *url); |
838 | 838 | #endif // SSL_ENABLE_CRL_CHECK |
839 | 839 | |
840 | +#endif | |
841 | + | |
840 | 842 | /// @brief Clear element at adress. |
841 | 843 | LIB3270_INTERNAL void clear_chr(H3270 *hSession, int baddr); |
842 | 844 | |
... | ... | @@ -847,5 +849,4 @@ LIB3270_INTERNAL int non_blocking(H3270 *session, Boolean on); |
847 | 849 | |
848 | 850 | LIB3270_INTERNAL char * lib3270_get_user_name(); |
849 | 851 | |
850 | -#endif | |
851 | 852 | ... | ... |