diff options
author | V.Krishn <vkrishn4@gmail.com> | 2019-01-14 00:27:05 +0530 |
---|---|---|
committer | V.Krishn <vkrishn4@gmail.com> | 2019-01-14 00:27:05 +0530 |
commit | b3a9450c684ee444df84b1a090b0e15ae2a9f559 (patch) | |
tree | fe842d750532c30b02d3e93cd3ad449bdcf3524e | |
parent | f5a446917145381dd38ba677e2731b1d1516dc9c (diff) | |
download | mqtt-dirpub-b3a9450c684ee444df84b1a090b0e15ae2a9f559.tar.bz2 |
update to mosquitto-v1.5.5
-rw-r--r-- | client_shared.c | 10 | ||||
-rw-r--r-- | client_shared.h | 2 | ||||
-rw-r--r-- | sub_client.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/client_shared.c b/client_shared.c index ea691e3..1c4b4f9 100644 --- a/client_shared.c +++ b/client_shared.c @@ -157,7 +157,7 @@ void client_config_cleanup(struct mosq_config *cfg) free(cfg->keyfile); free(cfg->ciphers); free(cfg->tls_version); -# ifdef WITH_TLS_PSK +# ifdef FINAL_WITH_TLS_PSK free(cfg->psk); free(cfg->psk_identity); # endif @@ -320,7 +320,7 @@ int client_config_load(struct mosq_config *cfg, int pub_or_sub, int argc, char * return 1; } #endif -#ifdef WITH_TLS_PSK +#ifdef FINAL_WITH_TLS_PSK if((cfg->cafile || cfg->capath) && cfg->psk){ if(!cfg->quiet) fprintf(stderr, "Error: Only one of --psk or --cafile/--capath may be used at once.\n"); return 1; @@ -705,7 +705,7 @@ int client_config_line_proc(struct mosq_config *cfg, int pub_or_sub, int argc, c i++; } #endif -#ifdef WITH_TLS_PSK +#ifdef FINAL_WITH_TLS_PSK }else if(!strcmp(argv[i], "--psk")){ if(i==argc-1){ fprintf(stderr, "Error: --psk argument given but no key specified.\n\n"); @@ -944,7 +944,7 @@ int client_opts_set(struct mosquitto *mosq, struct mosq_config *cfg) mosquitto_lib_cleanup(); return 1; } -# ifdef WITH_TLS_PSK +# ifdef FINAL_WITH_TLS_PSK if(cfg->psk && mosquitto_tls_psk_set(mosq, cfg->psk, cfg->psk_identity, NULL)){ if(!cfg->quiet) fprintf(stderr, "Error: Problem setting TLS-PSK options.\n"); mosquitto_lib_cleanup(); @@ -1017,7 +1017,7 @@ int client_connect(struct mosquitto *mosq, struct mosq_config *cfg) if(cfg->port < 0){ #ifdef WITH_TLS if(cfg->cafile || cfg->capath -# ifdef WITH_TLS_PSK +# ifdef FINAL_WITH_TLS_PSK || cfg->psk # endif ){ diff --git a/client_shared.h b/client_shared.h index 70692c5..cfc0bb5 100644 --- a/client_shared.h +++ b/client_shared.h @@ -68,7 +68,7 @@ struct mosq_config { char *ciphers; bool insecure; char *tls_version; -# ifdef WITH_TLS_PSK +# ifdef FINAL_WITH_TLS_PSK char *psk; char *psk_identity; # endif diff --git a/sub_client.c b/sub_client.c index 12caf8d..7ccaafe 100644 --- a/sub_client.c +++ b/sub_client.c @@ -510,7 +510,7 @@ void print_usage(void) #ifdef WITH_TLS printf(" [{--cafile file | --capath dir} [--cert file] [--key file]\n"); printf(" [--ciphers ciphers] [--insecure]]\n"); -#ifdef WITH_TLS_PSK +#ifdef FINAL_WITH_TLS_PSK printf(" [--psk hex-key --psk-identity identity [--ciphers ciphers]]\n"); #endif #endif @@ -580,7 +580,7 @@ void print_usage(void) printf(" hostname. Using this option means that you cannot be sure that the\n"); printf(" remote host is the server you wish to connect to and so is insecure.\n"); printf(" Do not use this option in a production environment.\n"); -#ifdef WITH_TLS_PSK +#ifdef FINAL_WITH_TLS_PSK printf(" --psk : pre-shared-key in hexadecimal (no leading 0x) to enable TLS-PSK mode.\n"); printf(" --psk-identity : client identity string for TLS-PSK mode.\n"); #endif |