Rinjdael: Fix use of SSE2 outside USE_AESNI/ctx->use_aesni
* cipher/rijndael.c (_gcry_aes_cbc_enc): Check if AES-NI is enabled before calling aesni_prepare() and aesni_cleanup().
aesni_cleanup() contains SSE2 instructions that are interpreted as MMX on CPUs
without SSE2 support (Pentium-III, etc). This causes x87 register state to be
poisoned, causing crashes later on when program tries to use floating point
registers.
Add '#ifdef USE_AESNI' and 'if (ctx->use_aesni)' for aesni_cleanup() and, while
at it, for aesni_prepare() too.
- Reported-by: Mitsutoshi NAKANO <bkbin005@rinku.zaq.ne.jp>
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>