cf3dd1
diff -up openssl-1.1.1g/crypto/evp/pkey_kdf.c.edk2-build openssl-1.1.1g/crypto/evp/pkey_kdf.c
cf3dd1
--- openssl-1.1.1g/crypto/evp/pkey_kdf.c.edk2-build	2020-05-18 12:55:53.299548432 +0200
cf3dd1
+++ openssl-1.1.1g/crypto/evp/pkey_kdf.c	2020-05-18 12:55:53.340548788 +0200
b63792
@@ -12,6 +12,7 @@
b63792
 #include <openssl/evp.h>
b63792
 #include <openssl/err.h>
b63792
 #include <openssl/kdf.h>
b63792
+#include "internal/numbers.h"
cf3dd1
 #include "crypto/evp.h"
b63792
 
b63792
 static int pkey_kdf_init(EVP_PKEY_CTX *ctx)
cf3dd1
diff -up openssl-1.1.1g/crypto/kdf/hkdf.c.edk2-build openssl-1.1.1g/crypto/kdf/hkdf.c
cf3dd1
--- openssl-1.1.1g/crypto/kdf/hkdf.c.edk2-build	2020-05-18 12:55:53.340548788 +0200
cf3dd1
+++ openssl-1.1.1g/crypto/kdf/hkdf.c	2020-05-18 12:57:18.648288904 +0200
cf3dd1
@@ -13,6 +13,7 @@
cf3dd1
 #include <openssl/hmac.h>
cf3dd1
 #include <openssl/kdf.h>
cf3dd1
 #include <openssl/evp.h>
cf3dd1
+#include "internal/numbers.h"
cf3dd1
 #include "internal/cryptlib.h"
cf3dd1
 #include "crypto/evp.h"
cf3dd1
 #include "kdf_local.h"
cf3dd1
diff -up openssl-1.1.1g/crypto/rand/rand_unix.c.edk2-build openssl-1.1.1g/crypto/rand/rand_unix.c
cf3dd1
--- openssl-1.1.1g/crypto/rand/rand_unix.c.edk2-build	2020-05-18 12:56:05.646655554 +0200
cf3dd1
+++ openssl-1.1.1g/crypto/rand/rand_unix.c	2020-05-18 12:58:51.088090896 +0200
cf3dd1
@@ -20,7 +20,7 @@
cf3dd1
 #include "crypto/fips.h"
cf3dd1
 #include <stdio.h>
cf3dd1
 #include "internal/dso.h"
cf3dd1
-#ifdef __linux
cf3dd1
+#if defined(__linux) && !defined(OPENSSL_SYS_UEFI)
cf3dd1
 # include <sys/syscall.h>
cf3dd1
 # include <sys/random.h>
cf3dd1
 # ifdef DEVRANDOM_WAIT
cf3dd1
diff -up openssl-1.1.1g/include/crypto/fips.h.edk2-build openssl-1.1.1g/include/crypto/fips.h
cf3dd1
--- openssl-1.1.1g/include/crypto/fips.h.edk2-build	2020-05-18 12:55:53.296548406 +0200
cf3dd1
+++ openssl-1.1.1g/include/crypto/fips.h	2020-05-18 12:55:53.340548788 +0200
b63792
@@ -50,10 +50,6 @@
b63792
 #include <openssl/opensslconf.h>
b63792
 #include <openssl/evp.h>
b63792
 
b63792
-#ifndef OPENSSL_FIPS
b63792
-# error FIPS is disabled.
b63792
-#endif
b63792
-
b63792
 #ifdef OPENSSL_FIPS
b63792
 
b63792
 int FIPS_module_mode_set(int onoff);
b63792
@@ -97,4 +93,8 @@ void fips_set_selftest_fail(void);
b63792
 
b63792
 void FIPS_get_timevec(unsigned char *buf, unsigned long *pctr);
b63792
 
b63792
+#else
b63792
+
b63792
+# define fips_in_post() 0
b63792
+
b63792
 #endif