Skip to content

Commit 3bad5b6

Browse files
authored
Check for .internal with SubjectIsInternal (#305)
1 parent ba418d8 commit 3bad5b6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

certificates.go

+1
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ func SubjectIsInternal(subj string) bool {
553553
return subj == "localhost" ||
554554
strings.HasSuffix(subj, ".localhost") ||
555555
strings.HasSuffix(subj, ".local") ||
556+
strings.HasSuffix(subj, ".internal") ||
556557
strings.HasSuffix(subj, ".home.arpa") ||
557558
isInternalIP(subj)
558559
}

certificates_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ func TestSubjectQualifiesForPublicCert(t *testing.T) {
163163
{"local", true},
164164
{"foo.local", false},
165165
{"foo.bar.local", false},
166+
{"foo.internal", false},
167+
{"foo.bar.internal", false},
166168
{"foo.home.arpa", false},
167169
{"foo.bar.home.arpa", false},
168170
{"192.168.1.3", false},

0 commit comments

Comments
 (0)