From cf39c9e1618de6b7ad0661f3efcb73f0c2d2c8c3 Mon Sep 17 00:00:00 2001 From: Evgeniy Kosov Date: Mon, 15 Mar 2021 23:26:06 +0100 Subject: [PATCH] Wrap sign error from an external lib (#10301) --- builtin/logical/ssh/path_sign.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/logical/ssh/path_sign.go b/builtin/logical/ssh/path_sign.go index 7e0c8bee3..1bcd5d547 100644 --- a/builtin/logical/ssh/path_sign.go +++ b/builtin/logical/ssh/path_sign.go @@ -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