Skip to content

Commit

Permalink
tls: fix TLS1 constant
Browse files Browse the repository at this point in the history
We accidentally reused the value for SSL3 here.
This is not as a bad as a it looks: First, neither version
is enabled by default. Second, because of how Python enums
work, this simply made the `TLS1` version unavailable
as an option (which is how I detected it).
  • Loading branch information
mhils committed Sep 13, 2021
1 parent b26e76e commit c99ff55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 13 September 2021: mitmproxy 7.0.3

* Expose TLS 1.0 as possible minimum version on older pyOpenSSL releases

## 4 August 2021: mitmproxy 7.0.2

* Fix a WebSocket crash introduced in 7.0.1 (@mhils)
Expand Down
2 changes: 1 addition & 1 deletion mitmproxy/net/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Version(Enum):
UNBOUNDED = 0
# TODO: just SSL attributes once https://github.com/pyca/pyopenssl/pull/985 has landed.
SSL3 = getattr(SSL, "SSL3_VERSION", 768)
TLS1 = getattr(SSL, "TLS1_VERSION", 768)
TLS1 = getattr(SSL, "TLS1_VERSION", 769)
TLS1_1 = getattr(SSL, "TLS1_1_VERSION", 770)
TLS1_2 = getattr(SSL, "TLS1_2_VERSION", 771)
TLS1_3 = getattr(SSL, "TLS1_3_VERSION", 772)
Expand Down

0 comments on commit c99ff55

Please sign in to comment.