You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kris-nova:crypto kris$ go version
go version go1.8 darwin/amd64
Environment
Darwin AMD64
What did you do?
While attempting to authenticate with x/crypto/ssh I was able to return an empty slice of ssh.Signers. My code compiled, but upon running recieved a nil pointer dereference as one would expect.
I would have expected the library to behave in the same way the open-ssh and other SSH tools handle signing attempts, which is to try attempts in the hopes that one will eventually succeed. I think this is the intent of the library given the note here.
In this exact case, we would have no signing methods to try, and the authentication would immediately run out of possible methods to attempt. Thus returning an error like:
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
To clarify, is there a problem with the callback returning a nil slice or with the callback function itself being nil? From the traceback it looks like the callback function is nil. Is the expectation that passing a nil callback would be treated as though it is returning a nil slice of ssh.Signer?
Go Version
1.8.1 stable
Environment
Darwin AMD64
What did you do?
While attempting to authenticate with
x/crypto/ssh
I was able to return an empty slice ofssh.Signer
s. My code compiled, but upon running recieved a nil pointer dereference as one would expect.Expected
I would have expected the library to behave in the same way the
open-ssh
and other SSH tools handle signing attempts, which is to try attempts in the hopes that one will eventually succeed. I think this is the intent of the library given the note here.In this exact case, we would have no signing methods to try, and the authentication would immediately run out of possible methods to attempt. Thus returning an error like:
Actual
nil pointer dereference 😞
The text was updated successfully, but these errors were encountered: