Hi,

The attached patch fixes a regression introduced by a patch
https://fedorahosted.org/freeipa/ticket/5381 (commit
d44ffdad4285bf2a1c0b044e07ef1b18c7d50de1).

Thanks,
Fraser
From d1a624b1dc5cea9ab648dff0890bcd3f5fd1ddf0 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <ftwee...@redhat.com>
Date: Wed, 29 Jun 2016 13:18:55 +1000
Subject: [PATCH] cert-find: fix 'issuer' option

The 'issuer' option of cert-find was recently changed from Str to
DNParam, however, 'ra.find' expects a string and throws when it
receives a DN.

When constructing the dict that gets passed to 'ra.find', turn
DNParams into strings.

Part of: https://fedorahosted.org/freeipa/ticket/5381
---
 ipaserver/plugins/cert.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ipaserver/plugins/cert.py b/ipaserver/plugins/cert.py
index 
564d582c77ef63e780604fd7fc55e6cc7889a351..888621fc5af634b95addc9c0ade58c76ce42edfe
 100644
--- a/ipaserver/plugins/cert.py
+++ b/ipaserver/plugins/cert.py
@@ -1031,6 +1031,8 @@ class cert_find(Search, CertMethod):
                     continue
                 if isinstance(value, datetime.datetime):
                     value = value.strftime(PKIDATE_FORMAT)
+                elif isinstance(value, DN):
+                    value = unicode(value)
                 ra_options[name] = value
             if sizelimit is not None:
                 if sizelimit != 0:
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to