Skip to content

Commit

Permalink
CryptoPkg: Upgrade OpenSSL to 1.1.1d
Browse files Browse the repository at this point in the history
Upgrade openssl from 1.1.1b to 1.1.1d.
Something needs to be noticed is that, there is a bug existing in the
released 1_1_1d version(894da2f),
which causes build failure. So we switch the code base to a usable
version, which is 2 commits later than the stable tag.
Now we use the version c3656cc.
This log is to fix the build failure.
https://bugzilla.tianocore.org/show_bug.cgi?id=2226

Besides, the absense of "DSO_NONE" in dso_conf.h causes build failure
in OvmfPkg. So update process_files.pl to generate information from
"crypto/include/internal/dso_conf.h.in".

shm.h and utsname.h are added to avoid GCC build failure.

Cc: Jian J Wang <[email protected]>
Cc: Xiaoyu Lu <[email protected]>
Cc: Liming Gao <[email protected]>
Signed-off-by: Shenglei Zhang <[email protected]>
Reviewed-by: Jian J Wang <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Tested-by: Laszlo Ersek <[email protected]>
  • Loading branch information
shenglei10 authored and Jian J Wang committed Nov 5, 2019
1 parent fe3ca5f commit 1bcc65b
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 3 deletions.
16 changes: 16 additions & 0 deletions CryptoPkg/Library/Include/internal/dso_conf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* WARNING: do not edit! */
/* Generated from crypto/include/internal/dso_conf.h.in */
/*
* Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/

#ifndef HEADER_DSO_CONF_H
# define HEADER_DSO_CONF_H
# define DSO_NONE
# define DSO_EXTENSION ".so"
#endif
9 changes: 9 additions & 0 deletions CryptoPkg/Library/Include/sys/shm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @file
Include file to support building the third-party cryptographic library.
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#include <CrtLibSupport.h>
9 changes: 9 additions & 0 deletions CryptoPkg/Library/Include/sys/utsname.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @file
Include file to support building the third-party cryptographic library.
Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#include <CrtLibSupport.h>
2 changes: 1 addition & 1 deletion CryptoPkg/Library/OpensslLib/openssl
Submodule openssl updated 443 files
17 changes: 15 additions & 2 deletions CryptoPkg/Library/OpensslLib/process_files.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This script runs the OpenSSL Configure script, then processes the
# resulting file list into our local OpensslLib[Crypto].inf and also
# takes a copy of opensslconf.h.
# takes copies of opensslconf.h and dso_conf.h.
#
# This only needs to be done once by a developer when updating to a
# new version of OpenSSL (or changing options, etc.). Normal users
Expand Down Expand Up @@ -106,6 +106,14 @@ BEGIN
) == 0 ||
die "Failed to generate opensslconf.h!\n";

# Generate dso_conf.h per config data
system(
"perl -I. -Mconfigdata util/dofile.pl " .
"crypto/include/internal/dso_conf.h.in " .
"> include/internal/dso_conf.h"
) == 0 ||
die "Failed to generate dso_conf.h!\n";

chdir($basedir) ||
die "Cannot change to base directory \"" . $basedir . "\"";

Expand Down Expand Up @@ -249,12 +257,17 @@ BEGIN
print "Done!";

#
# Copy opensslconf.h generated from OpenSSL Configuration
# Copy opensslconf.h and dso_conf.h generated from OpenSSL Configuration
#
print "\n--> Duplicating opensslconf.h into Include/openssl ... ";
copy($OPENSSL_PATH . "/include/openssl/opensslconf.h",
$OPENSSL_PATH . "/../../Include/openssl/") ||
die "Cannot copy opensslconf.h!";
print "Done!";
print "\n--> Duplicating dso_conf.h into Include/internal ... ";
copy($OPENSSL_PATH . "/include/internal/dso_conf.h",
$OPENSSL_PATH . "/../../Include/internal/") ||
die "Cannot copy dso_conf.h!";
print "Done!\n";

print "\nProcessing Files Done!\n";
Expand Down

0 comments on commit 1bcc65b

Please sign in to comment.