Skip to content

Commit 7240195

Browse files
committed
Propagate error when crypto algorithm is not supported
1 parent 812070f commit 7240195

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎httpsig.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func newSSHSigner(sshSigner ssh.Signer, algo Algorithm, dAlgo DigestAlgorithm, h
305305

306306
s, err := signerFromSSHSigner(sshSigner, string(algo))
307307
if err != nil {
308-
return nil, fmt.Errorf("no crypto implementation available for ssh algo %q", algo)
308+
return nil, fmt.Errorf("no crypto implementation available for ssh algo %q: %s", algo, err)
309309
}
310310

311311
a := &asymmSSHSigner{
@@ -346,7 +346,7 @@ func newSigner(algo Algorithm, dAlgo DigestAlgorithm, headers []string, scheme S
346346
}
347347
m, err := macerFromString(string(algo))
348348
if err != nil {
349-
return nil, fmt.Errorf("no crypto implementation available for %q", algo)
349+
return nil, fmt.Errorf("no crypto implementation available for %q: %s", algo, err)
350350
}
351351
c := &macSigner{
352352
m: m,

0 commit comments

Comments
 (0)