Project

General

Profile

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

Added by Victor Julien 2 months ago. Updated 8 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Target 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:

SSLVersionToString(ssl_state->server_connp.version, ssl_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).


Subtasks 1 (0 open — 1 closed)

Bug #9330: lua/tls: get_client_cert_info() reports the server-negotiated version (8.0.x backport)ClosedVictor JulienActions
Actions

Also available in: PDF Atom