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

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Fraser Tweedale
2016-06-29 13:18:55 +10:00
committed by Jan Cholasta
parent 0078e7a919
commit 6e4e522e52

View File

@@ -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: