Adding tests for CertsToRemove, and move tests around

Signed-off-by: Diogo Monica <diogo@docker.com>
This commit is contained in:
Diogo Monica 2015-07-20 21:33:22 -07:00
parent 1c54f699d1
commit 3154aa9d29
3 changed files with 213 additions and 142 deletions

File diff suppressed because one or more lines are too long

View File

@ -243,7 +243,7 @@ func (km *KeyStoreManager) ValidateRoot(root *data.Signed, gun string) error {
err = signed.VerifyRoot(root, 0, trustmanager.CertsToKeys(certsForCN)) err = signed.VerifyRoot(root, 0, trustmanager.CertsToKeys(certsForCN))
if err != nil { if err != nil {
logrus.Debugf("failed to verify TUF data for: %s, %v", gun, err) logrus.Debugf("failed to verify TUF data for: %s, %v", gun, err)
return &ErrValidationFail{Reason: "failed to validate integrity of roots"} return &ErrValidationFail{Reason: "failed to validate data with current trusted certificates"}
} }
} else { } else {
logrus.Debugf("found no currently valid root certificates for %s", gun) logrus.Debugf("found no currently valid root certificates for %s", gun)

File diff suppressed because one or more lines are too long