|
|
7779df |
--- openssl-1.0.1c/crypto/fips/fips_rand_selftest.c.orig 2012-11-03 18:59:03.620066556 +0100
|
|
|
7779df |
+++ openssl-1.0.1c/crypto/fips/fips_rand_selftest.c 2012-11-03 19:57:33.156686682 +0100
|
|
|
7779df |
@@ -47,6 +47,8 @@
|
|
|
7779df |
*
|
|
|
7779df |
*/
|
|
|
7779df |
|
|
|
7779df |
+#ifdef OPENSSL_FIPS
|
|
|
7779df |
+
|
|
|
7779df |
#include <string.h>
|
|
|
7779df |
#include <openssl/err.h>
|
|
|
7779df |
#include <openssl/fips.h>
|
|
|
7779df |
@@ -54,8 +56,6 @@
|
|
|
7779df |
#include <openssl/fips_rand.h>
|
|
|
7779df |
#include "fips_locl.h"
|
|
|
7779df |
|
|
|
7779df |
-#ifdef OPENSSL_FIPS
|
|
|
7779df |
-
|
|
|
7779df |
typedef struct {
|
|
|
7779df |
unsigned char DT[16];
|
|
|
7779df |
unsigned char V[16];
|
|
|
7779df |
--- openssl-1.0.1c/crypto/fips/fips_dsa_selftest.c.orig 2012-11-03 20:03:20.546180631 +0100
|
|
|
7779df |
+++ openssl-1.0.1c/crypto/fips/fips_dsa_selftest.c 2012-11-03 20:03:46.069328396 +0100
|
|
|
7779df |
@@ -47,6 +47,8 @@
|
|
|
7779df |
*
|
|
|
7779df |
*/
|
|
|
7779df |
|
|
|
7779df |
+#ifdef OPENSSL_FIPS
|
|
|
7779df |
+
|
|
|
7779df |
#include <string.h>
|
|
|
7779df |
#include <openssl/crypto.h>
|
|
|
7779df |
#include <openssl/dsa.h>
|
|
|
7779df |
@@ -56,8 +58,6 @@
|
|
|
7779df |
#include <openssl/bn.h>
|
|
|
7779df |
#include "fips_locl.h"
|
|
|
7779df |
|
|
|
7779df |
-#ifdef OPENSSL_FIPS
|
|
|
7779df |
-
|
|
|
7779df |
static const unsigned char dsa_test_2048_p[] = {
|
|
|
7779df |
0xa8, 0x53, 0x78, 0xd8, 0xfd, 0x3f, 0x8d, 0x72, 0xec, 0x74, 0x18, 0x08,
|
|
|
7779df |
0x0d, 0xa2, 0x13, 0x17, 0xe4, 0x3e, 0xc4, 0xb6, 0x2b, 0xa8, 0xc8, 0x62,
|
|
|
7779df |
--- openssl-1.0.1c/crypto/fips/fips_rand.c.orig 2012-11-03 20:07:49.956891942 +0100
|
|
|
7779df |
+++ openssl-1.0.1c/crypto/fips/fips_rand.c 2012-11-03 20:08:14.260048118 +0100
|
|
|
7779df |
@@ -47,6 +47,8 @@
|
|
|
7779df |
*
|
|
|
7779df |
*/
|
|
|
7779df |
|
|
|
7779df |
+#ifdef OPENSSL_FIPS
|
|
|
7779df |
+
|
|
|
7779df |
/*
|
|
|
7779df |
* This is a FIPS approved AES PRNG based on ANSI X9.31 A.2.4.
|
|
|
7779df |
*/
|
|
|
7779df |
@@ -82,8 +84,6 @@
|
|
|
7779df |
#include <openssl/fips.h>
|
|
|
7779df |
#include "fips_locl.h"
|
|
|
7779df |
|
|
|
7779df |
-#ifdef OPENSSL_FIPS
|
|
|
7779df |
-
|
|
|
7779df |
void *OPENSSL_stderr(void);
|
|
|
7779df |
|
|
|
7779df |
# define AES_BLOCK_LENGTH 16
|
|
|
7779df |
--- openssl-1.0.1c/crypto/rand/md_rand.c.orig 2012-11-03 20:19:31.461754618 +0100
|
|
|
7779df |
+++ openssl-1.0.1c/crypto/rand/md_rand.c 2012-11-03 20:20:58.294282662 +0100
|
|
|
7779df |
@@ -394,7 +394,11 @@
|
|
|
7779df |
/* always poll for external entropy in FIPS mode, drbg provides the
|
|
|
7779df |
* expansion
|
|
|
7779df |
*/
|
|
|
7779df |
+#ifdef OPENSSL_FIPS
|
|
|
7779df |
if (!initialized || FIPS_module_mode()) {
|
|
|
7779df |
+#else
|
|
|
7779df |
+ if (!initialized) {
|
|
|
7779df |
+#endif
|
|
|
7779df |
RAND_poll();
|
|
|
7779df |
initialized = 1;
|
|
|
7779df |
}
|
|
|
7779df |
--- openssl-1.0.1c/crypto/opensslconf.h.in 2012-11-09 20:34:03.434391630 +0100
|
|
|
7779df |
+++ openssl-1.0.1c/crypto/opensslconf.h.in.fips 2005-12-16 11:37:23.000000000 +0100
|
|
|
7779df |
@@ -1,20 +1,5 @@
|
|
|
7779df |
/* crypto/opensslconf.h.in */
|
|
|
7779df |
|
|
|
7779df |
-#ifdef OPENSSL_DOING_MAKEDEPEND
|
|
|
7779df |
-
|
|
|
7779df |
-/* Include any symbols here that have to be explicitly set to enable a feature
|
|
|
7779df |
- * that should be visible to makedepend.
|
|
|
7779df |
- *
|
|
|
7779df |
- * [Our "make depend" doesn't actually look at this, we use actual build settings
|
|
|
7779df |
- * instead; we want to make it easy to remove subdirectories with disabled algorithms.]
|
|
|
7779df |
- */
|
|
|
7779df |
-
|
|
|
7779df |
-#ifndef OPENSSL_FIPS
|
|
|
7779df |
-#define OPENSSL_FIPS
|
|
|
7779df |
-#endif
|
|
|
7779df |
-
|
|
|
7779df |
-#endif
|
|
|
7779df |
-
|
|
|
7779df |
/* Generate 80386 code? */
|
|
|
7779df |
#undef I386_ONLY
|
|
|
7779df |
|