[Freeipa-devel] [PATCH] 0080 cert-find: fix 'issuer' option
Fraser Tweedale
ftweedal at redhat.com
Wed Jun 29 04:08:44 UTC 2016
Hi,
The attached patch fixes a regression introduced by a patch
https://fedorahosted.org/freeipa/ticket/5381 (commit
d44ffdad4285bf2a1c0b044e07ef1b18c7d50de1).
Thanks,
Fraser
-------------- next part --------------
From d1a624b1dc5cea9ab648dff0890bcd3f5fd1ddf0 Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <ftweedal at 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
More information about the Freeipa-devel
mailing list