docs/server/handlers
Miloslav Trmač aa596338a6 Add an optionalKeys parameter to signed.Sign
Ordinarily we don't want to continue operating on signed data if the
role's threshold of signatures cannot be me and the signature is unsuable.

OTOH we want to keep signing root.json with all older keys if they are
available (to allow migration), but in that case a missing key is not a
fatal error.

So, split the keys passed to signed.Sign into primary and optional,
treating all current uses as primary and enforcing the role's threshold
only on primary keys.  Also update the single existing test which uses
a missing/unusable key to use the optionalKeys parameter.

Note that only the _presence_ of optionalKeys is optional; if an
optional key exists but signing using it fails, the function will fail.

This temporarily breaks the second ErrInsufficientSignatures check
(optional keys count against the role threshold), but that will be fixed
soon.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2016-04-13 11:48:36 -07:00
..
default.go Use a CacheControlHandler that wraps other handlers instead 2016-03-14 17:19:13 -07:00
default_test.go Use require, not assert, in server/... tests. 2016-04-04 17:18:53 -07:00
roles.go Use updated-at for last modification date for getting current metadata 2016-03-14 17:18:18 -07:00
roles_test.go Add cache control headers to Getting metadata 2016-03-14 17:18:18 -07:00
validation.go Clean up after rebase and address review comments 2016-03-23 13:24:52 -07:00
validation_test.go Add an optionalKeys parameter to signed.Sign 2016-04-13 11:48:36 -07:00