diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptography/x509.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py index 7eb9a608..21693ed4 100644 --- a/src/cryptography/x509.py +++ b/src/cryptography/x509.py @@ -111,19 +111,21 @@ class Name(object): def get_attributes_for_oid(self, oid): return [i for i in self._attributes if i.oid == oid] - @property - def attributes(self): - return self._attributes[:] - def __eq__(self, other): if not isinstance(other, Name): return NotImplemented - return self.attributes == other.attributes + return self._attributes == other._attributes def __ne__(self, other): return not self == other + def __iter__(self): + return iter(self._attributes[:]) + + def __len__(self): + return len(self._attributes) + OID_COMMON_NAME = ObjectIdentifier("2.5.4.3") OID_COUNTRY_NAME = ObjectIdentifier("2.5.4.6") |