summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2007-08-02 20:42:33 +0000
committerAndy Polyakov <appro@openssl.org>2007-08-02 20:42:33 +0000
commitd7dc9a7ce3642f2cc6904f9ed406685029a2e825 (patch)
treebddc8b95516930ed0efbe303e96e614f4a51727c
parent319e19db9ca58eb6999546d317e185f476267be0 (diff)
Platform check in FIPS_mode_set.
-rw-r--r--fips-1.0/fips.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fips-1.0/fips.c b/fips-1.0/fips.c
index 372aa59377..cf6489672f 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);