Skip to content

Commit

Permalink
fix panic
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis committed Jan 17, 2025
1 parent edab492 commit c701b52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/web/oidcidp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ func TestThumbprint(t *testing.T) {

thumbprint := strings.Trim(string(resp.Bytes()), "\"")

serverCertificateSHA1 := sha1.Sum(proxy.web.TLS.Certificates[0].Leaf.Raw)
require.NotEmpty(t, proxy.web.TLS.Certificates, "missing web tls certificates")
require.NotEmpty(t, proxy.web.TLS.Certificates[0].Certificate, "missing web tls certificates")
serverCertificateSHA1 := sha1.Sum(proxy.web.TLS.Certificates[0].Certificate[0])
expectedThumbprint := hex.EncodeToString(serverCertificateSHA1[:])

require.Equal(t, expectedThumbprint, thumbprint)
Expand Down

0 comments on commit c701b52

Please sign in to comment.