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

Implement DEPRECATED RSA_pkey_ctx_ctrl #1575

Merged
merged 3 commits into from
May 3, 2024

Conversation

WillChilds-Klein
Copy link
Contributor

@WillChilds-Klein WillChilds-Klein commented May 3, 2024

Notes

AWS-LC and OpenSSL 3 implement various RSA control functions
as concrete functions, but OpenSSL 1.1.1 implements them as macros
calling RSA_pkey_ctx_ctrl. This commit provides an implementation of
RSA_pkey_ctx_ctrl directly cribbed from OpenSSL 1.1.1, and
identical to OpenSSL 3's implementation today.

Tests

  • CI

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

[AWS-LC][3] and [OpenSSL 3][4] implement various RSA control functions
as concrete functions, but OpenSSL 1.1.1 [implements][1] them as macros
calling `RSA_pkey_ctx_ctrl`. This commit provides an implementation of
`RSA_pkey_ctx_ctrl` [directly cribbed][1] from OpenSSL 1.1.1, and
identical to OpenSSL 3's implementation [today][2].

[1]: openssl/openssl@e5e04ee
[2]: https://github.com/openssl/openssl/blob/067fbc01b9e867b31c71091d62f0f9012dc9e41a/crypto/rsa/rsa_lib.c#L734
[3]: https://github.com/aws/aws-lc/blob/2c03113451b5f84f61c8ed283b289a6db87b3397/include/openssl/evp.h#L796
[4]: https://github.com/openssl/openssl/blob/067fbc01b9e867b31c71091d62f0f9012dc9e41a/include/openssl/rsa.h#L125
@WillChilds-Klein WillChilds-Klein marked this pull request as ready for review May 3, 2024 14:34
@WillChilds-Klein WillChilds-Klein requested a review from a team as a code owner May 3, 2024 14:34
torben-hansen
torben-hansen previously approved these changes May 3, 2024
include/openssl/rsa.h Outdated Show resolved Hide resolved
include/openssl/rsa.h Outdated Show resolved Hide resolved
crypto/fipsmodule/rsa/rsa.c Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 77.45%. Comparing base (2c03113) to head (9fb1b2f).

Files Patch % Lines
crypto/fipsmodule/rsa/rsa.c 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1575      +/-   ##
==========================================
+ Coverage   77.43%   77.45%   +0.02%     
==========================================
  Files         435      435              
  Lines       71820    71827       +7     
==========================================
+ Hits        55615    55635      +20     
+ Misses      16205    16192      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@WillChilds-Klein WillChilds-Klein enabled auto-merge (squash) May 3, 2024 19:28
@WillChilds-Klein WillChilds-Klein merged commit 33637ff into aws:main May 3, 2024
75 of 78 checks passed
@WillChilds-Klein WillChilds-Klein deleted the RSA_pkey_ctx_ctrl branch May 3, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants