Skip to content

Commit 3f5155b

Browse files
committed
add minor validation
1 parent 120ea07 commit 3f5155b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cns/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func verifyPeerCertificate(verifiedChains [][]*x509.Certificate, clientSubjectNa
163163
return nil
164164
}
165165

166-
if len(verifiedChains) == 0 {
166+
if len(verifiedChains) == 0 || len(verifiedChains[0]) == 0 {
167167
return errors.New("no client certificate provided during mTLS")
168168
}
169169

0 commit comments

Comments
 (0)