diff --git a/tests/wpt/web-platform-tests/tools/sslutils/openssl.py b/tests/wpt/web-platform-tests/tools/sslutils/openssl.py index 2bbc0fa7545..754bc946c7e 100644 --- a/tests/wpt/web-platform-tests/tools/sslutils/openssl.py +++ b/tests/wpt/web-platform-tests/tools/sslutils/openssl.py @@ -252,7 +252,10 @@ class OpenSSLEnvironment(object): with open(path("index.txt"), "w"): pass with open(path("serial"), "w") as f: - f.write(str(random.randint(0, 1000000))) + serial = str(random.randint(0, 1000000)) + if len(serial) % 2: + serial = "0" + serial + f.write(serial) self.path = path