feat: remove comments and useless logs

This commit is contained in:
Urko 2023-03-06 17:29:09 +01:00
parent 0166d10d30
commit 016293773b
1 changed files with 0 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import (
"encoding/pem" "encoding/pem"
"errors" "errors"
"fmt" "fmt"
"log"
"os" "os"
"os/exec" "os/exec"
"strings" "strings"
@ -51,13 +50,11 @@ func CredentialsFromKeyWithPasswd(certFile, certKey, passwd string) (credentials
if err != nil { if err != nil {
return nil, fmt.Errorf("tls.X509KeyPair: %s", err) return nil, fmt.Errorf("tls.X509KeyPair: %s", err)
} }
log.Println("cert loaded successfuly")
return credentials.NewServerTLSFromCert(&cert), nil return credentials.NewServerTLSFromCert(&cert), nil
} }
func decryptRSA(keyFile, password string) (string, error) { func decryptRSA(keyFile, password string) (string, error) {
// openssl rsa -passin pass:test -in passwd.pem -out passwd.enc.key
cmd := exec.Command("openssl", "rsa", "-in", keyFile, "-passin", formatPass(password), "-text") cmd := exec.Command("openssl", "rsa", "-in", keyFile, "-passin", formatPass(password), "-text")
output_bts, err := cmd.Output() output_bts, err := cmd.Output()
if err != nil { if err != nil {