From 1fa690daa4a846ccd8bb77fc8fc1dd431f583a10 Mon Sep 17 00:00:00 2001 From: fooinha Date: Sat, 9 Feb 2019 18:01:23 +0000 Subject: [PATCH] nginx-ssl-ja3: bad byte swap --- src/ngx_ssl_ja3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ngx_ssl_ja3.c b/src/ngx_ssl_ja3.c index ec9a8c7..bb02543 100644 --- a/src/ngx_ssl_ja3.c +++ b/src/ngx_ssl_ja3.c @@ -334,7 +334,7 @@ ngx_ssl_ja3(ngx_connection_t *c, ngx_pool_t *pool, ngx_ssl_ja3_t *ja3) { ngx_memcpy(ja3->ciphers, ciphers_out, len); #if NGX_HAVE_LITTLE_ENDIAN for (size_t i = 0; i < ja3->ciphers_sz; ++i) { - ja3->ciphers[i] >>=8; + ja3->ciphers[i] = (ja3->ciphers[i] >> 8) | (ja3->ciphers[i] << 8); } #endif }