// writeSCEPResponse writes a SCEP response back to the SCEP client.
writeSCEPResponse writes a SCEP response back to the SCEP client.
// writeSCEPResponse writes a SCEP response back to the SCEP client .
func writeSCEPResponse(w http.ResponseWriter, response SCEPResponse) {
	if response.Error != nil {
		api.LogError(w, response.Error)
	}
	if response.Certificate != nil {
		api.LogCertificate(w, response.Certificate)
	}
	w.Header().Set("Content-Type", contentHeader(response))
	_, err := w.Write(response.Data)
	if err != nil {
		writeError(w, errors.Wrap(err, "error when writing scep response")) 
	}
}
func writeSCEPResponse ( w http . ResponseWriter , response SCEPResponse ) { if response . Error != nil { api . LogError ( w , response . Error ) } if response . Certificate != nil { api . LogCertificate ( w , response . Certificate ) } w . Header ( ) . Set ( " " , contentHeader ( response ) ) _ , err := w . Write ( response . Data ) if err != nil { writeError ( w , errors . Wrap ( err , " " ) ) } }
writeSCEPResponse writes a SCEP response back to the SCEP client.
writeSCEPResponse writes a SCEP response back to the SCEP client .
// This could end up as an error again