mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Added missing type annotations and type arguments (#5070)
Co-authored-by: Eric Traut <erictr@microsoft.com> Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
This commit is contained in:
@@ -18,7 +18,7 @@ class PKey:
|
||||
def __init__(self) -> None: ...
|
||||
def to_cryptography_key(self) -> _Key: ...
|
||||
@classmethod
|
||||
def from_cryptography_key(cls, crypto_key: _Key): ...
|
||||
def from_cryptography_key(cls, crypto_key: _Key) -> PKey: ...
|
||||
def generate_key(self, type: int, bits: int) -> None: ...
|
||||
def check(self) -> bool: ...
|
||||
def type(self) -> int: ...
|
||||
@@ -175,7 +175,7 @@ class PKCS12:
|
||||
def set_ca_certificates(self, cacerts: Iterable[X509]) -> None: ...
|
||||
def set_friendlyname(self, name: bytes) -> None: ...
|
||||
def get_friendlyname(self) -> bytes: ...
|
||||
def export(self, passphrase: Optional[str] = ..., iter: int = ..., maciter: int = ...): ...
|
||||
def export(self, passphrase: Optional[str] = ..., iter: int = ..., maciter: int = ...) -> bytes: ...
|
||||
|
||||
class NetscapeSPKI:
|
||||
def __init__(self) -> None: ...
|
||||
@@ -186,9 +186,9 @@ class NetscapeSPKI:
|
||||
def set_pubkey(self, pkey: PKey) -> None: ...
|
||||
|
||||
def load_publickey(type: int, buffer: _StrLike) -> PKey: ...
|
||||
def load_privatekey(type: int, buffer: bytes, passphrase: Optional[Union[str, Callable[[int], int]]] = ...): ...
|
||||
def dump_certificate_request(type: int, req: X509Req): ...
|
||||
def load_certificate_request(type, buffer: _StrLike) -> X509Req: ...
|
||||
def load_privatekey(type: int, buffer: bytes, passphrase: Optional[Union[str, Callable[[int], int]]] = ...) -> PKey: ...
|
||||
def dump_certificate_request(type: int, req: X509Req) -> bytes: ...
|
||||
def load_certificate_request(type: int, buffer: _StrLike) -> X509Req: ...
|
||||
def sign(pkey: PKey, data: _StrLike, digest: str) -> bytes: ...
|
||||
def verify(cert: X509, signature: bytes, data: _StrLike, digest: str) -> None: ...
|
||||
def dump_crl(type: int, crl: CRL) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user