diff --git a/client/client_shared.c b/client/client_shared.c index d3c54e1b..c0379af4 100644 --- a/client/client_shared.c +++ b/client/client_shared.c @@ -1065,7 +1065,9 @@ unknown_option: int client_opts_set(struct mosquitto *mosq, struct mosq_config *cfg) { +#if defined(WITH_TLS) || defined(WITH_SOCKS) int rc; +#endif mosquitto_int_option(mosq, MOSQ_OPT_PROTOCOL_VERSION, cfg->protocol_version); diff --git a/lib/util_mosq.h b/lib/util_mosq.h index 253cc083..9ee570f3 100644 --- a/lib/util_mosq.h +++ b/lib/util_mosq.h @@ -33,7 +33,7 @@ int mosquitto__check_keepalive(struct mosquitto *mosq); uint16_t mosquitto__mid_generate(struct mosquitto *mosq); FILE *mosquitto__fopen(const char *path, const char *mode, bool restrict_read); -#ifdef FINAL_WITH_TLS_PSK +#ifdef WITH_TLS int mosquitto__hex2bin_sha1(const char *hex, unsigned char **bin); int mosquitto__hex2bin(const char *hex, unsigned char *bin, int bin_max_len); #endif diff --git a/src/handle_connect.c b/src/handle_connect.c index 6f78753d..5a276de3 100644 --- a/src/handle_connect.c +++ b/src/handle_connect.c @@ -367,13 +367,13 @@ int handle__connect(struct mosquitto_db *db, struct mosquitto *context) int rc; int slen; uint16_t slen16; - int i; mosquitto_property *properties = NULL; void *auth_data = NULL; uint16_t auth_data_len = 0; void *auth_data_out = NULL; uint16_t auth_data_out_len = 0; #ifdef WITH_TLS + int i; X509 *client_cert = NULL; X509_NAME *name; X509_NAME_ENTRY *name_entry;