|
1 |
| -from typing import Any |
| 1 | +from _typeshed import Incomplete |
| 2 | +from ssl import SSLObject, SSLSocket |
| 3 | +from typing_extensions import Literal |
| 4 | + |
| 5 | +from cryptography.x509.base import Certificate |
| 6 | +from OpenSSL.SSL import Connection |
| 7 | + |
| 8 | +def ocsp_staple_verifier(con: Connection, ocsp_bytes: bytes, expected: bytes | None = ...) -> Literal[True]: ... |
2 | 9 |
|
3 | 10 | class OCSPVerifier:
|
4 |
| - SOCK: Any |
5 |
| - HOST: Any |
6 |
| - PORT: Any |
7 |
| - CA_CERTS: Any |
8 |
| - def __init__(self, sock, host, port, ca_certs: Any | None = ...) -> None: ... |
9 |
| - def components_from_socket(self): ... |
10 |
| - def components_from_direct_connection(self): ... |
11 |
| - def build_certificate_url(self, server, cert, issuer_cert): ... |
12 |
| - def check_certificate(self, server, cert, issuer_url): ... |
13 |
| - def is_valid(self): ... |
| 11 | + SOCK: SSLObject | SSLSocket |
| 12 | + HOST: str |
| 13 | + PORT: int |
| 14 | + CA_CERTS: str | None |
| 15 | + def __init__(self, sock: SSLObject | SSLSocket, host: str, port: int, ca_certs: str | None = ...) -> None: ... |
| 16 | + # cryptography.x509.general_name.GeneralName.value is typed as Any |
| 17 | + def components_from_socket(self) -> tuple[Certificate, Incomplete | None, Incomplete]: ... |
| 18 | + def components_from_direct_connection(self) -> tuple[Certificate, Incomplete | None, Incomplete]: ... |
| 19 | + def build_certificate_url(self, server: str, cert: Certificate, issuer_cert: Certificate) -> str: ... |
| 20 | + def check_certificate(self, server: str, cert: Certificate, issuer_url: str | bytes) -> Literal[True]: ... |
| 21 | + def is_valid(self) -> Literal[True]: ... |
0 commit comments