~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/gpg.py

  • Committer: Jonathan Riddell
  • Date: 2011-06-15 16:20:07 UTC
  • mto: (5971.2.3 bzr-gpgme)
  • mto: This revision was merged to the branch mainline in revision 6003.
  • Revision ID: jriddell@canonical.com-20110615162007-ic3pvs613pgh8a89
return missing if not in acceptable keys

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
        except gpgme.GpgmeError,error:
150
150
            raise errors.VerifyFailed(error[2])
151
151
 
152
 
        ##look up keys, if not in, return missing
153
 
 
154
152
        if len(result) == 0:
155
153
            return SIGNATURE_NOT_VALID
 
154
        fingerprint = result[0].fpr
 
155
        if self.acceptable_keys is not None:
 
156
            if not fingerprint in self.acceptable_keys:
 
157
                return SIGNATURE_KEY_MISSING
156
158
        if result[0].summary & gpgme.SIGSUM_VALID:
157
159
            return SIGNATURE_VALID
158
160
        if result[0].summary & gpgme.SIGSUM_RED: