Blame SOURCES/openssl-1.1.1-edk2-build.patch

067bfb
diff -up openssl-1.1.1c/crypto/evp/pkey_kdf.c.edk2-build openssl-1.1.1c/crypto/evp/pkey_kdf.c
067bfb
--- openssl-1.1.1c/crypto/evp/pkey_kdf.c.edk2-build	2019-11-14 16:25:09.437914854 +0100
067bfb
+++ openssl-1.1.1c/crypto/evp/pkey_kdf.c	2019-11-15 14:52:40.216905772 +0100
067bfb
@@ -12,6 +12,7 @@
067bfb
 #include <openssl/evp.h>
067bfb
 #include <openssl/err.h>
067bfb
 #include <openssl/kdf.h>
067bfb
+#include "internal/numbers.h"
067bfb
 #include "internal/evp_int.h"
067bfb
 
067bfb
 static int pkey_kdf_init(EVP_PKEY_CTX *ctx)
067bfb
diff -up openssl-1.1.1c/crypto/include/internal/fips_int.h.edk2-build openssl-1.1.1c/crypto/include/internal/fips_int.h
067bfb
--- openssl-1.1.1c/crypto/include/internal/fips_int.h.edk2-build	2019-11-14 16:25:09.430914981 +0100
067bfb
+++ openssl-1.1.1c/crypto/include/internal/fips_int.h	2019-11-15 14:48:02.489936610 +0100
067bfb
@@ -50,10 +50,6 @@
067bfb
 #include <openssl/opensslconf.h>
067bfb
 #include <openssl/evp.h>
067bfb
 
067bfb
-#ifndef OPENSSL_FIPS
067bfb
-# error FIPS is disabled.
067bfb
-#endif
067bfb
-
067bfb
 #ifdef OPENSSL_FIPS
067bfb
 
067bfb
 int FIPS_module_mode_set(int onoff);
067bfb
@@ -97,4 +93,8 @@ void fips_set_selftest_fail(void);
067bfb
 
067bfb
 void FIPS_get_timevec(unsigned char *buf, unsigned long *pctr);
067bfb
 
067bfb
+#else
067bfb
+
067bfb
+# define fips_in_post() 0
067bfb
+
067bfb
 #endif
067bfb
diff -up openssl-1.1.1c/crypto/kdf/hkdf.c.edk2-build openssl-1.1.1c/crypto/kdf/hkdf.c
067bfb
--- openssl-1.1.1c/crypto/kdf/hkdf.c.edk2-build	2019-11-14 16:25:09.438914836 +0100
067bfb
+++ openssl-1.1.1c/crypto/kdf/hkdf.c	2019-11-15 14:48:53.360015134 +0100
067bfb
@@ -13,6 +13,7 @@
067bfb
 #include <openssl/hmac.h>
067bfb
 #include <openssl/evp.h>
067bfb
 #include <openssl/kdf.h>
067bfb
+#include "internal/numbers.h"
067bfb
 #include "internal/cryptlib.h"
067bfb
 #include "internal/evp_int.h"
067bfb
 #include "kdf_local.h"
067bfb
diff -up openssl-1.1.1c/crypto/kdf/sshkdf.c.edk2-build openssl-1.1.1c/crypto/kdf/sshkdf.c
067bfb
--- openssl-1.1.1c/crypto/kdf/sshkdf.c.edk2-build	2019-11-14 16:25:09.452914583 +0100
067bfb
+++ openssl-1.1.1c/crypto/kdf/sshkdf.c	2019-11-15 14:53:14.769279878 +0100
067bfb
@@ -12,6 +12,7 @@
067bfb
 #include <string.h>
067bfb
 #include <openssl/evp.h>
067bfb
 #include <openssl/kdf.h>
067bfb
+#include "internal/numbers.h"
067bfb
 #include "internal/cryptlib.h"
067bfb
 #include "internal/evp_int.h"
067bfb
 #include "kdf_local.h"
067bfb
diff -up openssl-1.1.1c/crypto/rand/rand_unix.c.edk2-build openssl-1.1.1c/crypto/rand/rand_unix.c
067bfb
--- openssl-1.1.1c/crypto/rand/rand_unix.c.edk2-build	2019-11-14 16:25:09.430914981 +0100
067bfb
+++ openssl-1.1.1c/crypto/rand/rand_unix.c	2019-11-15 14:51:41.634966941 +0100
067bfb
@@ -19,7 +19,7 @@
067bfb
 #include "internal/fips_int.h"
067bfb
 #include <stdio.h>
067bfb
 #include "internal/dso.h"
067bfb
-#if defined(__linux)
067bfb
+#if defined(__linux) && !defined(OPENSSL_SYS_UEFI)
067bfb
 # include <sys/syscall.h>
067bfb
 # include <sys/random.h>
067bfb
 #endif