diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-10-10 16:05:28 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-10-10 16:05:28 +0200 |
| commit | 4755c72601c11b800650f942f855cee286c50356 (patch) | |
| tree | 202558cf7acc16137982a393565a72d8267a3b33 /apt/auth.py | |
| parent | 1f299c6eef3e5b6e2cd74c27dfd33de41e08f734 (diff) | |
| download | python-apt-4755c72601c11b800650f942f855cee286c50356.tar.gz | |
cherry pick robustness fixes for keyid (allow leading 0x, allow lowercase)
Diffstat (limited to 'apt/auth.py')
| -rw-r--r-- | apt/auth.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt/auth.py b/apt/auth.py index 742b5cc2..eff13b1a 100644 --- a/apt/auth.py +++ b/apt/auth.py @@ -175,7 +175,9 @@ def _add_key_from_keyserver(keyid, keyserver, tmp_keyring_dir): got_fingerprint = line.split(":")[9] # stop after the first to ensure no subkey trickery break - signing_key_fingerprint = keyid + # strip the leading "0x" is there is one and uppercase (as this is + # what gnupg is using) + signing_key_fingerprint = keyid.replace("0x", "").upper() if got_fingerprint != signing_key_fingerprint: raise AptKeyError( "Fingerprints do not match, not importing: '%s' != '%s'" % ( |
