diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2020-05-30 00:13:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-30 10:13:42 +0300 |
commit | 1ac12904b0697f1a3131af2f9ed3addc6b396ad9 (patch) | |
tree | 32aa7f70fc7bdbe4c80925161547199c02466266 /aclk | |
parent | fd109551e37532201a22f672c7d5ad1304206ed9 (diff) |
fix compilation for older systems (#9198)
inherit libs for clock_gettime() when building libmosquitto; Check that X509_VERIFY_PARAM_set1_host is available on the target system
Diffstat (limited to 'aclk')
-rw-r--r-- | aclk/aclk_lws_https_client.c | 4 | ||||
-rw-r--r-- | aclk/aclk_lws_wss_client.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/aclk/aclk_lws_https_client.c b/aclk/aclk_lws_https_client.c index cd17625232..018aee259c 100644 --- a/aclk/aclk_lws_https_client.c +++ b/aclk/aclk_lws_https_client.c @@ -193,6 +193,10 @@ int aclk_send_https_request(char *method, char *host, char *port, char *url, cha #else i.ssl_connection = LCCSCF_USE_SSL; #endif +#if defined(HAVE_X509_VERIFY_PARAM_set1_host) && HAVE_X509_VERIFY_PARAM_set1_host == 0 +#warning DISABLING SSL HOSTNAME VALIDATION BECAUSE IT IS NOT AVAILABLE ON THIS SYSTEM. + i.ssl_connection |= LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK; +#endif i.port = atoi(port); i.address = host; diff --git a/aclk/aclk_lws_wss_client.c b/aclk/aclk_lws_wss_client.c index 9b29188a76..9317d835b5 100644 --- a/aclk/aclk_lws_wss_client.c +++ b/aclk/aclk_lws_wss_client.c @@ -322,6 +322,10 @@ int aclk_lws_wss_connect(char *host, int port) #else i.ssl_connection = LCCSCF_USE_SSL; #endif +#if defined(HAVE_X509_VERIFY_PARAM_set1_host) && HAVE_X509_VERIFY_PARAM_set1_host == 0 +#warning DISABLING SSL HOSTNAME VALIDATION BECAUSE IT IS NOT AVAILABLE ON THIS SYSTEM. + i.ssl_connection |= LCCSCF_SKIP_SERVER_CERT_HOSTNAME_CHECK; +#endif lws_client_connect_via_info(&i); return 0; } |