mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-05 22:54:17 +08:00
cryptography: make oid attributes readonly (#7731)
This commit is contained in:
@@ -109,7 +109,8 @@ class ExtendedKeyUsageOID:
|
||||
ANY_EXTENDED_KEY_USAGE: ClassVar[ObjectIdentifier]
|
||||
|
||||
class NameAttribute:
|
||||
oid: ObjectIdentifier
|
||||
@property
|
||||
def oid(self) -> ObjectIdentifier: ...
|
||||
@property
|
||||
def value(self) -> str: ...
|
||||
def __init__(self, oid: ObjectIdentifier, value: str) -> None: ...
|
||||
@@ -332,7 +333,8 @@ _T = TypeVar("_T", bound=ExtensionType)
|
||||
class Extension(Generic[_T]):
|
||||
@property
|
||||
def critical(self) -> bool: ...
|
||||
oid: ObjectIdentifier
|
||||
@property
|
||||
def oid(self) -> ObjectIdentifier: ...
|
||||
@property
|
||||
def value(self) -> _T: ...
|
||||
|
||||
@@ -453,6 +455,8 @@ class ExtendedKeyUsage(ExtensionType):
|
||||
class UnrecognizedExtension(ExtensionType):
|
||||
@property
|
||||
def value(self) -> bytes: ...
|
||||
@property
|
||||
def oid(self) -> ObjectIdentifier: ... # type: ignore[override]
|
||||
def __init__(self, oid: ObjectIdentifier, value: bytes) -> None: ...
|
||||
|
||||
def load_der_x509_certificate(data: bytes, backend: X509Backend | None = ...) -> Certificate: ...
|
||||
|
||||
Reference in New Issue
Block a user