ocket8888 commented on a change in pull request #3534: TP Delivery Service Generate SSL update, new letsencrypt generate and… URL: https://github.com/apache/trafficcontrol/pull/3534#discussion_r334618169
########## File path: traffic_ops/traffic_ops_golang/deliveryservice/keys.go ########## @@ -210,9 +240,31 @@ func getSSLKeysByXMLIDHelper(xmlID string, inf *api.APIInfo, w http.ResponseWrit return } } + + if keyObj.Expiration.IsZero() { + exp, err := parseExpirationFromCert([]byte(keyObj.Certificate.Crt)) + if err != nil { + api.HandleErr(w, r, inf.Tx.Tx, http.StatusInternalServerError, nil, errors.New(xmlID+": "+err.Error())) Review comment: Like above, you need to return here or you'll be writing invalid JSON. If you want to send the keyObj as well, use [`api.WriteRespAlertObj`](https://godoc.org/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api#WriteRespAlertObj) ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services