docs/server
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
..
errors Pass original invalid version storage error details into standardized errors 2016-01-14 09:57:36 -08:00
handlers Add an optionalKeys parameter to signed.Sign 2016-04-13 11:48:36 -07:00
snapshot Create enough signatures as role's threshold requires 2016-04-13 11:48:36 -07:00
storage Embed SignedCommon in Root, Snapshot, and Timestamp, as it's already 2016-04-07 17:27:13 -07:00
timestamp Create enough signatures as role's threshold requires 2016-04-13 11:48:36 -07:00
integration_test.go Use require, not assert, in server/... tests. 2016-04-04 17:18:53 -07:00
server.go Use a CacheControlHandler that wraps other handlers instead 2016-03-14 17:19:13 -07:00
server_test.go Embed SignedCommon in Root, Snapshot, and Timestamp, as it's already 2016-04-07 17:27:13 -07:00