-
Committer:
Scott Moser
-
Date:
2015-09-24 18:42:24 UTC
-
Revision ID:
smoser@ubuntu.com-20150924184224-xn8x8b6rc43rfdt0
support for storing keyrings and reading of centos cloudimg .asc files
A couple things here
== pubkey data stored in bzr ==
the tools/pubkeys-to-keyring comes from ubuntu-cloudimage-keyring package.
that then allows you to store ascii armorred files
in bzr and generate the keyring to verify against from those.
You can then do:
./tools/pubkeys-to-keyring centos.gpg pubkeys/centos/*.gpg
And use '--keyring=./cents.gpg' to gpg.
pubkeys/centos/README.txt, describes where these keys came from
and why we should trust them.
== Usage of the code to verify ==
We should probably move the get_file_sums_list() from meph2.netinst
to util.py, but the following illustrates its use. It uses gpgv to
verify the data against the keyring created above.
from meph2 import netinst
keyring="./centos.gpg"
burl="http://cloud.centos.org/centos/7/images/"
centos_suminfo= (("sha256", "sha256sum.txt.asc", True),)
print(
netinst.get_file_sums_list(
burl, keyring=keyring, suminfo=centos_suminfo))