summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c13
-rw-r--r--CryptoPkg/Library/Include/CrtLibSupport.h1
2 files changed, 14 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 --
//
diff --git a/CryptoPkg/Library/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/CrtLibSupport.h
index 7f1ec12302..feaf58b0c7 100644
--- a/CryptoPkg/Library/Include/CrtLibSupport.h
+++ b/CryptoPkg/Library/Include/CrtLibSupport.h
@@ -163,6 +163,7 @@ gid_t getgid (void);
gid_t getegid (void);
void qsort (void *, size_t, size_t, int (*)(const void *, const void *));
char *getenv (const char *);
+char *secure_getenv (const char *);
#if defined(__GNUC__) && (__GNUC__ >= 2)
void abort (void) __attribute__((__noreturn__));
#else