gh-128035: Add ssl.HAS_PHA to detect libssl PHA support (GH-128036)

* Add ssl.HAS_PHA to detect libssl Post-Handshake-Auth support

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Will Childs-Klein 2024-12-24 12:29:27 -06:00 committed by GitHub
parent 7985d460c7
commit 418114c139
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 26 additions and 4 deletions

View file

@ -2073,8 +2073,8 @@ class HTTPSTest(TestCase):
def test_tls13_pha(self):
import ssl
if not ssl.HAS_TLSv1_3:
self.skipTest('TLS 1.3 support required')
if not ssl.HAS_TLSv1_3 or not ssl.HAS_PHA:
self.skipTest('TLS 1.3 PHA support required')
# just check status of PHA flag
h = client.HTTPSConnection('localhost', 443)
self.assertTrue(h._context.post_handshake_auth)