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

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