Skip to content

Commit

Permalink
Print SSHFP fingerprint as lowercase hex
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfitzhenry committed Aug 22, 2023
1 parent 48f38eb commit 94a3559
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,7 @@ func TestParseSSHFP(t *testing.T) {
"\t\t\t\t\tB6159E30723665DA95BB )",
"test.example.org.\t300\tSSHFP\t1 2 ( BC6533CDC 95A79078A39A56EA7635984ED655318AD A9B6159E3072366 5DA95BB )",
}
result := "test.example.org.\t300\tIN\tSSHFP\t1 2 BC6533CDC95A79078A39A56EA7635984ED655318ADA9B6159E30723665DA95BB"
result := "test.example.org.\t300\tIN\tSSHFP\t1 2 bc6533cdc95a79078a39a56ea7635984ed655318ada9b6159e30723665da95bb"
for _, o := range lt {
rr, err := NewRR(o)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion types.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ type SSHFP struct {
func (rr *SSHFP) String() string {
return rr.Hdr.String() + strconv.Itoa(int(rr.Algorithm)) +
" " + strconv.Itoa(int(rr.Type)) +
" " + strings.ToUpper(rr.FingerPrint)
" " + strings.ToLower(rr.FingerPrint)
}

// KEY RR. See RFC RFC 2535.
Expand Down

0 comments on commit 94a3559

Please sign in to comment.