On 07/27/15 22:13, David Woodhouse wrote:
> To be used with http://git.infradead.org/users/dwmw2/openssl.git/
> checked out in CryptoPkg/Library/OpensslLib/openssl/ and on top of my
> other EDK2 patches (http://git.infradead.org/users/dwmw2/edk2.git/).
> 
> Automatically generate the file list from running 'make files', and also
> configure OpenSSL normally using its Configure script (with all the
> no-xxx arguments that we require).
> 
> We only need to do this when updating OpenSSL. We can copy the resulting
> opensslconf.h into our own tree.
> 
> It's not clear why we ever had OPENSSL_EXFLAGS when it's used alongside
> OPENSSL_FLAGS in all cases. Kill it. And remove a whole bunch of stuff
> from OPENSSL_FLAGS which is already in opensslconf.h now.
> ---
> Actually, aren't the only things in OPENSSL_FLAGS now MSFT-specific anyway?
> 
>  CryptoPkg/CryptoPkg.dec                       |   2 +
>  CryptoPkg/Include/OpenSslSupport.h            |   5 +
>  CryptoPkg/Library/OpensslLib/OpensslLib.inf   | 481 
> +++-----------------------
>  CryptoPkg/Library/OpensslLib/process_files.sh |  38 ++
>  4 files changed, 90 insertions(+), 436 deletions(-)
>  create mode 100755 CryptoPkg/Library/OpensslLib/process_files.sh
> 
> diff --git a/CryptoPkg/CryptoPkg.dec b/CryptoPkg/CryptoPkg.dec
> index 6f8bf21..8cb6d46 100644
> --- a/CryptoPkg/CryptoPkg.dec
> +++ b/CryptoPkg/CryptoPkg.dec
> @@ -24,6 +24,8 @@
>  
>  [Includes]
>    Include
> +  Library/OpensslLib/openssl/include
> +  Library/OpensslLib/openssl/crypto/include
>  
>  [LibraryClasses]
>    ##  @libraryclass  Provides basic library functions for cryptographic 
> primitives.
> diff --git a/CryptoPkg/Include/OpenSslSupport.h 
> b/CryptoPkg/Include/OpenSslSupport.h
> index 86cc2b2..93ab0a4 100644
> --- a/CryptoPkg/Include/OpenSslSupport.h
> +++ b/CryptoPkg/Include/OpenSslSupport.h
> @@ -27,6 +27,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
> EXPRESS OR IMPLIED.
>  #define OPENSSL_SYSNAME_UEFI
>  #endif
>  
> +#define OPENSSL_SMALL_FOOTPRINT
> +#define L_ENDIAN
> +
>  //
>  // OpenSSL relies on explicit configuration for word size in crypto/bn,
>  // but we want to be automatically inferred from the target. So define
> @@ -272,5 +275,7 @@ extern FILE  *stdout;
>  #define localtime(timer)                  NULL
>  #define gmtime_r(timer,result)            (result = NULL)
>  #define atoi(nptr)                        AsciiStrDecimalToUintn(nptr)
> +#define gettimeofday(tvp,tz)              do { (tvp)->tv_sec = time(NULL); 
> (tvp)->tv_usec = 0; } \
> +                                             while(0)

I'd feel somewhat safer if tvp was evaluated only once, something like:

do {
  struct timeval *tv = (tvp);

  tv->tv_sec = time(NULL);
  tv->tv_usec = 0;
} while (0)

but, this is really minor.

In any case, I think you'll need the CryptoPkg maintainer's attention
(see Maintainers.txt). It's best to Cc maintainers directly on patches.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to