v0.22.0 several enhancements and fixes for security, network, doc, test, packaging
This commit is contained in:
1 parent
9ab8c356d2
commit
71d1b82f83
102 files changed
+7102
-2178
No files matched your search
@@ -6,8 +6,24 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"logwisp/internal/config"
|
||||
)
|
||||
|
||||
// A dialer verifies an IPv6 target by its address: the zone names a local
|
||||
// interface, which no certificate carries.
|
||||
func TestClientServerNameDropsTheZone(t *testing.T) {
|
||||
for host, want := range map[string]string{"fe80::1%eth0": "fe80::1", "::1": "::1", "relay.example": "relay.example"} {
|
||||
cfg, err := Client(&config.TLSOptions{Enabled: true}, host)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if cfg.ServerName != want {
|
||||
t.Errorf("Client(%q).ServerName = %q, want %q", host, cfg.ServerName, want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Startup names a certificate outside its validity window or within 30 days
|
||||
// of leaving it; a healthy one stays silent.
|
||||
func TestExpiryWarning(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user