Skip to content

Commit cd9ed14

Browse files
authored
Merge pull request #825 from tjko/pubkeyauth_fix
Fix "rejected" authentication in DoUserAuthRequestPublicKey()
2 parents 04165fc + 5abc8d6 commit cd9ed14

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/internal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7585,6 +7585,12 @@ static int DoUserAuthRequestPublicKey(WOLFSSH* ssh, WS_UserAuthData* authData,
75857585
if (ret == WOLFSSH_USERAUTH_WOULD_BLOCK) {
75867586
ret = WS_AUTH_PENDING;
75877587
}
7588+
else if (ret == WOLFSSH_USERAUTH_REJECTED) {
7589+
#ifndef NO_FAILURE_ON_REJECTED
7590+
authFailure = 1;
7591+
#endif
7592+
ret = WS_USER_AUTH_E;
7593+
}
75887594
else {
75897595
if (ret == WOLFSSH_USERAUTH_PARTIAL_SUCCESS) {
75907596
partialSuccess = 1;

0 commit comments

Comments
 (0)