fix: harden startup proxy and coordinate handling

This commit is contained in:
xweiba
2026-08-06 12:17:23 +08:00
parent 881270a21a
commit 0e8e83fd33
26 changed files with 708 additions and 266 deletions
+14
View File
@@ -33,3 +33,17 @@ func TestGenerateCA(t *testing.T) {
t.Fatal(err)
}
}
func TestGenerateCAUsesUniquePrivateKeys(t *testing.T) {
_, firstKey, err := generateCA()
if err != nil {
t.Fatal(err)
}
_, secondKey, err := generateCA()
if err != nil {
t.Fatal(err)
}
if string(firstKey) == string(secondKey) {
t.Fatal("generated CA private keys must not be deterministic")
}
}