mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Ensure serial number conforms to OpenSSL's even-number-of-digits requirement.
This commit is contained in:
parent
887376b225
commit
cf073f1f0b
1 changed files with 4 additions and 1 deletions
|
@ -252,7 +252,10 @@ class OpenSSLEnvironment(object):
|
||||||
with open(path("index.txt"), "w"):
|
with open(path("index.txt"), "w"):
|
||||||
pass
|
pass
|
||||||
with open(path("serial"), "w") as f:
|
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
|
self.path = path
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue