mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
Handle missing serial number more gracefully (#27681)
* Handle missing serial number more gracefully * remove poc code * changelog
This commit is contained in:
parent
a7078102c3
commit
30f457f32b
2 changed files with 6 additions and 1 deletions
|
|
@ -361,7 +361,9 @@ func (b *backend) pathFetchRead(ctx context.Context, req *logical.Request, data
|
|||
contentType = "application/pem-certificate-chain"
|
||||
}
|
||||
default:
|
||||
serial = data.Get("serial").(string)
|
||||
if ser, ok := data.GetOk("serial"); ok {
|
||||
serial = ser.(string)
|
||||
}
|
||||
pemType = "CERTIFICATE"
|
||||
}
|
||||
if len(serial) == 0 {
|
||||
|
|
|
|||
3
changelog/27681.txt
Normal file
3
changelog/27681.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
secrets/pki: fix lack of serial number to a certificate read resulting in a server side error.
|
||||
```
|
||||
Loading…
Reference in a new issue