digital signatures

Jonathan Riddell jriddell at ubuntu.com
Tue Jun 21 12:35:22 UTC 2011


I've implemented digital signature verification.  It uses the GPGME library.  Currently the output is like this

jr at gallus:~/src/bzr/test/c>/home/jr/src/bzr/bzr/bzr-gpgme/bzr verify 
All commits signed with verifiable keys

jr at gallus:~/src/bzr/test/c>/home/jr/src/bzr/bzr/bzr-gpgme/bzr verify  -v
All commits signed with verifiable keys
  Jonathan Riddell <jriddell at ubuntu.com> signed 1 commit

jr at gallus:~/src/bzr/test/a>/home/jr/src/bzr/bzr/bzr-gpgme/bzr verify 
6 commits with valid signatures
1 commit with unknown key
1 commit not valid
2 commits not signed

jr at gallus:~/src/bzr/test/a>/home/jr/src/bzr/bzr/bzr-gpgme/bzr verify -v
6 commits with valid signatures
  Jonathan Riddell <jriddell at ubuntu.com> signed 6 commits
1 commit with unknown key
  Unknown key 5D51E56F signed 1 commit
1 commit not valid
  1 commit by author Jonathan Riddell <jriddell at canonical.com>
2 commits not signed
  1 commit by author My Test <test at example.com>


I also added a --acceptable-keys option so you can list which keys you
want to consider valid and you can specify which commits to verify.

I also added a --signatures option to bzr log which gives this sort of output

jr at gallus:~/src/bzr/test/c>/home/jr/src/bzr/bzr/bzr-gpgme/bzr log --signatures
------------------------------------------------------------
revno: 1
committer: Jonathan Riddell <jriddell at canonical.com>
branch nick: c
timestamp: Tue 2011-06-21 13:31:54 +0100
signature: valid signature from Jonathan Riddell <jriddell at ubuntu.com>
message:
  add

Is this the options and output we want?  

Reviewers welcome, especially anyone with experience of working with gpgme on the verification bits.

https://code.launchpad.net/~jr/bzr/bzr-gpgme/+merge/64859

Jonathan



More information about the bazaar mailing list