diff options
author | appro <appro> | 2007-08-02 20:42:33 +0000 |
---|---|---|
committer | appro <appro> | 2007-08-02 20:42:33 +0000 |
commit | 0b846e870483108c376f6d664397bb31875b4093 (patch) | |
tree | c5a68c5408b5556085b1f7f5373988a0f679f1d9 | |
parent | 9326cfe5e23038bca89662a99d52524c65140861 (diff) | |
download | openssl-0b846e870483108c376f6d664397bb31875b4093.tar.gz |
Platform check in FIPS_mode_set.
-rw-r--r-- | fips-1.0/fips.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fips-1.0/fips.c b/fips-1.0/fips.c index 372aa5937..cf6489672 100644 --- a/fips-1.0/fips.c +++ b/fips-1.0/fips.c @@ -255,6 +255,16 @@ int FIPS_mode_set(int onoff) goto end; } +#ifdef OPENSSL_IA32_SSE2 + if ((OPENSSL_ia32cap & (1<<25|1<<26)) != (1<<25|1<<26)) + { + FIPSerr(FIPS_F_FIPS_MODE_SET,FIPS_R_UNSUPPORTED_PLATFORM); + fips_selftest_fail = 1; + ret = 0; + goto end; + } +#endif + if(fips_signature_witness() != FIPS_signature) { FIPSerr(FIPS_F_FIPS_MODE_SET,FIPS_R_CONTRADICTING_EVIDENCE); |