rob05c commented on a change in pull request #6522:
URL: https://github.com/apache/trafficcontrol/pull/6522#discussion_r809492395
##########
File path: cache-config/t3c-apply/torequest/cmd.go
##########
@@ -333,6 +336,22 @@ func checkRefs(cfg config.Cfg, cfgFile []byte, filesAdding
[]string) error {
return nil
}
+//checkCert checks the validity of the ssl certificate
+func checkCert(c []byte) error {
+ block, _ := pem.Decode(c)
+ cert, err := x509.ParseCertificate(block.Bytes)
+ if err != nil {
+ return err
Review comment:
Nitpick: context would make it easier to figure out what went wrong when
this happens, e.g. `return errors.New("parsing certificate: " + err.Error())`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]