Fix x86-64 integrated AES-GCM feature detection.

The integrated code path requires CLMUL too.
This commit is contained in:
Brian Smith 2019-01-18 10:18:29 -10:00
parent b9a6d04826
commit 36039cf0b6

View File

@ -85,8 +85,9 @@ impl Context {
pub(super) fn is_avx2(&self) -> bool {
extern "C" {
fn GFp_aesni_gcm_capable() -> c::int;
fn GFp_gcm_clmul_enabled() -> c::int;
}
1 == unsafe { GFp_aesni_gcm_capable() }
1 == unsafe { GFp_gcm_clmul_enabled() } && 1 == unsafe { GFp_aesni_gcm_capable() }
}
}