Added error message (#17904)

* Added error message

* Added changelog

* Grammar Chagne

* Changed wording
This commit is contained in:
divyaac
2022-11-11 11:04:10 -08:00
committed by GitHub
parent 55ea56f423
commit 5e2e5f0114
2 changed files with 6 additions and 0 deletions

View File

@@ -62,6 +62,9 @@ func (b *backend) pathLoginResolveRole(ctx context.Context, req *logical.Request
}
func (b *backend) pathLoginAliasLookahead(ctx context.Context, req *logical.Request, d *framework.FieldData) (*logical.Response, error) {
if req.Connection == nil || req.Connection.ConnState == nil {
return nil, fmt.Errorf("tls connection not found")
}
clientCerts := req.Connection.ConnState.PeerCertificates
if len(clientCerts) == 0 {
return nil, fmt.Errorf("no client certificate found")

3
changelog/17904.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
credential/cert: adds error message if no tls connection is found during the AliasLookahead operation
```