Skip to content

Commit 939aae7

Browse files
committed
acme: LWS_SYSBLOB_TYPE_EXT_AUTH1 dependent on SIGV4
1 parent a508e42 commit 939aae7

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

plugins/protocol_lws_acme_client/protocol_lws_acme_client_core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,16 @@ acme_ipc_save_payload(struct lws_context *cx, const char *uds_path, const char *
6666

6767
char header[3072];
6868
char jwt[2048] = {0};
69-
char temp[2048];
70-
size_t jwt_len = sizeof(jwt);
7169

7270
/* Sign the payload with the proxy 64-byte secret preamble */
71+
#if defined(LWS_WITH_SECURE_STREAMS_AUTH_SIGV4)
7372
lws_system_blob_t *b = lws_system_get_blob(cx, LWS_SYSBLOB_TYPE_EXT_AUTH1, 0);
7473
if (b) {
7574
size_t hex_len = lws_system_blob_get_size(b);
7675
if (hex_len > 0) {
7776
char hex[129];
77+
char temp[2048];
78+
size_t jwt_len = sizeof(jwt);
7879
struct lws_jwk jwk;
7980
if (hex_len >= sizeof(hex)) hex_len = sizeof(hex) - 1;
8081
lws_system_blob_get(b, (uint8_t *)hex, &hex_len, 0);
@@ -93,6 +94,7 @@ acme_ipc_save_payload(struct lws_context *cx, const char *uds_path, const char *
9394
lws_jwk_destroy(&jwk);
9495
}
9596
}
97+
#endif
9698

9799
int hlen = lws_snprintf(header, sizeof(header), "{\"req\":\"%s\",\"jwt\":\"%s\",\"domain\":\"%s\",\"subdomain\":\"%s\",\"zone\":\"", req, jwt, domain, filename);
98100
write(fd, header, (size_t)hlen);

plugins/protocol_lws_dht_dnssec_monitor/protocol_lws_dht_dnssec_monitor.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,11 +1150,13 @@ callback_dht_dnssec_monitor(struct lws *wsi, enum lws_callback_reasons reason,
11501150
lws_get_random(vhd->context, rand, sizeof(rand));
11511151
lws_hex_from_byte_array(rand, sizeof(rand), hex, sizeof(hex));
11521152

1153+
#if defined(LWS_WITH_SECURE_STREAMS_AUTH_SIGV4)
11531154
lws_system_blob_t *b = lws_system_get_blob(vhd->context, LWS_SYSBLOB_TYPE_EXT_AUTH1, 0);
11541155
if (b) {
11551156
lws_system_blob_heap_empty(b);
11561157
lws_system_blob_heap_append(b, (const uint8_t *)hex, strlen(hex));
11571158
}
1159+
#endif
11581160

11591161
/* Pass auth token directly to the child over non-visible stdin pipeline */
11601162
int fd = lws_spawn_get_fd_stdxxx(vhd->lsp, 0);

0 commit comments

Comments
 (0)