extensions aren't supported in v1, set to v3 (value=2) if using them.

This commit is contained in:
Tim Becker 2013-04-19 15:37:14 +02:00
parent a94d17970e
commit 241465c368
1 changed files with 1 additions and 0 deletions

View File

@ -110,6 +110,7 @@ def dummy_cert(fp, ca, commonname, sans):
cert.set_subject(req.get_subject())
cert.set_serial_number(int(time.time()*10000))
if ss:
cert.set_version(2)
cert.add_extensions([OpenSSL.crypto.X509Extension("subjectAltName", True, ss)])
cert.set_pubkey(req.get_pubkey())
cert.sign(key, "sha1")