docs/client
Miloslav Trmač f23f2093e3 Create enough signatures as role's threshold requires
Tell signed.Sign how many signatures are necessary to sign a role, and
have it fail if it cannot create that many.

For most uses this does not make much of a difference because the
threshold tends to be 1 and signed.Sign was already failing if no key
could be found or if no signature could be created; only >1-threshold
roles now (correctly) fail in additional situations. But the knowledge
of a role’s threshold will be useful in a future commit.

Always use ErrInsufficientSignatures for this failure, whether this is
when loading the keys or actually using them (also fixing
ErrInsufficentSignature documentation to refer to signing and not
verification). ErrNoKeys is no longer returned by signed.Sign.

So, adjust the “snapshot key is not available” logic in
NotaryRepository.Publish accordingly, which also makes it more precise
(actually triggering only when no snapshot key is available).

Now that role's threshold is enforced when signing, update
TestValidateRootInvalidTimestampThreshold to create the second key
necessary to correctly sign the timestamp role.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2016-04-13 11:48:36 -07:00
..
changelist Change assert to require in client/changelist package. 2016-04-05 15:13:29 -07:00
backwards_compatibility_test.go NotaryRepository.Update now just returns an error, rather than a client 2016-04-06 14:08:08 -07:00
client.go Create enough signatures as role's threshold requires 2016-04-13 11:48:36 -07:00
client_pkcs11_test.go "make lint" wasn't actually linting every file in the repo. golint ./... 2016-04-12 22:28:32 -07:00
client_root_validation_test.go Use 'require' instead of 'assert' in client and TUF client tests 2016-03-15 13:52:48 -07:00
client_test.go NotaryRepository.Update now just returns an error, rather than a client 2016-04-06 14:08:08 -07:00
client_update_test.go NotaryRepository.Update now just returns an error, rather than a client 2016-04-06 14:08:08 -07:00
delegations.go NotaryRepository.Update now just returns an error, rather than a client 2016-04-06 14:08:08 -07:00
helpers.go Remove mentions of fallback 2016-03-16 15:12:12 -07:00
helpers_test.go Removing key import and gun from cryptoservice 2016-03-18 11:31:03 -07:00
repo.go Minor refactor of NotaryRepository constructor to use more shared code. 2015-12-07 17:19:28 -08:00
repo_pkcs11.go "make lint" wasn't actually linting every file in the repo. golint ./... 2016-04-12 22:28:32 -07:00