Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | From 579b5930e15de8855bf63b3c20b6c3aaf894c3eb Mon Sep 17 00:00:00 2001 |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 2 | From: Daniel Kahn Gillmor <dkg@fifthhorseman.net> |
| 3 | Date: Mon, 1 Feb 2016 19:27:59 -0500 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | Subject: [PATCH] handle generic error when no passphrase callback present |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 5 | |
| 6 | apparently gpg 2.1 returns ERR_GENERAL right now if the pinentry was |
| 7 | in loopback mode and no passphrase callback was supplied. Earlier |
| 8 | versions supplied ERR_BAD_PASSPHRASE. |
| 9 | |
| 10 | Upstream-Status: Backport |
| 11 | |
| 12 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 13 | |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 14 | --- |
| 15 | tests/test_passphrase.py | 2 +- |
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 17 | |
| 18 | diff --git a/tests/test_passphrase.py b/tests/test_passphrase.py |
| 19 | index 0a235e9..35b3c59 100644 |
| 20 | --- a/tests/test_passphrase.py |
| 21 | +++ b/tests/test_passphrase.py |
| 22 | @@ -41,7 +41,7 @@ class PassphraseTestCase(GpgHomeTestCase): |
| 23 | new_sigs = ctx.sign(plaintext, signature, gpgme.SIG_MODE_CLEAR) |
| 24 | except gpgme.GpgmeError as exc: |
| 25 | self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_GPGME) |
| 26 | - self.assertEqual(exc.args[1], gpgme.ERR_BAD_PASSPHRASE) |
| 27 | + self.assertEqual(exc.args[1], gpgme.ERR_GENERAL) |
| 28 | else: |
| 29 | self.fail('gpgme.GpgmeError not raised') |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | |