vault: Catch correct exception in decrypt

ValueError is raised when decryption fails.

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

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
David Kupka 2016-08-03 10:35:40 +02:00
parent 64db059249
commit 8ab0ad5b9e

View File

@ -164,7 +164,7 @@ def decrypt(data, symmetric_key=None, private_key=None):
label=None
)
)
except AssertionError:
except ValueError:
raise errors.AuthenticationError(
message=_('Invalid credentials'))