Skip to content

Commit

Permalink
fixed the TLS logic
Browse files Browse the repository at this point in the history
  • Loading branch information
johnabass committed Nov 19, 2024
1 parent 2538767 commit f8584d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion token/claimBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func newRemoteClaimBuilder(client xhttpclient.Interface, metadata map[string]int
// enforcePeerCertificate is a ClaimsBuilderFunc that overrides trust as necessary
// given the TLS peer certificates (if any)
func enforcePeerCertificate(_ context.Context, r *Request, target map[string]interface{}) error {
if r.TLS != nil && len(r.TLS.PeerCertificates) == 0 {
if r.TLS == nil || len(r.TLS.PeerCertificates) == 0 {
target[ClaimTrust] = 0
}

Expand Down

0 comments on commit f8584d9

Please sign in to comment.