Skip to content

Commit

Permalink
[tls] Fix X509StoreContextError usage for pyOpenSSL >= 22
Browse files Browse the repository at this point in the history
To keep things simple we now required pyOpenSSL >= 22 and remove the
pinned dependency on cryptography.
  • Loading branch information
meitinger authored and jlaine committed Apr 2, 2023
1 parent 950167a commit 09a0833
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ classifiers = [
]
dependencies = [
"certifi",
"cryptography>=3.1,<39",
"pylsqpack>=0.3.3,<0.4.0",
"pyopenssl>=20,<22",
"pyopenssl>=22",
]
dynamic = ["version"]

Expand Down
2 changes: 1 addition & 1 deletion src/aioquic/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def verify_certificate(
try:
store_ctx.verify_certificate()
except crypto.X509StoreContextError as exc:
raise AlertBadCertificate(exc.args[0][2])
raise AlertBadCertificate(exc.args[0])


class CipherSuite(IntEnum):
Expand Down

0 comments on commit 09a0833

Please sign in to comment.