Skip to content

Commit

Permalink
bug(fulcio): Fixes Witness #535 (#402)
Browse files Browse the repository at this point in the history
bug(fulcio): Fixes #535

Signed-off-by: John Kjell <[email protected]>
  • Loading branch information
jkjell authored Feb 17, 2025
1 parent ea79795 commit 46d5291
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions signer/fulcio/fulcio.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,17 +432,15 @@ func newClient(fulcioURL string, fulcioPort int, isInsecure bool) (fulciopb.CACl
creds := credentials.NewTLS(tlsConfig)

// Set up the gRPC dial options
dialOpts := []grpc.DialOption{
grpc.WithAuthority(u.Hostname()),
}

dialOpts := []grpc.DialOption{}
if isInsecure {
dialOpts = append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))
} else {
dialOpts = append(dialOpts, grpc.WithTransportCredentials(creds))
}

conn, err := grpc.NewClient(net.JoinHostPort(u.Hostname(), strconv.Itoa(fulcioPort)), dialOpts...)
// `passthrough` is used due to the default DNS resolver not properly recognizing no_proxy
conn, err := grpc.NewClient("passthrough:///"+net.JoinHostPort(u.Hostname(), strconv.Itoa(fulcioPort)), dialOpts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 46d5291

Please sign in to comment.