-
Notifications
You must be signed in to change notification settings - Fork 512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add debugging messages for trust pinning #818
Conversation
Can one of the admins verify this patch? |
closes notaryproject#817 Signed-off-by: David Wake <dwake@box.com>
4face5f
to
c52c666
Compare
jenkins, test this please |
@@ -47,6 +49,7 @@ func NewTrustPinChecker(trustPinConfig TrustPinConfig, gun string) (CertChecker, | |||
caRootPool := x509.NewCertPool() | |||
for _, caCert := range caCerts { | |||
if err = trustmanager.ValidateCertificate(caCert); err != nil { | |||
logrus.Debugf("Trust-pinning validation for child cert failed: %s", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many apologies - I think the above comment may be out of date. This block only goes over all the CA certs listed in the root CA bundle and ensures that it's not expired and that it has a big enough RSA key, before using it to do any kind of validation of the root certs.
So it may make more sense to either leave out the message entirely or to say "Ignoring root CA certificate ??? in bundle: %s", err"
By ??? I mean some way of identifying the cert in the cert bundle - maybe it's fingerprint, or maybe something like 1 of 3, so you can identify which one in the bundle is invalid?
Thank you so much for improving our logs @dnwake! I have some slight phrasing nitpicks, but other than that this LGTM! |
[Carry #818] Trustpinning debug
closed by #858 |
closes #817
Signed-off-by: David Wake dwake@box.com