mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Merge pull request #34 from bbaetz/master
Change the criticality of a number of X509 extentions, to match
This commit is contained in:
commit
5dcc7f78df
@ -31,10 +31,10 @@ def create_ca(o, cn, exp):
|
|||||||
"CA:TRUE"),
|
"CA:TRUE"),
|
||||||
OpenSSL.crypto.X509Extension("nsCertType", False,
|
OpenSSL.crypto.X509Extension("nsCertType", False,
|
||||||
"sslCA"),
|
"sslCA"),
|
||||||
OpenSSL.crypto.X509Extension("extendedKeyUsage", True,
|
OpenSSL.crypto.X509Extension("extendedKeyUsage", False,
|
||||||
"serverAuth,clientAuth,emailProtection,timeStamping,msCodeInd,msCodeCom,msCTLSign,msSGC,msEFS,nsSGC"
|
"serverAuth,clientAuth,emailProtection,timeStamping,msCodeInd,msCodeCom,msCTLSign,msSGC,msEFS,nsSGC"
|
||||||
),
|
),
|
||||||
OpenSSL.crypto.X509Extension("keyUsage", False,
|
OpenSSL.crypto.X509Extension("keyUsage", True,
|
||||||
"keyCertSign, cRLSign"),
|
"keyCertSign, cRLSign"),
|
||||||
OpenSSL.crypto.X509Extension("subjectKeyIdentifier", False, "hash",
|
OpenSSL.crypto.X509Extension("subjectKeyIdentifier", False, "hash",
|
||||||
subject=cert),
|
subject=cert),
|
||||||
@ -67,7 +67,7 @@ def dummy_cert(privkey, cacert, commonname, sans):
|
|||||||
cert.set_serial_number(int(time.time()*10000))
|
cert.set_serial_number(int(time.time()*10000))
|
||||||
if ss:
|
if ss:
|
||||||
cert.set_version(2)
|
cert.set_version(2)
|
||||||
cert.add_extensions([OpenSSL.crypto.X509Extension("subjectAltName", True, ss)])
|
cert.add_extensions([OpenSSL.crypto.X509Extension("subjectAltName", False, ss)])
|
||||||
cert.set_pubkey(cacert.get_pubkey())
|
cert.set_pubkey(cacert.get_pubkey())
|
||||||
cert.sign(privkey, "sha1")
|
cert.sign(privkey, "sha1")
|
||||||
return SSLCert(cert)
|
return SSLCert(cert)
|
||||||
|
Loading…
Reference in New Issue
Block a user