]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Platform check in FIPS_mode_set.
authorAndy Polyakov <appro@openssl.org>
Thu, 2 Aug 2007 20:42:33 +0000 (20:42 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 2 Aug 2007 20:42:33 +0000 (20:42 +0000)
fips-1.0/fips.c

index 372aa59377261664e40a72b7fa97724812a5bb48..cf6489672fb52850537010f78143cb350f03f386 100644 (file)
@@ -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);