Commit 7dd1add60b0d2527f1a80ddcb9020529cb3a7911
1 parent
e61d0ada
Exists in
master
and in
3 other branches
Fixing warnings and SSL information dialogs.
Showing
5 changed files
with
9 additions
and
11 deletions
Show diff stats
src/core/wait.c
| @@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
| 34 | 34 | ||
| 35 | /*---[ Implement ]------------------------------------------------------------------------------------------*/ | 35 | /*---[ Implement ]------------------------------------------------------------------------------------------*/ |
| 36 | 36 | ||
| 37 | -LIB3270_EXPORT int lib3270_wait_for_update(H3270 *hSession, int seconds) | 37 | +LIB3270_EXPORT int lib3270_wait_for_update(H3270 GNUC_UNUSED(*hSession), int GNUC_UNUSED(seconds)) |
| 38 | { | 38 | { |
| 39 | return errno = ENOTSUP; | 39 | return errno = ENOTSUP; |
| 40 | } | 40 | } |
src/include/lib3270.h
| @@ -493,7 +493,7 @@ | @@ -493,7 +493,7 @@ | ||
| 493 | LIB3270_EXPORT const char * lib3270_get_crl_url(const H3270 *hSession); | 493 | LIB3270_EXPORT const char * lib3270_get_crl_url(const H3270 *hSession); |
| 494 | 494 | ||
| 495 | LIB3270_EXPORT int lib3270_set_crl_prefered_protocol(H3270 *hSession, const char *protocol); | 495 | LIB3270_EXPORT int lib3270_set_crl_prefered_protocol(H3270 *hSession, const char *protocol); |
| 496 | - LIB3270_EXPORT const char * lib3270_get_crl_prefered_protocol(H3270 *hSession); | 496 | + LIB3270_EXPORT const char * lib3270_get_crl_prefered_protocol(const H3270 *hSession); |
| 497 | 497 | ||
| 498 | /** | 498 | /** |
| 499 | * @brief Get hostname for the connect/reconnect operations. | 499 | * @brief Get hostname for the connect/reconnect operations. |
src/ssl/linux/ldap.c
| @@ -39,6 +39,8 @@ | @@ -39,6 +39,8 @@ | ||
| 39 | #include <lib3270/trace.h> | 39 | #include <lib3270/trace.h> |
| 40 | #include <lib3270/toggle.h> | 40 | #include <lib3270/toggle.h> |
| 41 | 41 | ||
| 42 | +#include "utilc.h" | ||
| 43 | + | ||
| 42 | #if defined(HAVE_LIBSSL) && defined(SSL_ENABLE_CRL_CHECK) && defined(HAVE_LDAP) | 44 | #if defined(HAVE_LIBSSL) && defined(SSL_ENABLE_CRL_CHECK) && defined(HAVE_LDAP) |
| 43 | 45 | ||
| 44 | #include <openssl/ssl.h> | 46 | #include <openssl/ssl.h> |
src/ssl/negotiate.c
| @@ -134,7 +134,7 @@ static int background_ssl_init(H3270 *hSession, void *message) | @@ -134,7 +134,7 @@ static int background_ssl_init(H3270 *hSession, void *message) | ||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | #if !defined(SSL_DEFAULT_CRL_URL) && defined(SSL_ENABLE_CRL_CHECK) | 136 | #if !defined(SSL_DEFAULT_CRL_URL) && defined(SSL_ENABLE_CRL_CHECK) |
| 137 | -int x509_store_ctx_error_callback(int ok, X509_STORE_CTX *ctx) | 137 | +int x509_store_ctx_error_callback(int ok, X509_STORE_CTX GNUC_UNUSED(*ctx)) |
| 138 | { | 138 | { |
| 139 | debug("%s(%d)",__FUNCTION__,ok); | 139 | debug("%s(%d)",__FUNCTION__,ok); |
| 140 | 140 | ||
| @@ -266,6 +266,8 @@ static int background_ssl_negotiation(H3270 *hSession, void *message) | @@ -266,6 +266,8 @@ static int background_ssl_negotiation(H3270 *hSession, void *message) | ||
| 266 | else | 266 | else |
| 267 | rv = X509_V_OK; | 267 | rv = X509_V_OK; |
| 268 | 268 | ||
| 269 | + SSL_set_verify_result(hSession->ssl.con, rv); | ||
| 270 | + | ||
| 269 | X509_STORE_CTX_free(csc); | 271 | X509_STORE_CTX_free(csc); |
| 270 | 272 | ||
| 271 | #else | 273 | #else |
src/ssl/properties.c
| @@ -176,7 +176,7 @@ LIB3270_EXPORT char * lib3270_get_ssl_peer_certificate_text(const H3270 *hSessio | @@ -176,7 +176,7 @@ LIB3270_EXPORT char * lib3270_get_ssl_peer_certificate_text(const H3270 *hSessio | ||
| 176 | 176 | ||
| 177 | #pragma GCC diagnostic push | 177 | #pragma GCC diagnostic push |
| 178 | #pragma GCC diagnostic ignored "-Wunused-parameter" | 178 | #pragma GCC diagnostic ignored "-Wunused-parameter" |
| 179 | - const char * lib3270_get_crl_prefered_protocol(H3270 *hSession) | 179 | + const char * lib3270_get_crl_prefered_protocol(const H3270 *hSession) |
| 180 | { | 180 | { |
| 181 | #ifdef SSL_ENABLE_CRL_CHECK | 181 | #ifdef SSL_ENABLE_CRL_CHECK |
| 182 | if(hSession->ssl.crl.prefer) | 182 | if(hSession->ssl.crl.prefer) |
| @@ -198,13 +198,7 @@ LIB3270_EXPORT char * lib3270_get_ssl_peer_certificate_text(const H3270 *hSessio | @@ -198,13 +198,7 @@ LIB3270_EXPORT char * lib3270_get_ssl_peer_certificate_text(const H3270 *hSessio | ||
| 198 | 198 | ||
| 199 | if(hSession->ssl.crl.prefer) | 199 | if(hSession->ssl.crl.prefer) |
| 200 | { | 200 | { |
| 201 | - free(hSession->ssl.crl.prefer); | ||
| 202 | - hSession->ssl.crl.prefer = NULL; | ||
| 203 | - } | ||
| 204 | - | ||
| 205 | - if(hSession->ssl.crl.prefer) | ||
| 206 | - { | ||
| 207 | - X509_CRL_free(hSession->ssl.crl.prefer); | 201 | + lib3270_free(hSession->ssl.crl.prefer); |
| 208 | hSession->ssl.crl.prefer = NULL; | 202 | hSession->ssl.crl.prefer = NULL; |
| 209 | } | 203 | } |
| 210 | 204 |