Pushed under one-liner rule, attaching path for reference.

Pushed to master: 8ab0ad5b9ef59eca7b25a150baeb4a9bf8faa582
--
David Kupka
From bf61c2549ae98869ee9faaf808491b5a21af813d Mon Sep 17 00:00:00 2001
From: David Kupka <dku...@redhat.com>
Date: Wed, 3 Aug 2016 10:35:40 +0200
Subject: [PATCH] vault: Catch correct exception in decrypt

ValueError is raised when decryption fails.

https://fedorahosted.org/freeipa/ticket/6160
---
 ipaclient/plugins/vault.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipaclient/plugins/vault.py b/ipaclient/plugins/vault.py
index e3a1ae3a0ad767bcee843b7fa3743a934e02d18b..73ad09b38316d55b466b7973dbeffefc1b7bb528 100644
--- a/ipaclient/plugins/vault.py
+++ b/ipaclient/plugins/vault.py
@@ -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'))
 
-- 
2.7.4

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