From 5f87a4cb3ff6f83519dd2680879e921a58a4b16c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 15:31:55 +0200 Subject: * fix the authentication --- UpdateManager/DistUpgradeFetcher.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index 54823795..aa51066a 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -104,12 +104,16 @@ class DistUpgradeFetcher(object): # mandatory return True - def gpgauthenticate(self, file, signature, keyring='/etc/apt/trusted.gpg'): + def gpgauthenticate(self, file, signature, + keyring='/etc/apt/trusted.gpg', + trustdb='/etc/apt/trustdb.gpg'): """ authenticated a file against a given signature, if no keyring is given use the apt default keyring """ gpg = GnuPGInterface.GnuPG() - gpg.options.extra_args = ['--no-default-keyring', + gpg.options.extra_args = ['--no-options', + '--no-default-keyring', + '--trustdb-name',trustdb, '--keyring', keyring] proc = gpg.run(['--verify', signature, file], create_fhs=['status','logger','stderr']) @@ -118,7 +122,7 @@ class DistUpgradeFetcher(object): proc.wait() except IOError,e: # gnupg returned a problem (non-zero exit) - print "exception from gpg: %s", e + print "exception from gpg: %s" % e return False if "VALIDSIG" in gpgres: return True -- cgit v1.2.3