Skip to content
Myr

Use urllib3's DEFAULT_CIPHERS for ssl config (#100)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by GitHub · parent 7ff8483 · Browse files · 2 files+22 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+22 added−6 removed

  • other:+22 added−6 removed

2 files+22 added−6 removed

modified:http3/__init__.py+1 added-1 removed
47 unmodified lines
48 Response,49)50from .status_codes import StatusCode, codes5152__version__ = "0.6.1"52__version__ = "0.6.2"
modified:http3/config.py+21 added-5 removed
8 unmodified lines
9VerifyTypes = typing.Union[str, bool]10TimeoutTypes = typing.Union[float, typing.Tuple[float, float, float], "TimeoutConfig"]111213DEFAULT_CIPHERS = ":".join(14 [15 "ECDHE+AESGCM",16 "ECDHE+CHACHA20",17 "DHE+AESGCM",18 "DHE+CHACHA20",19 "ECDH+AESGCM",20 "DH+AESGCM",21 "ECDH+AES",22 "DH+AES",23 "RSA+AESGCM",24 "RSA+AES",25 "!aNULL",26 "!eNULL",27 "!MD5",28 "!DSS",29 ]30)313233class SSLConfig:34 """35 SSL Configuration.36 """
67 unmodified lines
104 context.options |= ssl.OP_NO_SSLv2105 context.options |= ssl.OP_NO_SSLv3106 context.options |= ssl.OP_NO_COMPRESSION10788 # RFC 7540 Section 9.2.2: "deployments of HTTP/2 that use TLS 1.2 MUST89 # support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256". In practice, the90 # blacklist defined in this section allows only the AES GCM and ChaCha2091 # cipher suites with ephemeral key negotiation.92 context.set_ciphers("ECDHE+AESGCM:ECDHE+CHACHA20:DHE+AESGCM:DHE+CHACHA20")108 context.set_ciphers(DEFAULT_CIPHERS)109110 if ssl.HAS_ALPN:111 context.set_alpn_protocols(["h2", "http/1.1"])112 if ssl.HAS_NPN:
100 unmodified lines