if (header->msg_code == SSH_MSG_NEWKEYS) {
/* done */
SCLogDebug("done");
- state->flags |= SSH_FLAG_PARSER_DONE;
+ header->flags |= SSH_FLAG_PARSER_DONE;
} else {
/* not yet done */
SCLogDebug("not done");
SCEnter();
int ret = 0;
- if (state->flags & SSH_FLAG_PARSER_DONE) {
+ if (header->flags & SSH_FLAG_PARSER_DONE) {
SCReturnInt(0);
}
goto end;
}
- if ( !(ssh_state->flags & SSH_FLAG_PARSER_DONE)) {
+ if ( !(ssh_state->cli_hdr.flags & SSH_FLAG_PARSER_DONE)) {
printf("Didn't detect the msg code of new keys (ciphered data starts): ");
goto end;
}
goto end;
}
- if ( !(ssh_state->flags & SSH_FLAG_PARSER_DONE)) {
+ if ( !(ssh_state->cli_hdr.flags & SSH_FLAG_PARSER_DONE)) {
printf("Didn't detect the msg code of new keys (ciphered data starts): ");
goto end;
}
goto end;
}
- if ( !(ssh_state->flags & SSH_FLAG_PARSER_DONE)) {
+ if ( !(ssh_state->cli_hdr.flags & SSH_FLAG_PARSER_DONE)) {
printf("Didn't detect the msg code of new keys (ciphered data starts): ");
goto end;
}
goto end;
}
- if ( !(ssh_state->flags & SSH_FLAG_PARSER_DONE)) {
+ if ( !(ssh_state->cli_hdr.flags & SSH_FLAG_PARSER_DONE)) {
printf("Didn't detect the msg code of new keys (ciphered data starts): ");
goto end;
}
goto end;
}
- if ( !(ssh_state->flags & SSH_FLAG_PARSER_DONE)) {
+ if ( !(ssh_state->cli_hdr.flags & SSH_FLAG_PARSER_DONE)) {
printf("Didn't detect the msg code of new keys (ciphered data starts): ");
goto end;
}
goto end;
}
- if ( !(ssh_state->flags & SSH_FLAG_PARSER_DONE)) {
+ if ( !(ssh_state->srv_hdr.flags & SSH_FLAG_PARSER_DONE)) {
printf("Didn't detect the msg code of new keys (ciphered data starts): ");
goto end;
}
goto end;
}
- if ( !(ssh_state->flags & SSH_FLAG_PARSER_DONE)) {
+ if ( !(ssh_state->srv_hdr.flags & SSH_FLAG_PARSER_DONE)) {
printf("Didn't detect the msg code of new keys (ciphered data starts): ");
goto end;
}
/* This flags indicate that the rest of the communication
* must be ciphered, so the parsing finish here */
-#define SSH_FLAG_PARSER_DONE 0x04
+#define SSH_FLAG_PARSER_DONE 0x02
/* MSG_CODE */
#define SSH_MSG_NEWKEYS 21
/** structure to store the SSH state values */
typedef struct SshState_ {
- uint8_t flags; /**< Flags to indicate the current SSH
- sessoin state */
SshHeader srv_hdr;
SshHeader cli_hdr;
} SshState;