freebsd-nq/usr.sbin/pkg
Bryan Drewery f12db248e7 Support checking signature for pkg bootstrap.
If the pkg.conf is configured with SIGNATURE_TYPE: FINGERPRINTS,
and FINGERPRINTS: /etc/keys/pkg then a pkg.sig file is fetched along
with pkg.txz. The signature contains the signature provided by the
signing server, and the public key. The .sig is the exact output
from the signing server in the following format:

  SIGNATURE
  <openssl signed>
  CERT
  <rsa public key>
  END

The signature is verified with the following logic:

 - If the .sig file is missing, it fails.
 - If the .sig doesn't validate, it fails.
 - If the public key in the .sig is not in the known trusted fingerprints,
   it fails.
 - If the public key is in the revoked key list, it fails.

Approved by:	bapt
MFC after:	2 days
Discussed by:	bapt with des, jonathan, gavin
2013-10-26 03:43:02 +00:00
..
config.c Support checking signature for pkg bootstrap. 2013-10-26 03:43:02 +00:00
config.h Support checking signature for pkg bootstrap. 2013-10-26 03:43:02 +00:00
dns_utils.c Fix build with gcc 2013-10-23 15:29:42 +00:00
dns_utils.h Improve SRV records support for the pkg(8) bootstrap: 2013-10-23 14:06:07 +00:00
elf_tables.h Cleanup elf macros 2013-09-11 06:42:55 +00:00
Makefile Support checking signature for pkg bootstrap. 2013-10-26 03:43:02 +00:00
pkg.c Support checking signature for pkg bootstrap. 2013-10-26 03:43:02 +00:00