return&httperror.HandlerError{http.StatusBadRequest,"Invalid certificate file. Ensure that the certificate file is uploaded correctly",err}
}
varfileTypeportainer.TLSFileType
switchcertificate{
case"ca":
fileType=portainer.TLSFileCA
case"cert":
fileType=portainer.TLSFileCert
case"key":
fileType=portainer.TLSFileKey
default:
return&httperror.HandlerError{http.StatusBadRequest,"Invalid certificate route value. Value must be one of: ca, cert or key",portainer.ErrUndefinedTLSFileType}