✏ prefix tls: in errors

Co-Authored-By: kiyon <kiyon@gofiber.io>
pull/1078/head
Fenny 2020-12-16 02:54:57 +01:00
parent f6569040f0
commit 769645ac53
1 changed files with 2 additions and 2 deletions

4
app.go
View File

@ -576,13 +576,13 @@ func (app *App) Listen(addr string) error {
func (app *App) ListenTLS(addr, certFile, keyFile string) error {
// Check for valid cert/key path
if len(certFile) == 0 && len(keyFile) == 0 {
return errors.New("provide a valid cert or key path")
return errors.New("tls: provide a valid cert or key path")
}
// Prefork is supported
if app.config.Prefork {
cert, err := tls.LoadX509KeyPair(certFile, keyFile)
if err != nil {
return fmt.Errorf("cannot load TLS key pair from certFile=%q and keyFile=%q: %s", certFile, keyFile, err)
return fmt.Errorf("tls: cannot load TLS key pair from certFile=%q and keyFile=%q: %s", certFile, keyFile, err)
}
config := &tls.Config{
MinVersion: tls.VersionTLS12,