rename ObjectIdentifier.value to dotted_string
diff --git a/docs/x509.rst b/docs/x509.rst
index 9406bd8..aea084f 100644
--- a/docs/x509.rst
+++ b/docs/x509.rst
@@ -206,7 +206,7 @@
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 1b8d635..7f3ace4 100644
--- a/src/cryptography/x509.py
+++ b/src/cryptography/x509.py
@@ -75,24 +75,25 @@
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")