Merge pull request #3659 from vin01/master
Add EKU extension for dummy certificates
This commit is contained in:
commit
fed3d3eb37
|
@ -115,6 +115,13 @@ def dummy_cert(privkey, cacert, commonname, sans, organization):
|
|||
cert.set_version(2)
|
||||
cert.add_extensions(
|
||||
[OpenSSL.crypto.X509Extension(b"subjectAltName", False, ss)])
|
||||
cert.add_extensions([
|
||||
OpenSSL.crypto.X509Extension(
|
||||
b"extendedKeyUsage",
|
||||
False,
|
||||
b"serverAuth,clientAuth"
|
||||
)
|
||||
])
|
||||
cert.set_pubkey(cacert.get_pubkey())
|
||||
cert.sign(privkey, "sha256")
|
||||
return Cert(cert)
|
||||
|
|
Loading…
Reference in New Issue