Fix the data type coming out of the pkcs10 module to make the DN module happy.

rob
>From c6b48cecbed4412b7f39926b3a29184887d7cfd2 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Tue, 14 Aug 2012 14:30:36 -0400
Subject: [PATCH] Convert PKCS#11 subject to string before passing to
 ipapython.DN

---
 ipaserver/plugins/selfsign.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaserver/plugins/selfsign.py b/ipaserver/plugins/selfsign.py
index 09ed04f49a4908aab10e1534c26d09a076019e2a..bd79f7186b6525dcfa3c60c270d5134f669176d6 100644
--- a/ipaserver/plugins/selfsign.py
+++ b/ipaserver/plugins/selfsign.py
@@ -92,7 +92,7 @@ class ra(rabase.rabase):
             subject_base.insert(0, RDN(('CN', hostname)))
             request = pkcs10.load_certificate_request(csr)
             # python-nss normalizes the request subject
-            request_subject = DN(pkcs10.get_subject(request))
+            request_subject = DN(str(pkcs10.get_subject(request)))
 
             if subject_base != request_subject:
                 raise errors.CertificateOperationError(error=_('Request subject "%(request_subject)s" does not match the form "%(subject_base)s"') % \
-- 
1.7.10.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to