host/service-show/find shouldn't fail on invalid certificate

host/service-show/find methods would have failed if the first
certificate they had in userCertificate attribute were invalid.
Expected behavior is that they just show the rest of the reqested
attributes.

https://fedorahosted.org/freeipa/ticket/5797

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Stanislav Laznicka
2016-06-22 17:43:14 +02:00
committed by Martin Basti
parent be3ad1ed7a
commit 9a8c5c9dfd
3 changed files with 70 additions and 5 deletions
+10
View File
@@ -461,6 +461,16 @@ class ServerRemovalWarning(PublicMessage):
type = "warning"
class CertificateInvalid(PublicMessage):
"""
***13029 Failed to parse a certificate
"""
errno = 13029
type = "error"
format = _("%(subject)s: Invalid certificate. "
"%(reason)s")
def iter_messages(variables, base):
"""Return a tuple with all subclasses
"""