mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 00:24:24 +08:00
cryptography: make oid attributes readonly (#7731)
This commit is contained in:
@@ -25,6 +25,7 @@ cryptography.x509.CertificateRevocationListBuilder.last_update
|
||||
cryptography.x509.CertificateRevocationListBuilder.next_update
|
||||
cryptography.x509.CertificateSigningRequestBuilder.__init__
|
||||
cryptography.x509.Extension.__init__
|
||||
cryptography.x509.ExtensionType.oid # is a property at runtime, but a different descriptor on subclasses, easier just to pretend it's writeable
|
||||
cryptography.x509.Extensions.__init__
|
||||
cryptography.x509.NameAttribute.__init__
|
||||
cryptography.x509.OCSPExtensionOID
|
||||
|
||||
@@ -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