You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2026/09/28 16:04:37 UTC

(trafficserver) branch master updated: Fix SSL 2.0 version code in JA4 fingerprints (#13728)

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new c5ae69c8ea Fix SSL 2.0 version code in JA4 fingerprints (#13728)
c5ae69c8ea is described below

commit c5ae69c8ea1bd399339337b09c73b202b3332724
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Sep 28 10:04:29 2026 -0600

    Fix SSL 2.0 version code in JA4 fingerprints (#13728)
    
    The ja4_fingerprint and jax_fingerprint plugins reported SSL 2.0 as
    "s2" for version 0x0200 and emitted an "s1" code for 0x0100, neither
    of which matches the JA4 spec. The spec maps 0x0002 to "s2" and has
    no SSL 1.0 code, so 0x0200 and 0x0100 now report "00" like any other
    unknown version.
---
 plugins/experimental/ja4_fingerprint/ja4.cc      | 4 +---
 plugins/experimental/ja4_fingerprint/test_ja4.cc | 7 +++++--
 plugins/experimental/jax_fingerprint/ja4/ja4.cc  | 6 +-----
 plugins/experimental/jax_fingerprint/ja4/test.cc | 7 +++++--
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/plugins/experimental/ja4_fingerprint/ja4.cc b/plugins/experimental/ja4_fingerprint/ja4.cc
index a3f37dd3cd..b08c09de50 100644
--- a/plugins/experimental/ja4_fingerprint/ja4.cc
+++ b/plugins/experimental/ja4_fingerprint/ja4.cc
@@ -80,10 +80,8 @@ convert_TLS_version_to_string(std::uint16_t TLS_version)
     return "10";
   case 0x300:
     return "s3";
-  case 0x200:
+  case 0x002:
     return "s2";
-  case 0x100:
-    return "s1";
   case 0xfeff:
     return "d1";
   case 0xfefd:
diff --git a/plugins/experimental/ja4_fingerprint/test_ja4.cc b/plugins/experimental/ja4_fingerprint/test_ja4.cc
index 2ab490f1bf..0a4ba354a6 100644
--- a/plugins/experimental/ja4_fingerprint/test_ja4.cc
+++ b/plugins/experimental/ja4_fingerprint/test_ja4.cc
@@ -77,6 +77,10 @@ TEST_CASE("JA4")
     CHECK("00" == call_JA4(TLS_summary).substr(1, 2));
     TLS_summary.TLS_version = 0x234;
     CHECK("00" == call_JA4(TLS_summary).substr(1, 2));
+    TLS_summary.TLS_version = 0x200;
+    CHECK("00" == call_JA4(TLS_summary).substr(1, 2));
+    TLS_summary.TLS_version = 0x100;
+    CHECK("00" == call_JA4(TLS_summary).substr(1, 2));
   }
 
   SECTION("Given the TLS version is known, "
@@ -89,8 +93,7 @@ TEST_CASE("JA4")
       {0x302,  "11"},
       {0x301,  "10"},
       {0x300,  "s3"},
-      {0x200,  "s2"},
-      {0x100,  "s1"},
+      {0x002,  "s2"},
       {0xfeff, "d1"},
       {0xfefd, "d2"},
       {0xfefc, "d3"}
diff --git a/plugins/experimental/jax_fingerprint/ja4/ja4.cc b/plugins/experimental/jax_fingerprint/ja4/ja4.cc
index 416c3b2cfd..d8f55adfcb 100644
--- a/plugins/experimental/jax_fingerprint/ja4/ja4.cc
+++ b/plugins/experimental/jax_fingerprint/ja4/ja4.cc
@@ -105,14 +105,10 @@ convert_TLS_version_to_string(char *out, std::uint16_t version)
     out[0] = 's';
     out[1] = '3';
     break;
-  case 0x200:
+  case 0x002:
     out[0] = 's';
     out[1] = '2';
     break;
-  case 0x100:
-    out[0] = 's';
-    out[1] = '1';
-    break;
   case 0xfeff:
     out[0] = 'd';
     out[1] = '1';
diff --git a/plugins/experimental/jax_fingerprint/ja4/test.cc b/plugins/experimental/jax_fingerprint/ja4/test.cc
index 6581235a53..99c9d65286 100644
--- a/plugins/experimental/jax_fingerprint/ja4/test.cc
+++ b/plugins/experimental/jax_fingerprint/ja4/test.cc
@@ -211,6 +211,10 @@ TEST_CASE("JA4")
     CHECK("00" == call_JA4(datasource).substr(1, 2));
     datasource.set_version(0x234);
     CHECK("00" == call_JA4(datasource).substr(1, 2));
+    datasource.set_version(0x200);
+    CHECK("00" == call_JA4(datasource).substr(1, 2));
+    datasource.set_version(0x100);
+    CHECK("00" == call_JA4(datasource).substr(1, 2));
   }
 
   SECTION("Given the TLS version is known, "
@@ -223,8 +227,7 @@ TEST_CASE("JA4")
       {0x302,  "11"},
       {0x301,  "10"},
       {0x300,  "s3"},
-      {0x200,  "s2"},
-      {0x100,  "s1"},
+      {0x002,  "s2"},
       {0xfeff, "d1"},
       {0xfefd, "d2"},
       {0xfefc, "d3"}