Skip to content

Commit 1fca220

Browse files
ndyakovCopilot
andauthored
Update identity/confidential_identity_provider.go
Co-authored-by: Copilot <[email protected]>
1 parent 2631968 commit 1fca220

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

identity/confidential_identity_provider.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ func NewConfidentialIdentityProvider(opts ConfidentialIdentityProviderOptions) (
124124
}
125125
case ClientCertificateCredentialType:
126126
// ClientCertificateCredentialType is the type of credentials that uses a client certificate to authenticate.
127-
if opts.ClientCert == nil {
128-
return nil, fmt.Errorf("client certificate is required when using client certificate credentials")
127+
if opts.ClientCert == nil || len(opts.ClientCert) == 0 {
128+
return nil, fmt.Errorf("non-empty client certificate is required when using client certificate credentials")
129129
}
130130
if opts.ClientPrivateKey == nil {
131131
return nil, fmt.Errorf("client private key is required when using client certificate credentials")

0 commit comments

Comments
 (0)