mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 04:57:53 +00:00
Add check for PCLMUL instruction too. Virtually all CPUs with AES-NI have it but good to be sure.
This commit is contained in:
parent
012fba617d
commit
8faaaec710
@ -62,7 +62,7 @@ static bool _zt_aesni_supported()
|
||||
: "=a"(eax),"=b"(ebx),"=c"(ecx),"=d"(edx)
|
||||
: "a"(1),"c"(0)
|
||||
);
|
||||
return ((ecx & (1 << 25)) != 0);
|
||||
return (((ecx & (1 << 25)) != 0) && ((ecx & (1 << 1)) != 0)); // check for both AES-NI and PCLMUL
|
||||
#endif
|
||||
}
|
||||
const bool AES::HW_ACCEL = _zt_aesni_supported();
|
||||
|
Loading…
Reference in New Issue
Block a user