Check for .internal with SubjectIsInternal (#305)
This commit is contained in:
parent
ba418d86ad
commit
3bad5b6bb5
@ -553,6 +553,7 @@ func SubjectIsInternal(subj string) bool {
|
||||
return subj == "localhost" ||
|
||||
strings.HasSuffix(subj, ".localhost") ||
|
||||
strings.HasSuffix(subj, ".local") ||
|
||||
strings.HasSuffix(subj, ".internal") ||
|
||||
strings.HasSuffix(subj, ".home.arpa") ||
|
||||
isInternalIP(subj)
|
||||
}
|
||||
|
@ -163,6 +163,8 @@ func TestSubjectQualifiesForPublicCert(t *testing.T) {
|
||||
{"local", true},
|
||||
{"foo.local", false},
|
||||
{"foo.bar.local", false},
|
||||
{"foo.internal", false},
|
||||
{"foo.bar.internal", false},
|
||||
{"foo.home.arpa", false},
|
||||
{"foo.bar.home.arpa", false},
|
||||
{"192.168.1.3", false},
|
||||
|
Loading…
Reference in New Issue
Block a user