Commit d5f164f0392575b32e1cf3040c77b8489616dd74
1 parent
6750617b
Exists in
master
and in
3 other branches
Fixing non-ssl builds.
Showing
1 changed file
with
11 additions
and
11 deletions
Show diff stats
src/ssl/state.c
| ... | ... | @@ -63,15 +63,16 @@ LIB3270_EXPORT long lib3270_get_SSL_verify_result(const H3270 *hSession) |
| 63 | 63 | |
| 64 | 64 | LIB3270_EXPORT LIB3270_SSL_STATE lib3270_get_ssl_state(const H3270 *hSession) |
| 65 | 65 | { |
| 66 | +#if defined(HAVE_LIBSSL) | |
| 66 | 67 | return hSession->ssl.state; |
| 68 | +#else | |
| 69 | + return LIB3270_SSL_UNDEFINED; | |
| 70 | +#endif // HAVE_LIBSSL | |
| 67 | 71 | } |
| 68 | 72 | |
| 73 | +#if defined(HAVE_LIBSSL) | |
| 69 | 74 | void set_ssl_state(H3270 *hSession, LIB3270_SSL_STATE state) |
| 70 | 75 | { |
| 71 | - CHECK_SESSION_HANDLE(hSession); | |
| 72 | - | |
| 73 | - debug("%s: %d -> %d",__FUNCTION__,hSession->ssl.state,state); | |
| 74 | - | |
| 75 | 76 | if(state == hSession->ssl.state) |
| 76 | 77 | return; |
| 77 | 78 | |
| ... | ... | @@ -81,9 +82,8 @@ void set_ssl_state(H3270 *hSession, LIB3270_SSL_STATE state) |
| 81 | 82 | hSession->cbk.update_ssl(hSession,hSession->ssl.state); |
| 82 | 83 | } |
| 83 | 84 | |
| 84 | -#ifdef HAVE_LIBSSL | |
| 85 | - static const struct ssl_status_msg status_msg[] = | |
| 86 | - { | |
| 85 | +static const struct ssl_status_msg status_msg[] = | |
| 86 | +{ | |
| 87 | 87 | // http://www.openssl.org/docs/apps/verify.html |
| 88 | 88 | { |
| 89 | 89 | X509_V_OK, |
| ... | ... | @@ -417,22 +417,22 @@ void set_ssl_state(H3270 *hSession, LIB3270_SSL_STATE state) |
| 417 | 417 | |
| 418 | 418 | #else |
| 419 | 419 | |
| 420 | - const char * lib3270_get_ssl_state_message(H3270 *hSession) | |
| 420 | + const char * lib3270_get_ssl_state_message(const H3270 *hSession) | |
| 421 | 421 | { |
| 422 | 422 | return lib3270_get_hostname(hSession); |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | - const char * lib3270_get_ssl_state_description(H3270 *hSession) | |
| 425 | + const char * lib3270_get_ssl_state_description(const H3270 *hSession) | |
| 426 | 426 | { |
| 427 | 427 | return _( "The connection is insecure" ); |
| 428 | 428 | } |
| 429 | 429 | |
| 430 | - LIB3270_NOTIFY lib3270_get_ssl_state_icon(H3270 *hSession) | |
| 430 | + LIB3270_NOTIFY lib3270_get_ssl_state_icon(const H3270 *hSession) | |
| 431 | 431 | { |
| 432 | 432 | return LIB3270_NOTIFY_ERROR; |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | - const char * lib3270_get_ssl_state_icon_name(H3270 *hSession) | |
| 435 | + const char * lib3270_get_ssl_state_icon_name(const H3270 *hSession) | |
| 436 | 436 | { |
| 437 | 437 | return "dialog-error"; |
| 438 | 438 | } | ... | ... |