Skip to content

Commit

Permalink
util: Return verification error
Browse files Browse the repository at this point in the history
  • Loading branch information
johanstokking committed Jun 20, 2024
1 parent e8c9cd3 commit 5478f3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/auth/mtls/mtls.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ func (c *CAStore) Verify(ctx context.Context, clientType ClientType, cn string,
x509.ExtKeyUsageClientAuth,
},
}
if _, err := cert.Verify(opts); err == nil {
return nil
if _, err := cert.Verify(opts); err != nil {
return errCertificateNotVerified.WithCause(err)
}
return errCertificateNotVerified.New()
return nil
}

0 comments on commit 5478f3b

Please sign in to comment.