7d1228
diff -up openssl-1.1.1g/crypto/evp/pkey_kdf.c.edk2-build openssl-1.1.1g/crypto/evp/pkey_kdf.c
7d1228
--- openssl-1.1.1g/crypto/evp/pkey_kdf.c.edk2-build	2020-05-18 12:55:53.299548432 +0200
7d1228
+++ openssl-1.1.1g/crypto/evp/pkey_kdf.c	2020-05-18 12:55:53.340548788 +0200
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"
7d1228
 #include "crypto/evp.h"
067bfb
 
067bfb
 static int pkey_kdf_init(EVP_PKEY_CTX *ctx)
7d1228
diff -up openssl-1.1.1g/crypto/kdf/hkdf.c.edk2-build openssl-1.1.1g/crypto/kdf/hkdf.c
7d1228
--- openssl-1.1.1g/crypto/kdf/hkdf.c.edk2-build	2020-05-18 12:55:53.340548788 +0200
7d1228
+++ openssl-1.1.1g/crypto/kdf/hkdf.c	2020-05-18 12:57:18.648288904 +0200
7d1228
@@ -13,6 +13,7 @@
7d1228
 #include <openssl/hmac.h>
7d1228
 #include <openssl/kdf.h>
7d1228
 #include <openssl/evp.h>
7d1228
+#include "internal/numbers.h"
7d1228
 #include "internal/cryptlib.h"
7d1228
 #include "crypto/evp.h"
7d1228
 #include "kdf_local.h"
7d1228
diff -up openssl-1.1.1g/crypto/rand/rand_unix.c.edk2-build openssl-1.1.1g/crypto/rand/rand_unix.c
7d1228
--- openssl-1.1.1g/crypto/rand/rand_unix.c.edk2-build	2020-05-18 12:56:05.646655554 +0200
7d1228
+++ openssl-1.1.1g/crypto/rand/rand_unix.c	2020-05-18 12:58:51.088090896 +0200
7d1228
@@ -20,7 +20,7 @@
7d1228
 #include "crypto/fips.h"
7d1228
 #include <stdio.h>
7d1228
 #include "internal/dso.h"
7d1228
-#ifdef __linux
7d1228
+#if defined(__linux) && !defined(OPENSSL_SYS_UEFI)
7d1228
 # include <sys/syscall.h>
7d1228
 # include <sys/random.h>
7d1228
 # ifdef DEVRANDOM_WAIT
7d1228
diff -up openssl-1.1.1g/include/crypto/fips.h.edk2-build openssl-1.1.1g/include/crypto/fips.h
7d1228
--- openssl-1.1.1g/include/crypto/fips.h.edk2-build	2020-05-18 12:55:53.296548406 +0200
7d1228
+++ openssl-1.1.1g/include/crypto/fips.h	2020-05-18 12:55:53.340548788 +0200
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