aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-06-17 09:39:47 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-06-17 09:39:47 -0600
commitb0e8ffac859b20512428321b685346685af2c0c7 (patch)
treeb92b87bec65ddb50316f63757ed33a3163d0d1c6 /src
parent926f8ac4927bdc9977f2d960c7def3f2927d1198 (diff)
parentab94b90c077674031bda9c249c2b0eab5ddca5c4 (diff)
downloadcryptography-b0e8ffac859b20512428321b685346685af2c0c7.tar.gz
cryptography-b0e8ffac859b20512428321b685346685af2c0c7.tar.bz2
cryptography-b0e8ffac859b20512428321b685346685af2c0c7.zip
Merge pull request #2033 from sigmavirus24/name-attribute-text-check
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