Skip to content

Commit

Permalink
Add .home.arpa to internal-only hostnames
Browse files Browse the repository at this point in the history
  • Loading branch information
mholt committed Sep 5, 2023
1 parent 4fbb049 commit 6668587
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ func SubjectIsIP(subj string) bool {
func SubjectIsInternal(subj string) bool {
return subj == "localhost" ||
strings.HasSuffix(subj, ".localhost") ||
strings.HasSuffix(subj, ".local")
strings.HasSuffix(subj, ".local") ||
strings.HasSuffix(subj, ".home.arpa")
}

// MatchWildcard returns true if subject (a candidate DNS name)
Expand Down
2 changes: 2 additions & 0 deletions certificates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ func TestSubjectQualifiesForPublicCert(t *testing.T) {
{"local", true},
{"foo.local", false},
{"foo.bar.local", false},
{"foo.home.arpa", false},
{"foo.bar.home.arpa", false},
{"192.168.1.3", false},
{"10.0.2.1", false},
{"169.112.53.4", false},
Expand Down

0 comments on commit 6668587

Please sign in to comment.