Browse Subversion Repository
Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/crypt.c
Parent Directory
| Revision Log
| Patch
| 189 |
return DEATTACK_OK; |
return DEATTACK_OK; |
| 190 |
} |
} |
| 191 |
|
|
| 192 |
BOOL CRYPT_detect_attack(PTInstVar pvar, unsigned char *buf, |
BOOL CRYPT_detect_attack(PTInstVar pvar, unsigned char *buf, int bytes) |
|
int bytes) |
|
| 193 |
{ |
{ |
| 194 |
if (SSHv1(pvar)) { |
if (SSHv1(pvar) && pvar->crypt_state.sender_cipher != SSH_CIPHER_NONE) { |
| 195 |
if (pvar->crypt_state.sender_cipher == SSH_CIPHER_NONE) { |
return detect_attack(&pvar->crypt_state.detect_attack_statics, buf, bytes, NULL) == DEATTACK_DETECTED; |
|
return FALSE; |
|
|
} |
|
|
else { |
|
|
return detect_attack(&pvar->crypt_state.detect_attack_statics, |
|
|
buf, bytes, NULL) == DEATTACK_DETECTED; |
|
|
} |
|
| 196 |
} else { |
} else { |
| 197 |
return FALSE; |
return FALSE; |
| 198 |
} |
} |
|
|
Legend:
| Removed from v.6841 |
|
| changed lines |
| |
Added in v.6980 |
|
|
| |