mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-01 18:27:18 +00:00
fix certificates generated by dummy_cert on clients that require AuthorityKeyIdentifier (#6410)
* fix certificates generated by dummy_cert on clients that require AuthorityKeyIdentifier * add changelog item
This commit is contained in:
parent
bacbaadb01
commit
c3d2a9dac4
2 changed files with 15 additions and 0 deletions
|
|
@ -6,6 +6,8 @@
|
|||
([#6389](https://github.com/mitmproxy/mitmproxy/pull/6389), @mhils)
|
||||
* Add a contentview for DNS-over-HTTPS.
|
||||
([#6389](https://github.com/mitmproxy/mitmproxy/pull/6389), @mhils)
|
||||
* Fix certificate generation to work with strict mode OpenSSL 3.x clients
|
||||
([#6410](https://github.com/mitmproxy/mitmproxy/pull/6410), @mmaxim)
|
||||
|
||||
|
||||
## 27 September 2023: mitmproxy 10.1.1
|
||||
|
|
|
|||
|
|
@ -278,6 +278,19 @@ def dummy_cert(
|
|||
builder = builder.add_extension(
|
||||
x509.SubjectAlternativeName(ss), critical=not is_valid_commonname
|
||||
)
|
||||
|
||||
# we just use the same key as the CA for these certs, so put that in the SKI extension
|
||||
builder = builder.add_extension(
|
||||
x509.SubjectKeyIdentifier.from_public_key(privkey.public_key()),
|
||||
critical=False,
|
||||
)
|
||||
# add authority key identifier for the cacert issuing cert for greater acceptance by
|
||||
# client TLS libraries (such as OpenSSL 3.x)
|
||||
builder = builder.add_extension(
|
||||
x509.AuthorityKeyIdentifier.from_issuer_public_key(cacert.public_key()),
|
||||
critical=False,
|
||||
)
|
||||
|
||||
cert = builder.sign(private_key=privkey, algorithm=hashes.SHA256()) # type: ignore
|
||||
return Cert(cert)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue