The Identity, Policy and Audit system
CentOS Sources
2016-11-03 403b09ab980c02ef36095973349a13e0181c794a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From cc92fe8badfe32f4c55abfa8b249dc1f94936d7c Mon Sep 17 00:00:00 2001
From: David Kupka <dkupka@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
 
Reviewed-By: David Kupka <dkupka@redhat.com>
---
 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