diff options
-rw-r--r-- | docs/x509.rst | 2 | ||||
-rw-r--r-- | src/cryptography/x509.py | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/docs/x509.rst b/docs/x509.rst index 9406bd88..aea084fe 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -206,7 +206,7 @@ X.509 Certificate Object Object identifiers (frequently seen abbreviated as OID) identify the type of a value (see: :class:`NameAttribute`). - .. attribute:: value + .. attribute:: dotted_string :type: :class:`str` diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 1b8d6357..7f3ace48 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -75,24 +75,25 @@ class NameAttribute(object): class ObjectIdentifier(object): - def __init__(self, oid): - self._value = oid + def __init__(self, dotted_string): + self._dotted_string = dotted_string def __eq__(self, other): if not isinstance(other, ObjectIdentifier): return NotImplemented - return self._value == other._value + return self._dotted_string == other._dotted_string def __ne__(self, other): return not self == other def __repr__(self): return "<ObjectIdentifier(oid={0}, name={1})>".format( - self._value, _OID_NAMES.get(self._value, "Unknown OID") + self._dotted_string, + _OID_NAMES.get(self._dotted_string, "Unknown OID") ) - value = utils.read_only_property("_value") + dotted_string = utils.read_only_property("_dotted_string") OID_COMMON_NAME = ObjectIdentifier("2.5.4.3") |