aboutsummaryrefslogtreecommitdiffstats
path: root/test/recipes
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2024-01-29 14:20:01 +0000
committerHugo Landau <hlandau@openssl.org>2024-02-02 11:50:30 +0000
commit26e4bac4db5be2eefd894c102b1a65a752ebaefd (patch)
tree69e308e9a86c09eb675cdbc04dd7aa1651066d46 /test/recipes
parent24132503b3921ad6844bd64a9303f658f583f30c (diff)
downloadopenssl-26e4bac4db5be2eefd894c102b1a65a752ebaefd.tar.gz
QUIC QLOG: Record implementation version
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22037)
Diffstat (limited to 'test/recipes')
-rwxr-xr-xtest/recipes/70-test_quic_multistream_data/verify-qlog.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/recipes/70-test_quic_multistream_data/verify-qlog.py b/test/recipes/70-test_quic_multistream_data/verify-qlog.py
index 08702410a3..b5e2519b43 100755
--- a/test/recipes/70-test_quic_multistream_data/verify-qlog.py
+++ b/test/recipes/70-test_quic_multistream_data/verify-qlog.py
@@ -6,7 +6,9 @@
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
-import sys, os, os.path, glob, json
+import sys, os, os.path, glob, json, re
+
+re_version = re.compile(r'''^OpenSSL/[0-9]+\.[0-9]\.[0-9](-[^ ]+)? ([^)]+)''')
class Unexpected(Exception):
def __init__(self, filename, msg):
@@ -46,6 +48,13 @@ def check_header(filename, hdr):
if hdr_trace["vantage_point"].get('type') not in ('client', 'server'):
raise Unexpected(filename, "unexpected vantage_point")
+ vp_name = hdr_trace["vantage_point"].get('name')
+ if type(vp_name) != str:
+ raise Unexpected(filename, "expected vantage_point name")
+
+ if not re_version.match(vp_name):
+ raise Unexpected(filename, "expected correct vantage_point format")
+
hdr_common_fields = hdr_trace["common_fields"]
if hdr_common_fields.get("time_format") != "delta":
raise Unexpected(filename, "must have expected time_format")