Skip to content

Fix JA4 cipher counting - #46

Merged
vlvkobal merged 3 commits into
mainfrom
fix-cipher-count
Jan 27, 2026
Merged

Fix JA4 cipher counting#46
vlvkobal merged 3 commits into
mainfrom
fix-cipher-count

Conversation

@vlvkobal

Copy link
Copy Markdown
Collaborator

This PR fixes incorrect JA4 cipher counts when clients send non-valid or unknown cipher suites.

The module previously used SSL_get_client_ciphers(), which returns OpenSSL’s filtered cipher list and can drop unsupported ciphers. This caused JA4 to undercount. The fix switches to SSL_get0_raw_cipherlist(), using the raw ClientHello cipher list as sent by the client.

A uTLS integration test was added to verify correct counting when unknown ciphers are present.

@vlvkobal vlvkobal linked an issue Jan 22, 2026 that may be closed by this pull request
@vlvkobal
vlvkobal marked this pull request as ready for review January 22, 2026 17:53
@vlvkobal
vlvkobal merged commit 660858f into main Jan 27, 2026
1 check passed
@vlvkobal
vlvkobal deleted the fix-cipher-count branch January 27, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect cipher suite count

2 participants