Skip to content

Commit

Permalink
prioritize destination CA certs over resolved addressable CA certs (#…
Browse files Browse the repository at this point in the history
…2849)

Signed-off-by: pingjiang <[email protected]>
  • Loading branch information
xiangpingjiang authored Oct 3, 2023
1 parent 294e777 commit 833dd97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resolver/addressable_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (r *URIResolver) addressableFromDestinationRef(ctx context.Context, dest du
return nil, apierrs.NewBadRequest(fmt.Sprintf("hostname missing in address of %s", dest.Ref))
}

if addr.CACerts == nil {
if dest.CACerts != nil && *dest.CACerts != "" {
addr.CACerts = dest.CACerts
}

Expand Down
2 changes: 1 addition & 1 deletion resolver/addressable_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ func TestAddressableFromDestinationV1CACerts(t *testing.T) {
addressableWithCACert(),
},
addr: addressableWithCACert(),
wantCert: CACert,
wantCert: certDestination,
}}

for n, tc := range tests {
Expand Down

0 comments on commit 833dd97

Please sign in to comment.