aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Cordasco <graffatcolmingov@gmail.com>2015-06-16 19:12:17 -0500
committerIan Cordasco <graffatcolmingov@gmail.com>2015-06-16 19:12:17 -0500
commit7618fbeb1fab995f5e44864ba9ace3ebdf4ebc5b (patch)
tree2b171188bf660403523f1ac0783a507b1a15a9e6 /src
parent926f8ac4927bdc9977f2d960c7def3f2927d1198 (diff)
downloadcryptography-7618fbeb1fab995f5e44864ba9ace3ebdf4ebc5b.tar.gz
cryptography-7618fbeb1fab995f5e44864ba9ace3ebdf4ebc5b.tar.bz2
cryptography-7618fbeb1fab995f5e44864ba9ace3ebdf4ebc5b.zip
Enforce text type of NameAttribute.value
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/x509.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptography/x509.py b/src/cryptography/x509.py
index 87028be1..2e2e8512 100644
--- a/src/cryptography/x509.py
+++ b/src/cryptography/x509.py
@@ -148,6 +148,11 @@ class NameAttribute(object):
"oid argument must be an ObjectIdentifier instance."
)
+ if not isinstance(value, six.text_type):
+ raise TypeError(
+ "value argument must be a text type."
+ )
+
self._oid = oid
self._value = value