SSH CRC attack detector now uses a dynamically allocated context.
[u/mdw/putty] / ssh.h
diff --git a/ssh.h b/ssh.h
index 28dd6dd..bf57b8f 100644 (file)
--- a/ssh.h
+++ b/ssh.h
@@ -75,7 +75,10 @@ unsigned long crc32(const void *s, size_t len);
 unsigned long crc32_update(unsigned long crc_input, const void *s, size_t len);
 
 /* SSH CRC compensation attack detector */
-int detect_attack(unsigned char *buf, uint32 len, unsigned char *IV);
+void *crcda_make_context(void);
+void crcda_free_context(void *handle);
+int detect_attack(void *handle, unsigned char *buf, uint32 len,
+                 unsigned char *IV);
 
 typedef struct {
     uint32 h[4];