Wrap sign error from an external lib (#10301)

This commit is contained in:
Evgeniy Kosov 2021-03-15 23:26:06 +01:00 committed by GitHub
parent 3fb284c217
commit cf39c9e161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -532,7 +532,7 @@ func (b *creationBundle) sign() (retCert *ssh.Certificate, retErr error) {
algo := b.Role.AlgorithmSigner
sig, err := sshAlgorithmSigner.SignWithAlgorithm(rand.Reader, certificateBytes, algo)
if err != nil {
return nil, fmt.Errorf("failed to generate signed SSH key: sign error")
return nil, errwrap.Wrapf("failed to generate signed SSH key: sign error: {{err}}", err)
}
certificate.Signature = sig