Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/crypt.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6841 by doda, Tue Jul 4 15:02:28 2017 UTC revision 6980 by doda, Sat Nov 25 15:26:22 2017 UTC
# Line 189  static int detect_attack(CRYPTDetectAtta Line 189  static int detect_attack(CRYPTDetectAtta
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

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26