Propagate error when crypto algorithm is not supported

このコミットが含まれているのは:
Cory Slep 2020-12-21 22:19:56 +01:00
コミット 724019526f
1個のファイルの変更2行の追加2行の削除

ファイルの表示

@ -305,7 +305,7 @@ func newSSHSigner(sshSigner ssh.Signer, algo Algorithm, dAlgo DigestAlgorithm, h
s, err := signerFromSSHSigner(sshSigner, string(algo))
if err != nil {
return nil, fmt.Errorf("no crypto implementation available for ssh algo %q", algo)
return nil, fmt.Errorf("no crypto implementation available for ssh algo %q: %s", algo, err)
}
a := &asymmSSHSigner{
@ -346,7 +346,7 @@ func newSigner(algo Algorithm, dAlgo DigestAlgorithm, headers []string, scheme S
}
m, err := macerFromString(string(algo))
if err != nil {
return nil, fmt.Errorf("no crypto implementation available for %q", algo)
return nil, fmt.Errorf("no crypto implementation available for %q: %s", algo, err)
}
c := &macSigner{
m: m,