File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ class LifespanScope(TypedDict):
96
96
WWWScope = Union [HTTPScope , WebSocketScope ]
97
97
Scope = Union [HTTPScope , WebSocketScope , LifespanScope ]
98
98
99
+ class TLSInfo (TypedDict , total = False ):
100
+ type : Literal ["extensions.tls" ]
101
+ server_cert : str | None
102
+ client_cert_chain : list [str ]
103
+ tls_version : str | None
104
+ cipher_suite : str | None
99
105
100
106
class HTTPRequestEvent (TypedDict ):
101
107
type : Literal ["http.request" ]
Original file line number Diff line number Diff line change 3
3
import asyncio
4
4
import ssl
5
5
import urllib .parse
6
- from typing import TypedDict
6
+ from _types import TLSInfo
7
7
8
8
from uvicorn ._types import WWWScope
9
9
from uvicorn .config import Config
@@ -59,13 +59,6 @@ def get_path_with_query_string(scope: WWWScope) -> str:
59
59
return path_with_query_string
60
60
61
61
62
- class TLSInfo (TypedDict , total = False ):
63
- server_cert : str | None
64
- client_cert_chain : list [str ]
65
- tls_version : str | None
66
- cipher_suite : str | None
67
-
68
-
69
62
def get_tls_info (transport : asyncio .Transport , server_config : Config ) -> TLSInfo :
70
63
###
71
64
# server_cert: Unable to set from transport information, need to set from server_config
You can’t perform that action at this time.
0 commit comments