Actions
Bug #9080
closed
VJ
VJ
lua/tls: get_client_cert_info() reports the server-negotiated version
Bug #9080:
lua/tls: get_client_cert_info() reports the server-negotiated version
Affected Versions:
Effort:
Difficulty:
Label:
Description
- Status: present in
main(9b7938aec); correctness bug - Class: wrong data returned per API direction
- Component:
src/util-lua-tls.c:174(GetCertInfo)
Description¶
GetCertInfo(luastate, client, ssl_state) selects connp from the direction (:163-167) but always formats the version from ssl_state->server_connp.version:
get_client_cert_info() therefore reports the server-negotiated version (or "Unknown"/0 before the ServerHello) instead of the client version, while doc/userguide/lua/libs/tls.rst documents version, subject, issuer, fingerprint = t:get_client_cert_info().
Trigger: mutual-TLS flow; a rule or output script calling get_client_cert_info() reads the wrong version.
Fix direction¶
Use connp->version (the selected direction's connection parser).
Test¶
lua-tls-client-cert-info-version (mTLS pcap; assert the client version, not the server one).
JI Updated by Jason Ish about 1 month ago
- Status changed from New to In Review
MR1382
JI Updated by Jason Ish about 1 month ago
- Assignee set to Victor Julien
Actions