feat: implement TLS certificate inspector (closes #4) #7

Merged
sneak merged 4 commits from feature/tlscheck-implementation into main 2026-02-20 19:36:40 +01:00
Showing only changes of commit 3fcf203485 - Show all commits

View File

@ -41,7 +41,7 @@ func TestCheckCertificateValid(t *testing.T) {
defer srv.Close() defer srv.Close()
checker := tlscheck.NewStandalone( checker := tlscheck.NewStandalone(
tlscheck.WithTimeout(5 * time.Second), tlscheck.WithTimeout(5*time.Second),
tlscheck.WithTLSConfig(&tls.Config{ tlscheck.WithTLSConfig(&tls.Config{
//nolint:gosec // test uses self-signed cert //nolint:gosec // test uses self-signed cert
InsecureSkipVerify: true, InsecureSkipVerify: true,
@ -110,7 +110,7 @@ func TestCheckCertificateContextCanceled(t *testing.T) {
cancel() cancel()
checker := tlscheck.NewStandalone( checker := tlscheck.NewStandalone(
tlscheck.WithTimeout(2 * time.Second), tlscheck.WithTimeout(2*time.Second),
tlscheck.WithPort(1), tlscheck.WithPort(1),
) )
@ -126,7 +126,7 @@ func TestCheckCertificateTimeout(t *testing.T) {
t.Parallel() t.Parallel()
checker := tlscheck.NewStandalone( checker := tlscheck.NewStandalone(
tlscheck.WithTimeout(1 * time.Millisecond), tlscheck.WithTimeout(1*time.Millisecond),
tlscheck.WithPort(1), tlscheck.WithPort(1),
) )