void-packages/srcpkgs/john/patches/truecrypt.patch
2016-03-30 02:03:54 -04:00

20 lines
991 B
Diff

Upstream patch:
commit 480e95b0e449863be3e1a5b0bc634a67df28b618
Author: Solar <solar@openwall.com>
Date: Thu Dec 18 21:24:01 2014 +0100
Fix a bug in truecrypt for non-x86 archs. Closes #912.
--- src/truecrypt_fmt_plug.c
+++ src/truecrypt_fmt_plug.c
@@ -310,8 +310,8 @@ static int crypt_all(int *pcount, struct db_salt *salt)
pbkdf2_sha512_sse((const unsigned char **)pin, lens, psalt->salt, 64, psalt->num_iterations, &(x.poutc), sizeof(key), 0);
}
#else
- if (is_sha512)
- pbkdf2_sha512((const unsigned char*)key_buffer[i], strlen(key_buffer[i]), psalt->salt, 64, num_iterations, key, sizeof(key), 0);
+ if (psalt->hash_type == IS_SHA512)
+ pbkdf2_sha512((const unsigned char*)key_buffer[i], strlen((char*)key_buffer[i]), psalt->salt, 64, psalt->num_iterations, key, sizeof(key), 0);
#endif
else if (psalt->hash_type == IS_RIPEMD160)
pbkdf2_ripemd160(key_buffer[i], strlen((char*)(key_buffer[i])), psalt->salt, 64, psalt->num_iterations, key, sizeof(key), 0);