Skip to content

Commit

Permalink
refactor: add reason info to err
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <me@dw1.io>
  • Loading branch information
dwisiswant0 committed Mar 2, 2024
1 parent dce4874 commit b2a414c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sebel.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package sebel

import (
"fmt"

"crypto/tls"
"crypto/x509"
"net/http"
Expand Down Expand Up @@ -85,7 +87,9 @@ func (s *Sebel) checkTLS() (*sslbl.Record, error) {

record, ok = sslbl.Find(sha1sum, data)
if ok {
return record, ErrSSLBlacklist
reason := record.Listing.Reason

return record, fmt.Errorf("%w: %s detected", ErrSSLBlacklist, reason)
}

return record, nil
Expand Down

0 comments on commit b2a414c

Please sign in to comment.