Skip to content

Commit

Permalink
Fix gpg-keyserver
Browse files Browse the repository at this point in the history
  • Loading branch information
m-bucher authored and mibanescu committed Aug 27, 2018
1 parent f09dadf commit eb7b6c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/pulp_deb/plugins/importers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,14 @@ def verify_release(self, release):
gpg = gnupg.GPG(homedir=os.path.join(self.get_working_dir(), 'gpg-home'))
shared_gpg = gnupg.GPG(homedir=os.path.join('/', 'var', 'lib', 'pulp', 'gpg-home'))

keyserver = self.get_config().get(constants.CONFIG_KEYSERVER,
constants.CONFIG_KEYSERVER_DEFAULT)

fingerprints = self.get_config().get(constants.CONFIG_ALLOWED_KEYS).split(',')
# TODO check if full fingerprints are provided
for fingerprint in fingerprints:
if fingerprint not in [
key['fingerprint'] for key in shared_gpg.list_keys()]:
keyserver = self.get_config().get(constants.CONFIG_KEYSERVER,
constants.CONFIG_KEYSERVER_DEFAULT)
shared_gpg.recv_keys(keyserver, fingerprint)
gpg.import_keys(shared_gpg.export_keys(fingerprints))
if not os.path.isfile(self.parent.release_files[release] + '.gpg'):
Expand Down

0 comments on commit eb7b6c1

Please sign in to comment.