Skip to content

Commit

Permalink
Merge pull request #6 from pmagne/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Issif authored Apr 14, 2022
2 parents ec6c9d3 + bc522d5 commit abde803
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func CertCheckWorker(r string, homoglyph *map[string]string, msgChan chan []byte
if !IsMatchingCert(homoglyph, result, reg) {
continue
}
result.Addresses = fetchIPAddresses(result.Domain)
bufferChan <- result
}
}
Expand All @@ -59,7 +60,6 @@ func ParseResultCertificate(msg []byte) (*model.Result, error) {
Addresses: []string{},
}

r.Addresses = fetchIPAddresses(r.Domain)
return r, nil
}

Expand Down
1 change: 0 additions & 1 deletion lib/lib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ var _ = Describe("Handler", func() {
Expect(result.IDN).Should(Equal(""))
Expect(result.SAN).Should(Equal([]string{"baden-mueller.de", "www.baden-mueller.de"}))
Expect(result.Issuer).Should(Equal("Let's Encrypt"))
Expect(result.Addresses).Should(Equal([]string{"23.236.62.147"}))
Expect(err).ToNot(HaveOccurred())
})
})
Expand Down
9 changes: 9 additions & 0 deletions res/cert.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@
"subjectAltName": "DNS:www.baden-mueller.de, DNS:baden-mueller.de",
"subjectKeyIdentifier": "4F:11:F2:CC:31:BC:1E:B8:29:2F:15:A9:C0:9A:51:C3:05:A4:48:C0"
},
"issuer": {
"C": "US",
"CN": "Let's Encrypt Authority X3",
"L": null,
"O": "Let's Encrypt",
"OU": null,
"ST": null,
"aggregated": "/C=US/CN=Let's Encrypt Authority X3/O=Let's Encrypt"
},
"fingerprint": "64:BF:49:41:3B:7A:FD:5D:C1:04:D9:44:64:9D:1C:25:13:A2:49:86",
"not_after": 1598120268,
"not_before": 1590344268,
Expand Down
9 changes: 9 additions & 0 deletions res/cert_idn.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@
"subjectAltName": "DNS:www.baden-mueller.de, DNS:xn--badn-mullr-msiec.de",
"subjectKeyIdentifier": "4F:11:F2:CC:31:BC:1E:B8:29:2F:15:A9:C0:9A:51:C3:05:A4:48:C0"
},
"issuer":{
"C": "US",
"CN": "Let's Encrypt Authority X3",
"L": null,
"O": "Let's Encrypt",
"OU": null,
"ST": null,
"aggregated": "/C=US/CN=Let's Encrypt Authority X3/O=Let's Encrypt"
},
"fingerprint": "64:BF:49:41:3B:7A:FD:5D:C1:04:D9:44:64:9D:1C:25:13:A2:49:86",
"not_after": 1598120268,
"not_before": 1590344268,
Expand Down

0 comments on commit abde803

Please sign in to comment.