change selfsigned cert to work with firefox
All checks were successful
Build DBM Service / build (amd64, , linux) (push) Successful in 2m2s
Build DBM Service / build (amd64, .exe, windows) (push) Successful in 1m52s
Build DBM Service / build (arm, 6, , linux) (push) Successful in 1m57s
Build DBM Service / build (arm64, , linux) (push) Successful in 1m52s

This commit is contained in:
Adrian Zürcher
2026-02-19 08:41:15 +01:00
parent 5990e8ee11
commit d515e2d9d7
2 changed files with 148 additions and 42 deletions

View File

@@ -3,6 +3,7 @@ package test
import (
"fmt"
"math/rand"
"os"
"runtime"
"testing"
"time"
@@ -146,3 +147,30 @@ func TestServer(t *testing.T) {
t.Fatal(server.ServeHttp("http://localhost", 8100))
}
func TestCreateCerts(t *testing.T) {
certFile := "cert.pem"
keyFile := "key.pem"
defer func() {
err := os.Remove(certFile)
if err != nil {
t.Fatal(err)
}
err = os.Remove(keyFile)
if err != nil {
t.Fatal(err)
}
}()
t.Log("test create certificates")
cert := cert.Cert{
Organization: "tecamino",
CertFile: certFile,
KeyFile: keyFile,
}
if err := cert.GenerateSelfSignedCert(); err != nil {
t.Fatal(err)
}
}