-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC-4256 Keyboard-Interactive authentication #763
base: master
Are you sure you want to change the base?
Conversation
bab5784
to
9e7bd3f
Compare
d385689
to
8d1a669
Compare
5f68a6c
to
4f65c0b
Compare
Added additional packet checks and an additional test. |
8ee69de
to
de0f986
Compare
fbef091
to
7ea9f8f
Compare
src/internal.c
Outdated
if (ssh == NULL || output == NULL || idx == NULL || authData == NULL) | ||
ret = WS_BAD_ARGUMENT; | ||
|
||
if (authData->sf.keyboard.promptCount != authData->sf.keyboard.responseCount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If authData
is NULL, ret
is set to the error code, but we'll still dereference it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I ran my work from #769 and found another one too. Both fixed.
src/internal.c
Outdated
@@ -7526,6 +7685,10 @@ static int DoUserAuthFailure(WOLFSSH* ssh, | |||
ret = SendUserAuthRequest(ssh, authType, 0); | |||
} | |||
|
|||
if ((ret == WS_SUCCESS) && (authType & WOLFSSH_USERAUTH_KEYBOARD)) { | |||
//ret = SendUserAuthKeyboard(ssh, authType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use C++ comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh! That shouldn't be there at all, I thought I had removed it already.
This implements Keyboard-Interactive authentication. Adds an additional callback set by `wolfSSH_KeyboarAuthPrompts()` which will set a callback in the server to ask the application to provide the prompt details for the client.
This implements Keyboard-Interactive authentication.
Adds an additional callback set by
wolfSSH_KeyboarAuthPrompts()
which will set a callback in the server to ask the application to provide the prompt details for the client.