summaryrefslogtreecommitdiffstats
path: root/CryptoPkg/Library/BaseCryptLib
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-05-07 21:59:23 +0200
committerLaszlo Ersek <lersek@redhat.com>2018-05-08 13:29:06 +0200
commitee3198e672e2f27d31e82adad572dbb4f3bbdf1f (patch)
tree593fcd4164f75365bc5586c43679865451d9cb24 /CryptoPkg/Library/BaseCryptLib
parentd9476a7ef1476621c14a7e632b8b8fc3ca419f61 (diff)
downloadedk2-ee3198e672e2f27d31e82adad572dbb4f3bbdf1f.tar.gz
edk2-ee3198e672e2f27d31e82adad572dbb4f3bbdf1f.tar.bz2
edk2-ee3198e672e2f27d31e82adad572dbb4f3bbdf1f.zip
CryptoPkg/CrtLibSupport: add secure_getenv() stub function
The Fedora distro ships a modified OpenSSL 1.1.0 package stream. One of their patches calls the secure_getenv() C library function. We already have a stub for getenv(); it applies trivially to secure_getenv() as well. Add the secure_getenv() stub so that edk2 can be built with Fedora's OpenSSL 1.1.0 sources. Cc: Qin Long <qin.long@intel.com> Cc: Ting Ye <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Long Qin <qin.long@intel.com>
Diffstat (limited to 'CryptoPkg/Library/BaseCryptLib')
-rw-r--r--CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
index 20c96563d2..9510a4a383 100644
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
@@ -361,6 +361,19 @@ char *getenv (const char *varname)
return NULL;
}
+/* Get a value from the current environment */
+char *secure_getenv (const char *varname)
+{
+ //
+ // Null secure_getenv() function implementation to satisfy the linker, since
+ // there is no direct functionality logic dependency in present UEFI cases.
+ //
+ // From the secure_getenv() manual: 'just like getenv() except that it
+ // returns NULL in cases where "secure execution" is required'.
+ //
+ return NULL;
+}
+
//
// -- Stream I/O Routines --
//