]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg: Clean-up CRT Library Wrapper.
authorQin Long <qin.long@intel.com>
Thu, 23 Mar 2017 12:19:39 +0000 (20:19 +0800)
committerQin Long <qin.long@intel.com>
Wed, 29 Mar 2017 08:13:58 +0000 (16:13 +0800)
Cleaning-up CRT Library Wrapper for the third-party cryptography
library building. The changes includes
1. Rename OpenSslSupport.h to CrtLibSupport.h for future alternative
   crypto provider support.
2. Remove all un-referenced CRT APIs and headers.

(NOTE: More cleans-up could be possible after OpenSSL integrate the
      extra PR request: https://github.com/openssl/openssl/pull/2961)

Cc: Ting Ye <ting.ye@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Lin <glin@suse.com>
Cc: Ronald Cron <ronald.cron@arm.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Gary Lin <glin@suse.com>
39 files changed:
CryptoPkg/Include/CrtLibSupport.h [new file with mode: 0644]
CryptoPkg/Include/OpenSslSupport.h [deleted file]
CryptoPkg/Include/arpa/inet.h [deleted file]
CryptoPkg/Include/assert.h
CryptoPkg/Include/ctype.h
CryptoPkg/Include/dirent.h [deleted file]
CryptoPkg/Include/errno.h
CryptoPkg/Include/limits.h
CryptoPkg/Include/malloc.h [deleted file]
CryptoPkg/Include/math.h [deleted file]
CryptoPkg/Include/memory.h
CryptoPkg/Include/netdb.h [deleted file]
CryptoPkg/Include/netinet/in.h [deleted file]
CryptoPkg/Include/sgtty.h [deleted file]
CryptoPkg/Include/signal.h [deleted file]
CryptoPkg/Include/stdarg.h
CryptoPkg/Include/stddef.h
CryptoPkg/Include/stdio.h
CryptoPkg/Include/stdlib.h
CryptoPkg/Include/string.h
CryptoPkg/Include/strings.h
CryptoPkg/Include/sys/ioctl.h [deleted file]
CryptoPkg/Include/sys/param.h [deleted file]
CryptoPkg/Include/sys/socket.h [deleted file]
CryptoPkg/Include/sys/stat.h [deleted file]
CryptoPkg/Include/sys/time.h
CryptoPkg/Include/sys/times.h [deleted file]
CryptoPkg/Include/sys/types.h
CryptoPkg/Include/sys/un.h [deleted file]
CryptoPkg/Include/syslog.h
CryptoPkg/Include/time.h
CryptoPkg/Include/unistd.h
CryptoPkg/Library/BaseCryptLib/InternalCryptLib.h
CryptoPkg/Library/BaseCryptLib/SysCall/BaseMemAllocation.c
CryptoPkg/Library/BaseCryptLib/SysCall/ConstantTimeClock.c
CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
CryptoPkg/Library/BaseCryptLib/SysCall/HelperWrapper.c [deleted file]
CryptoPkg/Library/BaseCryptLib/SysCall/RuntimeMemAllocation.c
CryptoPkg/Library/BaseCryptLib/SysCall/TimerWrapper.c

diff --git a/CryptoPkg/Include/CrtLibSupport.h b/CryptoPkg/Include/CrtLibSupport.h
new file mode 100644 (file)
index 0000000..ddf7784
--- /dev/null
@@ -0,0 +1,193 @@
+/** @file\r
+  Root include file of C runtime library to support building the third-party\r
+  cryptographic library.\r
+\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __CRT_LIB_SUPPORT_H__\r
+#define __CRT_LIB_SUPPORT_H__\r
+\r
+#include <Library/BaseLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/PrintLib.h>\r
+\r
+#define OPENSSLDIR ""\r
+#define ENGINESDIR ""\r
+\r
+#define MAX_STRING_SIZE  0x1000\r
+\r
+//\r
+// OpenSSL relies on explicit configuration for word size in crypto/bn,\r
+// but we want it to be automatically inferred from the target. So we\r
+// bypass what's in <openssl/opensslconf.h> for OPENSSL_SYS_UEFI, and\r
+// define our own here.\r
+//\r
+#ifdef CONFIG_HEADER_BN_H\r
+#error CONFIG_HEADER_BN_H already defined\r
+#endif\r
+\r
+#define CONFIG_HEADER_BN_H\r
+\r
+#if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_IA64)\r
+//\r
+// With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs\r
+// SIXTY_FOUR_BIT, because 'long' is 32-bit and only 'long long' is\r
+// 64-bit. Since using 'long long' works fine on GCC too, just do that.\r
+//\r
+#define SIXTY_FOUR_BIT\r
+#elif defined(MDE_CPU_IA32) || defined(MDE_CPU_ARM) || defined(MDE_CPU_EBC)\r
+#define THIRTY_TWO_BIT\r
+#else\r
+#error Unknown target architecture\r
+#endif\r
+\r
+//\r
+// Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h\r
+//\r
+#if !defined(__CC_ARM) // if va_list is not already defined\r
+#define va_list   VA_LIST\r
+#define va_arg    VA_ARG\r
+#define va_start  VA_START\r
+#define va_end    VA_END\r
+#else // __CC_ARM\r
+#define va_start(Marker, Parameter)   __va_start(Marker, Parameter)\r
+#define va_arg(Marker, TYPE)          __va_arg(Marker, TYPE)\r
+#define va_end(Marker)                ((void)0)\r
+#endif\r
+\r
+//\r
+// Definitions for global constants used by CRT library routines\r
+//\r
+#define EINVAL       22               /* Invalid argument */\r
+#define INT_MAX      0x7FFFFFFF       /* Maximum (signed) int value */\r
+#define LONG_MAX     0X7FFFFFFFL      /* max value for a long */\r
+#define LONG_MIN     (-LONG_MAX-1)    /* min value for a long */\r
+#define ULONG_MAX    0xFFFFFFFF       /* Maximum unsigned long value */\r
+#define CHAR_BIT     8                /* Number of bits in a char */\r
+\r
+//\r
+// Basic types mapping\r
+//\r
+typedef UINTN          size_t;\r
+typedef INTN           ssize_t;\r
+typedef INT32          time_t;\r
+typedef UINT8          __uint8_t;\r
+typedef UINT8          sa_family_t;\r
+typedef UINT32         uid_t;\r
+typedef UINT32         gid_t;\r
+\r
+//\r
+// File operations are not required for EFI building,\r
+// so FILE is mapped to VOID * to pass build\r
+//\r
+typedef VOID  *FILE;\r
+\r
+//\r
+// Structures Definitions\r
+//\r
+struct tm {\r
+  int   tm_sec;     /* seconds after the minute [0-60] */\r
+  int   tm_min;     /* minutes after the hour [0-59] */\r
+  int   tm_hour;    /* hours since midnight [0-23] */\r
+  int   tm_mday;    /* day of the month [1-31] */\r
+  int   tm_mon;     /* months since January [0-11] */\r
+  int   tm_year;    /* years since 1900 */\r
+  int   tm_wday;    /* days since Sunday [0-6] */\r
+  int   tm_yday;    /* days since January 1 [0-365] */\r
+  int   tm_isdst;   /* Daylight Savings Time flag */\r
+  long  tm_gmtoff;  /* offset from CUT in seconds */\r
+  char  *tm_zone;   /* timezone abbreviation */\r
+};\r
+\r
+struct timeval {\r
+  long tv_sec;      /* time value, in seconds */\r
+  long tv_usec;     /* time value, in microseconds */\r
+};\r
+\r
+struct sockaddr {\r
+  __uint8_t    sa_len;       /* total length */\r
+  sa_family_t  sa_family;    /* address family */\r
+  char         sa_data[14];  /* actually longer; address value */\r
+};\r
+\r
+//\r
+// Global variables\r
+//\r
+extern int  errno;\r
+extern FILE *stderr;\r
+\r
+//\r
+// Function prototypes of CRT Library routines\r
+//\r
+void           *malloc     (size_t);\r
+void           *realloc    (void *, size_t);\r
+void           free        (void *);\r
+void           *memset     (void *, int, size_t);\r
+int            isdigit     (int);\r
+int            isspace     (int);\r
+int            isxdigit    (int);\r
+int            isalnum     (int);\r
+int            isupper     (int);\r
+int            tolower     (int);\r
+int            strcmp      (const char *, const char *);\r
+int            strncasecmp (const char *, const char *, size_t);\r
+char           *strrchr    (const char *, int);\r
+unsigned long  strtoul     (const char *, char **, int);\r
+long           strtol      (const char *, char **, int);\r
+char           *strerror   (int);\r
+size_t         strspn      (const char *, const char *);\r
+size_t         strcspn     (const char *, const char *);\r
+int            printf      (const char *, ...);\r
+int            sscanf      (const char *, const char *, ...);\r
+FILE           *fopen      (const char *, const char *);\r
+size_t         fread       (void *, size_t, size_t, FILE *);\r
+size_t         fwrite      (const void *, size_t, size_t, FILE *);\r
+int            fclose      (FILE *);\r
+int            fprintf     (FILE *, const char *, ...);\r
+time_t         time        (time_t *);\r
+struct tm      *gmtime     (const time_t *);\r
+uid_t          getuid      (void);\r
+uid_t          geteuid     (void);\r
+gid_t          getgid      (void);\r
+gid_t          getegid     (void);\r
+void           qsort       (void *, size_t, size_t, int (*)(const void *, const void *));\r
+char           *getenv     (const char *);\r
+#if defined(__GNUC__) && (__GNUC__ >= 2)\r
+void           abort       (void) __attribute__((__noreturn__));\r
+#else\r
+void           abort       (void);\r
+#endif\r
+\r
+//\r
+// Macros that directly map functions to BaseLib, BaseMemoryLib, and DebugLib functions\r
+//\r
+#define memcpy(dest,source,count)         CopyMem(dest,source,(UINTN)(count))\r
+#define memset(dest,ch,count)             SetMem(dest,(UINTN)(count),(UINT8)(ch))\r
+#define memchr(buf,ch,count)              ScanMem8(buf,(UINTN)(count),(UINT8)ch)\r
+#define memcmp(buf1,buf2,count)           (int)(CompareMem(buf1,buf2,(UINTN)(count)))\r
+#define memmove(dest,source,count)        CopyMem(dest,source,(UINTN)(count))\r
+#define strlen(str)                       (size_t)(AsciiStrnLenS(str,MAX_STRING_SIZE))\r
+#define strcpy(strDest,strSource)         AsciiStrCpyS(strDest,MAX_STRING_SIZE,strSource)\r
+#define strncpy(strDest,strSource,count)  AsciiStrnCpyS(strDest,MAX_STRING_SIZE,strSource,(UINTN)count)\r
+#define strcat(strDest,strSource)         AsciiStrCatS(strDest,MAX_STRING_SIZE,strSource)\r
+#define strchr(str,ch)                    ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch)\r
+#define strncmp(string1,string2,count)    (int)(AsciiStrnCmp(string1,string2,(UINTN)(count)))\r
+#define strcasecmp(str1,str2)             (int)AsciiStriCmp(str1,str2)\r
+#define sprintf(buf,...)                  AsciiSPrint(buf,MAX_STRING_SIZE,__VA_ARGS__)\r
+#define localtime(timer)                  NULL\r
+#define assert(expression)\r
+#define offsetof(type,member)             OFFSET_OF(type,member)\r
+#define atoi(nptr)                        AsciiStrDecimalToUintn(nptr)\r
+#define gettimeofday(tvp,tz)              do { (tvp)->tv_sec = time(NULL); (tvp)->tv_usec = 0; } while (0)\r
+\r
+#endif\r
diff --git a/CryptoPkg/Include/OpenSslSupport.h b/CryptoPkg/Include/OpenSslSupport.h
deleted file mode 100644 (file)
index e6858a9..0000000
+++ /dev/null
@@ -1,292 +0,0 @@
-/** @file\r
-  Root include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef __OPEN_SSL_SUPPORT_H__\r
-#define __OPEN_SSL_SUPPORT_H__\r
-\r
-#include <Base.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/DebugLib.h>\r
-\r
-#define OPENSSLDIR ""\r
-#define ENGINESDIR ""\r
-\r
-#define MAX_STRING_SIZE  0x1000\r
-\r
-//\r
-// OpenSSL relies on explicit configuration for word size in crypto/bn,\r
-// but we want it to be automatically inferred from the target. So we\r
-// bypass what's in <openssl/opensslconf.h> for OPENSSL_SYS_UEFI, and\r
-// define our own here.\r
-//\r
-#ifdef CONFIG_HEADER_BN_H\r
-#error CONFIG_HEADER_BN_H already defined\r
-#endif\r
-\r
-#define CONFIG_HEADER_BN_H\r
-\r
-#if defined(MDE_CPU_X64) || defined(MDE_CPU_AARCH64) || defined(MDE_CPU_IA64)\r
-//\r
-// With GCC we would normally use SIXTY_FOUR_BIT_LONG, but MSVC needs\r
-// SIXTY_FOUR_BIT, because 'long' is 32-bit and only 'long long' is\r
-// 64-bit. Since using 'long long' works fine on GCC too, just do that.\r
-//\r
-#define SIXTY_FOUR_BIT\r
-#elif defined(MDE_CPU_IA32) || defined(MDE_CPU_ARM) || defined(MDE_CPU_EBC)\r
-#define THIRTY_TWO_BIT\r
-#else\r
-#error Unknown target architecture\r
-#endif\r
-\r
-//\r
-// File operations are not required for building Open SSL, \r
-// so FILE is mapped to VOID * to pass build\r
-//\r
-typedef VOID  *FILE;\r
-\r
-//\r
-// Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h\r
-//\r
-#if !defined(__CC_ARM) // if va_list is not already defined\r
-#define va_list   VA_LIST\r
-#define va_arg    VA_ARG\r
-#define va_start  VA_START\r
-#define va_end    VA_END\r
-#else // __CC_ARM\r
-#define va_start(Marker, Parameter)   __va_start(Marker, Parameter)\r
-#define va_arg(Marker, TYPE)          __va_arg(Marker, TYPE)\r
-#define va_end(Marker)                ((void)0)\r
-#endif\r
-\r
-//\r
-// #defines from EFI Application Toolkit required to build Open SSL\r
-//\r
-#define ENOMEM       12               /* Cannot allocate memory */\r
-#define EINVAL       22               /* Invalid argument */\r
-#define BUFSIZ       1024             /* size of buffer used by setbuf */\r
-#define INT_MAX      2147483647       /* max value for an int */\r
-#define INT_MIN      (-2147483647-1)  /* min value for an int */\r
-#define LONG_MAX     2147483647L      /* max value for a long */\r
-#define LONG_MIN     (-2147483647-1)  /* min value for a long */\r
-#define ULONG_MAX    0xffffffff       /* max value for an unsigned long */\r
-#define LOG_DAEMON   (3<<3)           /* system daemons */\r
-#define LOG_EMERG    0                /* system is unusable */\r
-#define LOG_ALERT    1                /* action must be taken immediately */\r
-#define LOG_CRIT     2                /* critical conditions */\r
-#define LOG_ERR      3                /* error conditions */\r
-#define LOG_WARNING  4                /* warning conditions */\r
-#define LOG_NOTICE   5                /* normal but significant condition */\r
-#define LOG_INFO     6                /* informational */\r
-#define LOG_DEBUG    7                /* debug-level messages */\r
-#define LOG_PID      0x01             /* log the pid with each message */\r
-#define LOG_CONS     0x02             /* log on the console if errors in sending */\r
-#define CHAR_BIT     8                /* Number of bits in a char */\r
-\r
-//\r
-// Macros from EFI Application Toolkit required to build Open SSL\r
-//\r
-/* The offsetof() macro calculates the offset of a structure member\r
-   in its structure.  Unfortunately this cannot be written down\r
-   portably, hence it is provided by a Standard C header file.\r
-   For pre-Standard C compilers, here is a version that usually works\r
-   (but watch out!): */\r
-#define offsetof(type, member) OFFSET_OF (type, member)\r
-\r
-//\r
-// Basic types from EFI Application Toolkit required to build Open SSL\r
-//\r
-typedef UINTN          size_t;\r
-typedef INTN           ssize_t;\r
-typedef INT64          off_t;\r
-typedef UINT16         mode_t;\r
-typedef long           time_t;\r
-typedef unsigned long  clock_t;\r
-typedef UINT32         uid_t;\r
-typedef UINT32         gid_t;\r
-typedef UINT32         ino_t;\r
-typedef UINT32         dev_t;\r
-typedef UINT16         nlink_t;\r
-typedef int            pid_t;\r
-typedef void           *DIR;\r
-typedef void           __sighandler_t (int);\r
-typedef UINT8          __uint8_t;\r
-typedef UINT8          sa_family_t;\r
-\r
-//\r
-// Structures from EFI Application Toolkit required to build Open SSL\r
-//\r
-struct tm {\r
-  int   tm_sec;     /* seconds after the minute [0-60] */\r
-  int   tm_min;     /* minutes after the hour [0-59] */\r
-  int   tm_hour;    /* hours since midnight [0-23] */\r
-  int   tm_mday;    /* day of the month [1-31] */\r
-  int   tm_mon;     /* months since January [0-11] */\r
-  int   tm_year;    /* years since 1900 */\r
-  int   tm_wday;    /* days since Sunday [0-6] */\r
-  int   tm_yday;    /* days since January 1 [0-365] */\r
-  int   tm_isdst;   /* Daylight Savings Time flag */\r
-  long  tm_gmtoff;  /* offset from CUT in seconds */\r
-  char  *tm_zone;   /* timezone abbreviation */\r
-};\r
-\r
-struct timeval {\r
-  long tv_sec;      /* time value, in seconds */\r
-  long tv_usec;     /* time value, in microseconds */\r
-};\r
-\r
-struct dirent {\r
-  UINT32  d_fileno;         /* file number of entry */\r
-  UINT16  d_reclen;         /* length of this record */\r
-  UINT8   d_type;           /* file type, see below */\r
-  UINT8   d_namlen;         /* length of string in d_name */\r
-  char    d_name[255 + 1];  /* name must be no longer than this */\r
-};\r
-\r
-struct stat {\r
-  dev_t    st_dev;          /* inode's device */\r
-  ino_t    st_ino;          /* inode's number */\r
-  mode_t   st_mode;         /* inode protection mode */\r
-  nlink_t  st_nlink;        /* number of hard links */\r
-  uid_t    st_uid;          /* user ID of the file's owner */\r
-  gid_t    st_gid;          /* group ID of the file's group */\r
-  dev_t    st_rdev;         /* device type */\r
-  time_t   st_atime;        /* time of last access */\r
-  long     st_atimensec;    /* nsec of last access */\r
-  time_t   st_mtime;        /* time of last data modification */\r
-  long     st_mtimensec;    /* nsec of last data modification */\r
-  time_t   st_ctime;        /* time of last file status change */\r
-  long     st_ctimensec;    /* nsec of last file status change */\r
-  off_t    st_size;         /* file size, in bytes */\r
-  INT64    st_blocks;       /* blocks allocated for file */\r
-  UINT32   st_blksize;      /* optimal blocksize for I/O */\r
-  UINT32   st_flags;        /* user defined flags for file */\r
-  UINT32   st_gen;          /* file generation number */\r
-  INT32    st_lspare;\r
-  INT64    st_qspare[2];\r
-};\r
-\r
-struct sockaddr {\r
-  __uint8_t sa_len;         /* total length */\r
-  sa_family_t sa_family;    /* address family */\r
-  char    sa_data[14];      /* actually longer; address value */\r
-};\r
-\r
-//\r
-// Externs from EFI Application Toolkit required to build Open SSL\r
-//\r
-extern int errno;\r
-\r
-//\r
-// Function prototypes from EFI Application Toolkit required to build Open SSL\r
-//\r
-void           *malloc     (size_t);\r
-void           *realloc    (void *, size_t);\r
-void           free        (void *);\r
-int            isdigit     (int);\r
-int            isspace     (int);\r
-int            tolower     (int);\r
-int            isupper     (int);\r
-int            isxdigit    (int);\r
-int            isalnum     (int);\r
-void           *memcpy     (void *, const void *, size_t);\r
-void           *memset     (void *, int, size_t);\r
-void           *memchr     (const void *, int, size_t);\r
-int            memcmp      (const void *, const void *, size_t);\r
-void           *memmove    (void *, const void *, size_t);\r
-int            strcmp      (const char *, const char *);\r
-int            strncmp     (const char *, const char *, size_t);\r
-char           *strcpy     (char *, const char *);\r
-char           *strncpy    (char *, const char *, size_t);\r
-size_t         strlen      (const char *);\r
-char           *strcat     (char *, const char *);\r
-char           *strchr     (const char *, int);\r
-int            strcasecmp  (const char *, const char *);\r
-int            strncasecmp (const char *, const char *, size_t);\r
-char           *strncpy    (char *, const char *, size_t);\r
-int            strncmp     (const char *, const char *, size_t);\r
-char           *strrchr    (const char *, int);\r
-unsigned long  strtoul     (const char *, char **, int);\r
-long           strtol      (const char *, char **, int);\r
-char           *strerror   (int);\r
-size_t         strspn      (const char *, const char *);\r
-size_t         strcspn     (const char *, const char *);\r
-int            printf      (const char *, ...);\r
-int            sscanf      (const char *, const char *, ...);\r
-int            open        (const char *, int, ...);\r
-int            chmod       (const char *, mode_t);\r
-int            stat        (const char *, struct stat *);\r
-off_t          lseek       (int, off_t, int);\r
-ssize_t        read        (int, void *, size_t);\r
-ssize_t        write       (int, const void *, size_t);\r
-int            close       (int);\r
-FILE           *fopen      (const char *, const char *);\r
-size_t         fread       (void *, size_t, size_t, FILE *);\r
-size_t         fwrite      (const void *, size_t, size_t, FILE *);\r
-char           *fgets      (char *, int, FILE *);\r
-int            fputs       (const char *, FILE *);\r
-int            fprintf     (FILE *, const char *, ...);\r
-int            vfprintf    (FILE *, const char *, VA_LIST);\r
-int            fflush      (FILE *);\r
-int            fclose      (FILE *);\r
-DIR            *opendir    (const char *);\r
-struct dirent  *readdir    (DIR *);\r
-int            closedir    (DIR *);\r
-void           openlog     (const char *, int, int);\r
-void           closelog    (void);\r
-void           syslog      (int, const char *, ...);\r
-time_t         time        (time_t *);\r
-struct tm      *localtime  (const time_t *);\r
-struct tm      *gmtime     (const time_t *);\r
-struct tm      *gmtime_r   (const time_t *, struct tm *);\r
-uid_t          getuid      (void);\r
-uid_t          geteuid     (void);\r
-gid_t          getgid      (void);\r
-gid_t          getegid     (void);\r
-void           qsort       (void *, size_t, size_t, int (*)(const void *, const void *));\r
-char           *getenv     (const char *);\r
-void           exit        (int);\r
-void           abort       (void);\r
-__sighandler_t *signal     (int, __sighandler_t *);\r
-\r
-//\r
-// Global variables from EFI Application Toolkit required to build Open SSL\r
-//\r
-extern FILE  *stderr;\r
-extern FILE  *stdin;\r
-extern FILE  *stdout;\r
-\r
-//\r
-// Macros that directly map functions to BaseLib, BaseMemoryLib, and DebugLib functions\r
-//\r
-#define memcpy(dest,source,count)         CopyMem(dest,source,(UINTN)(count))\r
-#define memset(dest,ch,count)             SetMem(dest,(UINTN)(count),(UINT8)(ch))\r
-#define memchr(buf,ch,count)              ScanMem8(buf,(UINTN)(count),(UINT8)ch)\r
-#define memcmp(buf1,buf2,count)           (int)(CompareMem(buf1,buf2,(UINTN)(count)))\r
-#define memmove(dest,source,count)        CopyMem(dest,source,(UINTN)(count))\r
-#define strncmp(string1,string2,count)    (int)(AsciiStrnCmp(string1,string2,(UINTN)(count)))\r
-#define strcpy(strDest,strSource)         AsciiStrCpyS(strDest,MAX_STRING_SIZE,strSource)\r
-#define strncpy(strDest,strSource,count)  AsciiStrnCpyS(strDest,MAX_STRING_SIZE,strSource,(UINTN)count)\r
-#define strlen(str)                       (size_t)(AsciiStrnLenS(str,MAX_STRING_SIZE))\r
-#define strcat(strDest,strSource)         AsciiStrCatS(strDest,MAX_STRING_SIZE,strSource)\r
-#define strchr(str,ch)                    ScanMem8((VOID *)(str),AsciiStrSize(str),(UINT8)ch)\r
-#define abort()                           ASSERT (FALSE)\r
-#define assert(expression)\r
-#define localtime(timer)                  NULL\r
-#define gmtime_r(timer,result)            (result = NULL)\r
-#define atoi(nptr)                        AsciiStrDecimalToUintn(nptr)\r
-#define gettimeofday(tvp,tz)              do { (tvp)->tv_sec = time(NULL); (tvp)->tv_usec = 0; } while (0)\r
-\r
-#endif\r
diff --git a/CryptoPkg/Include/arpa/inet.h b/CryptoPkg/Include/arpa/inet.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
diff --git a/CryptoPkg/Include/dirent.h b/CryptoPkg/Include/dirent.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
diff --git a/CryptoPkg/Include/malloc.h b/CryptoPkg/Include/malloc.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
diff --git a/CryptoPkg/Include/math.h b/CryptoPkg/Include/math.h
deleted file mode 100644 (file)
index a21f554..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OPEN SSL \r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
index 092b3cde1f2f5bb7359d12a0a1e0a4e55cecc350..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
diff --git a/CryptoPkg/Include/netdb.h b/CryptoPkg/Include/netdb.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
diff --git a/CryptoPkg/Include/netinet/in.h b/CryptoPkg/Include/netinet/in.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
diff --git a/CryptoPkg/Include/sgtty.h b/CryptoPkg/Include/sgtty.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
diff --git a/CryptoPkg/Include/signal.h b/CryptoPkg/Include/signal.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
index 8dfc36ffb00cc3d73e780bcb9babb12741d5543d..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,4 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
index 8dfc36ffb00cc3d73e780bcb9babb12741d5543d..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,4 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
diff --git a/CryptoPkg/Include/sys/ioctl.h b/CryptoPkg/Include/sys/ioctl.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
diff --git a/CryptoPkg/Include/sys/param.h b/CryptoPkg/Include/sys/param.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
diff --git a/CryptoPkg/Include/sys/socket.h b/CryptoPkg/Include/sys/socket.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
diff --git a/CryptoPkg/Include/sys/stat.h b/CryptoPkg/Include/sys/stat.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
diff --git a/CryptoPkg/Include/sys/times.h b/CryptoPkg/Include/sys/times.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
index ee07f6bcb51c610e6c79f95bc9d61d3e8802f408..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,5 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
-\r
+#include <CrtLibSupport.h>\r
diff --git a/CryptoPkg/Include/sys/un.h b/CryptoPkg/Include/sys/un.h
deleted file mode 100644 (file)
index ee07f6b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
-\r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
index 8dfc36ffb00cc3d73e780bcb9babb12741d5543d..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,4 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
index 8dfc36ffb00cc3d73e780bcb9babb12741d5543d..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,4 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
index 8dfc36ffb00cc3d73e780bcb9babb12741d5543d..1a8d1c47dee6bf9f635a444f5e19cfb2560d7123 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
-  Include file to support building OpenSSL Crypto Library.\r
+  Include file to support building the third-party cryptographic library.\r
 \r
-Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -12,4 +12,4 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
index 92cc96303869c1d3bc7f5af98b05accfad6712bb..4f9f308a7d85c03fd233cf87883fbd1131f284ab 100644 (file)
@@ -1,7 +1,7 @@
 /** @file  \r
   Internal include file for BaseCryptLib.\r
 \r
-Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/DebugLib.h>\r
 #include <Library/BaseCryptLib.h>\r
 \r
-#include "OpenSslSupport.h"\r
+#include "CrtLibSupport.h"\r
 \r
 #include <openssl/opensslv.h>\r
 \r
index 964545f143cc5e45df4f397f3129a6da95aa21ff..f390e0d4494410f7ee26e66afa8d946e46d274bb 100644 (file)
@@ -2,7 +2,7 @@
   Base Memory Allocation Routines Wrapper for Crypto library over OpenSSL\r
   during PEI & DXE phases.\r
 \r
-Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -13,7 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
+#include <Library/MemoryAllocationLib.h>\r
 \r
 //\r
 // -- Memory-Allocation Routines --\r
index 0a19a69533b76e432047ab51d7ce6c659ec06db7..7f20164999f35496d2968bf17abf73080e0cfa8a 100644 (file)
@@ -12,7 +12,7 @@
   5)  DhGenerateParameter\r
   6)  DhGenerateKey\r
 \r
-Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
 \r
 //\r
 // -- Time Management Routines --\r
@@ -38,4 +38,4 @@ time_t time (time_t *timer)
 struct tm * gmtime (const time_t *timer)\r
 {\r
   return NULL;\r
-}
\ No newline at end of file
+}\r
index a2386bc0730c26ad4c0a78d3a39b8900c8e67dc5..20c96563d270389d9133707d5ac8ad32a29df581 100644 (file)
@@ -2,7 +2,7 @@
   C Run-Time Libraries (CRT) Wrapper Implementation for OpenSSL-based\r
   Cryptographic Library.\r
 \r
-Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
 \r
 int errno = 0;\r
 \r
@@ -136,6 +136,30 @@ char *strrchr (const char *str, int c)
   }\r
 }\r
 \r
+/* Compare first n bytes of string s1 with string s2, ignoring case */\r
+int strncasecmp (const char *s1, const char *s2, size_t n)\r
+{\r
+  int Val;\r
+\r
+  ASSERT(s1 != NULL);\r
+  ASSERT(s2 != NULL);\r
+\r
+  if (n != 0) {\r
+    do {\r
+      Val = tolower(*s1) - tolower(*s2);\r
+      if (Val != 0) {\r
+        return Val;\r
+      }\r
+      ++s1;\r
+      ++s2;\r
+      if (*s1 == '\0') {\r
+        break;\r
+      }\r
+    } while (--n != 0);\r
+  }\r
+  return 0;\r
+}\r
+\r
 /* Read formatted data from a string */\r
 int sscanf (const char *buffer, const char *format, ...)\r
 {\r
@@ -146,6 +170,70 @@ int sscanf (const char *buffer, const char *format, ...)
   return 0;\r
 }\r
 \r
+/* Maps errnum to an error-message string */\r
+char * strerror (int errnum)\r
+{\r
+  return NULL;\r
+}\r
+\r
+/* Computes the length of the maximum initial segment of the string pointed to by s1\r
+   which consists entirely of characters from the string pointed to by s2. */\r
+size_t strspn (const char *s1 , const char *s2)\r
+{\r
+  UINT8   Map[32];\r
+  UINT32  Index;\r
+  size_t  Count;\r
+\r
+  for (Index = 0; Index < 32; Index++) {\r
+    Map[Index] = 0;\r
+  }\r
+\r
+  while (*s2) {\r
+    Map[*s2 >> 3] |= (1 << (*s2 & 7));\r
+    s2++;\r
+  }\r
+\r
+  if (*s1) {\r
+    Count = 0;\r
+    while (Map[*s1 >> 3] & (1 << (*s1 & 7))) {\r
+      Count++;\r
+      s1++;\r
+    }\r
+\r
+    return Count;\r
+  }\r
+\r
+  return 0;\r
+}\r
+\r
+/* Computes the length of the maximum initial segment of the string pointed to by s1\r
+   which consists entirely of characters not from the string pointed to by s2. */\r
+size_t strcspn (const char *s1, const char *s2)\r
+{\r
+  UINT8  Map[32];\r
+  UINT32 Index;\r
+  size_t Count;\r
+\r
+  for (Index = 0; Index < 32; Index++) {\r
+    Map[Index] = 0;\r
+  }\r
+\r
+  while (*s2) {\r
+    Map[*s2 >> 3] |= (1 << (*s2 & 7));\r
+    s2++;\r
+  }\r
+\r
+  Map[0] |= 1;\r
+\r
+  Count   = 0;\r
+  while (!(Map[*s1 >> 3] & (1 << (*s1 & 7)))) {\r
+    Count ++;\r
+    s1++;\r
+  }\r
+\r
+  return Count;\r
+}\r
+\r
 //\r
 // -- Character Classification Routines --\r
 //\r
@@ -277,12 +365,6 @@ char *getenv (const char *varname)
 // -- Stream I/O Routines --\r
 //\r
 \r
-/* Write formatted output using a pointer to a list of arguments */\r
-int vfprintf (FILE *stream, const char *format, VA_LIST arg)\r
-{\r
-  return 0;\r
-}\r
-\r
 /* Write data to a stream */\r
 size_t fwrite (const void *buffer, size_t size, size_t count, FILE *stream)\r
 {\r
@@ -303,36 +385,6 @@ int BIO_snprintf(char *buf, size_t n, const char *format, ...)
   return 0;\r
 }\r
 \r
-void *UI_OpenSSL(void)\r
-{\r
-  return NULL;\r
-}\r
-\r
-int X509_load_cert_file (VOID *ctx, const char *file, int type)\r
-{\r
-  return 0;\r
-}\r
-\r
-int X509_load_crl_file (VOID *ctx, const char *file, int type)\r
-{\r
-  return 0;\r
-}\r
-\r
-int chmod (const char *c, mode_t m)\r
-{\r
-  return -1;\r
-}\r
-\r
-int close (int f)\r
-{\r
-  return -1;\r
-}\r
-\r
-void closelog (void)\r
-{\r
-\r
-}\r
-\r
 #ifdef __GNUC__\r
 \r
 typedef\r
@@ -341,7 +393,6 @@ VOID
   VOID\r
   ) __attribute__((__noreturn__));\r
 \r
-\r
 STATIC\r
 VOID\r
 EFIAPI\r
@@ -351,8 +402,7 @@ NopFunction (
 {\r
 }\r
 \r
-\r
-void exit (int e)\r
+void abort (void)\r
 {\r
   NoReturnFuncPtr NoReturnFunc;\r
 \r
@@ -363,8 +413,9 @@ void exit (int e)
 \r
 #else\r
 \r
-void exit (int e)\r
+void abort (void)\r
 {\r
+  // Do nothing\r
 }\r
 \r
 #endif\r
@@ -384,16 +435,6 @@ size_t fread (void *b, size_t c, size_t i, FILE *f)
   return 0;\r
 }\r
 \r
-int fputs (const char *s, FILE *f)\r
-{\r
-  return 0;\r
-}\r
-\r
-int fprintf (FILE *f, const char *s, ...)\r
-{\r
-  return 0;\r
-}\r
-\r
 uid_t getuid (void)\r
 {\r
   return 0;\r
@@ -414,46 +455,6 @@ gid_t getegid (void)
   return 0;\r
 }\r
 \r
-off_t lseek (int a, off_t o, int d)\r
-{\r
-  return 0;\r
-}\r
-\r
-void openlog (const char *c, int a, int b)\r
-{\r
-\r
-}\r
-\r
-ssize_t read (int f, void *b, size_t c)\r
-{\r
-  return 0;\r
-}\r
-\r
-int stat (const char *c, struct stat *s)\r
-{\r
-  return -1;\r
-}\r
-\r
-int strcasecmp (const char *c, const char *s)\r
-{\r
-  return 0;\r
-}\r
-\r
-int strncasecmp (const char *c, const char *s, size_t l)\r
-{\r
-  return 0;\r
-}\r
-\r
-void syslog (int a, const char *c, ...)\r
-{\r
-\r
-}\r
-\r
-ssize_t write (int f, const void *b, size_t l)\r
-{\r
-  return 0;\r
-}\r
-\r
 int printf (char const *fmt, ...)\r
 {\r
   return 0;\r
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/HelperWrapper.c b/CryptoPkg/Library/BaseCryptLib/SysCall/HelperWrapper.c
deleted file mode 100644 (file)
index bf4399c..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/** @file\r
-  Wrapper Implementation of Helper Routines produced by the C Compiler\r
-  for the OpenSSL-based Cryptographic Library.\r
-\r
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#include <OpenSslSupport.h>\r
-\r
-//---------------------------------------------------------\r
-// Helper Routines Wrapper\r
-//---------------------------------------------------------\r
-\r
-/* Divides a 64-bit signed value with a 64-bit signed value and returns\r
-   a 64-bit signed quotient and reminder */\r
-void _aulldvrm ()\r
-{\r
-  //\r
-  // Null _aulldvrm() Math function implementation to satisfy the linker, since\r
-  // there is no direct functionality logic dependency in present UEFI cases.\r
-  //\r
-  return;\r
-}\r
-\r
-\r
-/* Converts a scalar double-precision floating point value to a 32-bit integer */\r
-long _ftol2_sse (double dblSource)\r
-{\r
-  //\r
-  // OpenSSL uses this function due to using floating-point inside it.\r
-  // It is only present in 32-bit versions of the compiler.\r
-  // Null _ftol2_sse() function implementation to satisfy the linker, since\r
-  // there is no direct functionality logic dependency in present UEFI cases.\r
-  //\r
-  return 0;\r
-}\r
-\r
-/* Converts a scalar double-precision floating point value to a 32-bit integer */\r
-long _ftol2 (double dblSource)\r
-{\r
-  //\r
-  // Null _ftol2() function implementation to satisfy the linker, since\r
-  // there is no direct functionality logic dependency in present UEFI cases.\r
-  //\r
-  return 0;\r
-}\r
index feaa37145e99cb7eb6e4e6e66978eaf2af13ba69..463f2bf8557bfb0036bc0467d9f9b55b24cd7684 100644 (file)
@@ -13,9 +13,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiRuntimeLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
 #include <Guid/EventGroup.h>\r
 \r
 //----------------------------------------------------------------\r
index 93e487dcefc3968e7c5a72b1692ae2cc8b45c1a8..581b8fb02809f2bc45f9cf3c65d503d258508c0d 100644 (file)
@@ -2,7 +2,7 @@
   C Run-Time Libraries (CRT) Time Management Routines Wrapper Implementation\r
   for OpenSSL-based Cryptographic Library (used in DXE & RUNTIME).\r
 \r
-Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 \r
 #include <Uefi.h>\r
-#include <OpenSslSupport.h>\r
+#include <CrtLibSupport.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 \r
 //\r