From 72cfd79b77256209ea1419abac75191b4474d574 Mon Sep 17 00:00:00 2001 From: Daniel Del Rio Figueira Date: Mon, 2 Dec 2024 09:26:25 +0100 Subject: [PATCH] Removed hardcoded paths and fixed typo --- util/http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/http.go b/util/http.go index b244a0c..9ab238f 100644 --- a/util/http.go +++ b/util/http.go @@ -17,12 +17,12 @@ func GetClientCertificate() (tls.Certificate, error) { return tls.Certificate{}, nil } if certExists && !keyExists { - return tls.Certificate{}, fmt.Errorf("Client TLS private key is empty, but client TLS cert was sent.") + return tls.Certificate{}, fmt.Errorf("Client TLS private key is empty, but client TLS cert was set.") } if !certExists && keyExists { - return tls.Certificate{}, fmt.Errorf("Client TLS cert is empty, but client TLS private key was sent.") + return tls.Certificate{}, fmt.Errorf("Client TLS cert is empty, but client TLS private key was set.") } - return tls.LoadX509KeyPair("client.cert", "client-key.pem") + return tls.LoadX509KeyPair(cert, key) } func GetHttpClient() (*http.Client, error) {