Commit 5c6f5670 authored by godog's avatar godog

set right version value (2) for version 3 certs

see also e8f12c4b
parent 41ee3024
...@@ -44,7 +44,8 @@ def sign_certificate(req, ca_key, ca_crt, serial_num, days, ...@@ -44,7 +44,8 @@ def sign_certificate(req, ca_key, ca_crt, serial_num, days,
cert.set_subject(req.get_subject()) cert.set_subject(req.get_subject())
cert.set_pubkey(req.get_pubkey()) cert.set_pubkey(req.get_pubkey())
if extensions: if extensions:
cert.set_version(3) # certificate version 3, not a typo
cert.set_version(2)
cert.add_extensions(extensions) cert.add_extensions(extensions)
cert.sign(ca_key, digest) cert.sign(ca_key, digest)
return cert return cert
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment