Skip to content

Commit

Permalink
Add mqtt.require_time, use in Azure and GCP
Browse files Browse the repository at this point in the history
Azure (when using SAS token) and GCP require valid time to sign tokens.
It doesn't make sense to even bother connecting if time is not set.

CL: mqtt: Add mqtt.require_time, use in Azure and GCP

PUBLISHED_FROM=e09615bf127c39aa3fec11226230530d61cd0258
  • Loading branch information
Deomid Ryabkov authored and cesantabot committed Jan 21, 2019
1 parent c8008b6 commit a5203e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mgos_azure.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ bool mgos_azure_init(void) {
mcfg.client_id = mcfg.user = mcfg.pass = NULL;
mcfg.ssl_cert = mcfg.ssl_key = NULL;
mgos_mqtt_set_connect_fn(mgos_azure_mqtt_connect, s_ctx);
mcfg.require_time = true;
auth_method = "SAS";
} else if (mgos_sys_config_get_azure_host_name() != NULL &&
mgos_sys_config_get_azure_device_id() != NULL &&
Expand Down

0 comments on commit a5203e2

Please sign in to comment.