diff --git a/base/common/python/pki/crypto.py b/base/common/python/pki/crypto.py index a5fe3f70768..e202945c61a 100644 --- a/base/common/python/pki/crypto.py +++ b/base/common/python/pki/crypto.py @@ -194,6 +194,9 @@ def import_cert(self, cert_nick, cert, trust=',,'): else: content = cert + if type(content) is not six.binary_type: + content = content.encode() + # certutil -A -d db_dir -n cert_nick -t trust -i cert_file with tempfile.NamedTemporaryFile() as cert_file: cert_file.write(content)