zrhoffman commented on a change in pull request #4625: updated to store Lets
Encrypt user account information
URL: https://github.com/apache/trafficcontrol/pull/4625#discussion_r409901915
##########
File path: traffic_ops/traffic_ops_golang/deliveryservice/letsencryptcert.go
##########
@@ -330,7 +374,86 @@ func GetLetsEncryptCertificates(cfg *config.Config, req
tc.DeliveryServiceLetsEn
}
tx2.Commit()
+ if !foundPreviousAccount {
+ userKeyDer := x509.MarshalPKCS1PrivateKey(userPrivateKey)
+ if userKeyDer == nil {
+ log.Errorf("marshalling private key: nil der")
Review comment:
You use the `log.Errf(); api.CreateChangeLogRawTx(); errors.New()` pattern 6
times in the PR and 11 times in `deliveryservices/letsencryptcert.go` besides
this PR. Is it worth writing a function in the `api` package that does this?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services