File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10875,7 +10875,7 @@ int DoProtoId(WOLFSSH* ssh)
1087510875 }
1087610876
1087710877 if (ssh->inputBuffer.length >= 4
10878- && WSTRNCASECMP ((char*)ssh->inputBuffer.buffer, "SSH-", 4) == 0)
10878+ && WSTRNCMP ((char*)ssh->inputBuffer.buffer, "SSH-", 4) == 0)
1087910879 break;
1088010880
1088110881 if (!allowBanner) {
@@ -10904,8 +10904,8 @@ int DoProtoId(WOLFSSH* ssh)
1090410904 eolSz = (*eol == '\r') ? 2 : 1;
1090510905
1090610906 if (ssh->inputBuffer.length >= SSH_PROTO_SZ
10907- && WSTRNCASECMP ((char*)ssh->inputBuffer.buffer,
10908- ssh->ctx->sshProtoIdStr, SSH_PROTO_SZ) == 0) {
10907+ && WSTRNCMP ((char*)ssh->inputBuffer.buffer,
10908+ ssh->ctx->sshProtoIdStr, SSH_PROTO_SZ) == 0) {
1090910909
1091010910 if (ssh->ctx->side == WOLFSSH_ENDPOINT_SERVER)
1091110911 ssh->clientState = CLIENT_VERSION_DONE;
Original file line number Diff line number Diff line change @@ -87,13 +87,13 @@ static const ProtoIdTestVector protoIdTestVectors[] = {
8787 "SSH-2.0-wolfSSHv" LIBWOLFSSH_VERSION_STRING "\n" ,
8888 0 , WS_SUCCESS , WOLFSSH_ENDPOINT_CLIENT },
8989
90- /* Case-insensitive match . DoProtoId uses WSTRNCASECMP . */
90+ /* Case rejection . DoProtoId uses WSTRNCMP . */
9191 { "lowercase ssh prefix" ,
9292 "ssh-2.0-wolfSSHv" LIBWOLFSSH_VERSION_STRING "\r\n" ,
93- 0 , WS_SUCCESS , WOLFSSH_ENDPOINT_CLIENT },
93+ 0 , WS_SOCKET_ERROR_E , WOLFSSH_ENDPOINT_CLIENT },
9494 { "mixed case SSH prefix" ,
9595 "Ssh-2.0-wolfSSHv" LIBWOLFSSH_VERSION_STRING "\r\n" ,
96- 0 , WS_SUCCESS , WOLFSSH_ENDPOINT_CLIENT },
96+ 0 , WS_SOCKET_ERROR_E , WOLFSSH_ENDPOINT_CLIENT },
9797
9898 /* OpenSSH peer identification. */
9999 { "OpenSSH version string" ,
You can’t perform that action at this time.
0 commit comments