Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CryptoPkg updates for openssl 3.0 #2766

Merged
merged 8 commits into from
Apr 12, 2022
Merged

CryptoPkg updates for openssl 3.0 #2766

merged 8 commits into from
Apr 12, 2022

Conversation

jyao1
Copy link
Contributor

@jyao1 jyao1 commented Apr 12, 2022

First batch of patches which update CrtLibSupport so it has everything
needed to build openssl3. Also a testcase update for openssl3.

This does not update the openssl submodule, that'll happen in a
followup patch series.

v3:

  • move strcpy() from .h to .c file.
  • pick up review tags
    v2:
  • rebase to latest master.
  • add codestyle exception for fcntl.h.

Gerd Hoffmann (8):
CryptoPkg/CrtLibSupport: add fcntl.h
CryptoPkg/CrtLibSupport: add strstr()
CryptoPkg/CrtLibSupport: add INT_MIN
CryptoPkg/CrtLibSupport: add UINT_MAX
CryptoPkg/CrtLibSupport: add MODULESDIR
CryptoPkg/CrtLibSupport: add off_t
CryptoPkg/CrtLibSupport: fix strcpy
CryptoPkg/UnitTest: fix DH testcase

CryptoPkg/Library/Include/CrtLibSupport.h | 12 +++++++++++-
CryptoPkg/Library/Include/fcntl.h | 9 +++++++++
CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c | 10 ++++++++++
.../Test/UnitTest/Library/BaseCryptLib/DhTests.c | 6 +++---
CryptoPkg/CryptoPkg.ci.yaml | 1 +
5 files changed, 34 insertions(+), 4 deletions(-)
create mode 100644 CryptoPkg/Library/Include/fcntl.h

Add fcntl.h header file.
Will be needed by openssl 3.0.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Add #define for strstr().
Will be needed by openssl 3.0.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Add #define for INT_MIN.
Will be needed by openssl 3.0.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Add define for UINT_MAX.
Will be needed by openssl 3.0.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Add dummy MODULESDIR #define
Will be needed by openssl 3.0.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Add typedef for off_t.
Will be needed by openssl 3.0.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
strcpy() returns a pointer to the destination string, AsciiStrCpyS()
does not.  So a simple #define does not work.  Create a function
instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
openssl 3.0 wants at least 512 bytes, otherwise it throws an error:

error:0280007E:Diffie-Hellman routines::modulus too small

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
@jyao1 jyao1 added the push Auto push patch series in PR if all checks pass label Apr 12, 2022
@mergify mergify bot merged commit f5508a9 into tianocore:master Apr 12, 2022
@jyao1 jyao1 deleted the patch branch April 12, 2022 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants