From 7618fbeb1fab995f5e44864ba9ace3ebdf4ebc5b Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Tue, 16 Jun 2015 19:12:17 -0500 Subject: Enforce text type of NameAttribute.value --- src/cryptography/x509.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 -- cgit v1.2.3