Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated ssl.match_hostname method (fixes: #368) #389

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

jlaine
Copy link
Contributor

@jlaine jlaine commented Jul 5, 2023

The standard libraries's ssl.match_hostname method was marked as deprecated in Python 3.10. Rather than implementing this critical piece of code ourselves, make use of the Python Cryptographic Authority's service-identity package.

One notable behaviour change is that validation is performed only against the subjectAltName extension instead of the commonName. This is the same behaviour as web browsers use.

@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (33b7609) 100.00% compared to head (2c40dd5) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #389   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         4551      4542    -9     
=========================================
- Hits          4551      4542    -9     
Impacted Files Coverage Δ
src/aioquic/tls.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

The standard libraries's `ssl.match_hostname` method was marked as
deprecated in Python 3.10. Rather than implementing this critical piece
of code ourselves, make use of the Python Cryptographic Authority's
`service-identity` package.

One notable behaviour change is that validation is performed *only*
against the `subjectAltName` extension instead of the `commonName`. This
is the same behaviour as web browsers use.
@jlaine jlaine merged commit b097478 into aiortc:main Jul 5, 2023
25 checks passed
@jlaine jlaine deleted the use-service-identity branch July 5, 2023 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant