mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-31 07:18:58 +00:00
Fix problems with SANs and certificate generation.
This commit is contained in:
parent
2ba8296843
commit
2c73e8f816
@ -27,6 +27,7 @@ nsCertType = server
|
||||
basicConstraints = CA:false
|
||||
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
||||
nsCertType = server
|
||||
%(altnames)s
|
||||
|
||||
[ alt_names ]
|
||||
%(sans)s
|
||||
|
@ -300,7 +300,15 @@ def dummy_cert(certdir, ca, commonname, sans):
|
||||
ss = "\n".join(ss)
|
||||
|
||||
f = open(confpath, "w")
|
||||
f.write(template%(dict(commonname=commonname, sans=ss)))
|
||||
f.write(
|
||||
template%(
|
||||
dict(
|
||||
commonname=commonname,
|
||||
sans=ss,
|
||||
altnames="subjectAltName = @alt_names" if ss else ""
|
||||
)
|
||||
)
|
||||
)
|
||||
f.close()
|
||||
|
||||
if ca:
|
||||
|
Loading…
Reference in New Issue
Block a user