aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-14 07:56:36 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-02-14 07:56:36 -0600
commit8b21a4a34a82ca0e73ca67bd3f148b25d6c7bdc6 (patch)
tree9f155d096a6d7343e28ff17f8107c04d3c982a1e /src
parent5ab6d6a5c05572bd1c75f05baf264a2d0001894a (diff)
downloadcryptography-8b21a4a34a82ca0e73ca67bd3f148b25d6c7bdc6.tar.gz
cryptography-8b21a4a34a82ca0e73ca67bd3f148b25d6c7bdc6.tar.bz2
cryptography-8b21a4a34a82ca0e73ca67bd3f148b25d6c7bdc6.zip
simplify things based on review feedback
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/backends/openssl/x509.py1
-rw-r--r--src/cryptography/x509.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/x509.py b/src/cryptography/hazmat/backends/openssl/x509.py
index ebfbf331..76dcf32f 100644
--- a/src/cryptography/hazmat/backends/openssl/x509.py
+++ b/src/cryptography/hazmat/backends/openssl/x509.py
@@ -115,6 +115,7 @@ class _Certificate(object):
assert data != self._backend._ffi.NULL
buf = self._backend._ffi.new("unsigned char **")
res = self._backend._lib.ASN1_STRING_to_UTF8(buf, data)
+ assert res >= 0
assert buf[0] != self._backend._ffi.NULL
buf = self._backend._ffi.gc(
buf, lambda buf: self._backend._lib.OPENSSL_free(buf[0])
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py
index 21693ed4..8a888d2a 100644
--- a/src/cryptography/x509.py
+++ b/src/cryptography/x509.py
@@ -121,7 +121,7 @@ class Name(object):
return not self == other
def __iter__(self):
- return iter(self._attributes[:])
+ return iter(self._attributes)
def __len__(self):
return len(self._attributes)