-/* Copyright (C) 2009-2012, Martin Johansson <martin@fatbob.nu>
- Copyright (C) 2005-2012, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2014, Martin Johansson <martin@fatbob.nu>
+ Copyright (C) 2005-2014, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
#include "crypt.h"
#include "ssl.h"
-#ifdef USE_POLARSSL
-#include <polarssl/havege.h>
+#ifdef USE_POLARSSL_HAVEGE
extern havege_state hs;
#endif
CryptState_ocb_decrypt(cs, source+4, dst, plain_length, cs->decrypt_iv, tag);
if (memcmp(tag, source+1, 3) != 0) {
- memcpy(cs->decrypt_iv, saveiv, AES_BLOCK_SIZE);
+ memcpy(cs->decrypt_iv, saveiv, AES_BLOCK_SIZE);
return false;
}
cs->decrypt_history[cs->decrypt_iv[0]] = cs->decrypt_iv[1];