~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/gpg.py

  • Committer: Patch Queue Manager
  • Date: 2014-09-22 19:14:34 UTC
  • mfrom: (6598.1.2 bzr)
  • Revision ID: pqm@pqm.ubuntu.com-20140922191434-6bbnpnxi5jab4vim
(richard-wilbur) Allows launchpad APIs to use proxies by default(Paul Gear).
 (Paul Gear)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2009, 2011, 2012, 2013, 2016 Canonical Ltd
 
1
# Copyright (C) 2005, 2011 Canonical Ltd
2
2
#   Authors: Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
322
322
                return SIGNATURE_NOT_VALID, None
323
323
        # A signature from a revoked key gets this.
324
324
        # test_verify_revoked_signature()
325
 
        if ((result[0].summary & gpgme.SIGSUM_SYS_ERROR
326
 
             or result[0].status.strerror == 'Certificate revoked')):
 
325
        if result[0].summary & gpgme.SIGSUM_SYS_ERROR:
327
326
            return SIGNATURE_NOT_VALID, None
328
327
        # Other error types such as revoked keys should (I think) be caught by
329
328
        # SIGSUM_RED so anything else means something is buggy.
330
 
        raise errors.SignatureVerificationFailed(
331
 
            "Unknown GnuPG key verification result")
 
329
        raise errors.SignatureVerificationFailed("Unknown GnuPG key "\
 
330
                                                 "verification result")
332
331
 
333
332
    def set_acceptable_keys(self, command_line_input):
334
333
        """Set the acceptable keys for verifying with this GPGStrategy.