MCPcopy
hub / github.com/pyca/cryptography / get_extension_for_oid

Method get_extension_for_oid

src/cryptography/x509/extensions.py:116–123  ·  view source on GitHub ↗
(
        self, oid: ObjectIdentifier
    )

Source from the content-addressed store, hash-verified

114 self._extensions = list(extensions)
115
116 def get_extension_for_oid(
117 self, oid: ObjectIdentifier
118 ) -> Extension[ExtensionType]:
119 for ext in self:
120 if ext.oid == oid:
121 return ext
122
123 raise ExtensionNotFound(f"No {oid} extension was found", oid)
124
125 def get_extension_for_class(
126 self, extclass: type[ExtensionTypeVar]

Calls 1

ExtensionNotFoundClass · 0.85