Home
last modified time | relevance | path

Searched refs:key_accept (Results 1 – 2 of 2) sorted by relevance

/Zephyr-latest/subsys/net/lib/http/
Dhttp_server_ws.c41 char key_accept[HTTP_SERVER_WS_MAX_SEC_KEY_LEN + sizeof(WS_MAGIC)]; in handle_http1_to_websocket_upgrade() local
48 key_len = MIN(sizeof(key_accept) - 1, sizeof(client->ws_sec_key)); in handle_http1_to_websocket_upgrade()
49 strncpy(key_accept, client->ws_sec_key, key_len); in handle_http1_to_websocket_upgrade()
50 key_len = strlen(key_accept); in handle_http1_to_websocket_upgrade()
52 olen = MIN(sizeof(key_accept) - 1 - key_len, sizeof(WS_MAGIC) - 1); in handle_http1_to_websocket_upgrade()
53 strncpy(key_accept + key_len, WS_MAGIC, olen); in handle_http1_to_websocket_upgrade()
55 mbedtls_sha1(key_accept, olen + key_len, accept); in handle_http1_to_websocket_upgrade()
/Zephyr-latest/subsys/net/lib/websocket/
Dwebsocket.c243 char key_accept[MAX_SEC_ACCEPT_LEN + sizeof(WS_MAGIC)]; in websocket_connect() local
337 key_len = MIN(sizeof(key_accept) - 1, olen); in websocket_connect()
338 strncpy(key_accept, sec_ws_key + sizeof("Sec-Websocket-Key: ") - 1, in websocket_connect()
341 olen = MIN(sizeof(key_accept) - 1 - key_len, sizeof(WS_MAGIC) - 1); in websocket_connect()
342 strncpy(key_accept + key_len, WS_MAGIC, olen); in websocket_connect()
345 mbedtls_sha1(key_accept, olen + key_len, sec_accept_key); in websocket_connect()