mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
fixing recovery from x/golang/crypto panics
This commit is contained in:
@@ -389,6 +389,16 @@ func (b *backend) calculateTTL(data *framework.FieldData, role *sshRole) (time.D
|
||||
}
|
||||
|
||||
func (b *creationBundle) sign() (retCert *ssh.Certificate, retErr error) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
errMsg, ok := r.(string)
|
||||
if ok {
|
||||
retCert = nil
|
||||
retErr = errors.New(errMsg)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
serialNumber, err := certutil.GenerateSerialNumber()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user