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

Use new RSA key creation APIs when available #1133

Merged
merged 1 commit into from
May 4, 2023

Conversation

davidben
Copy link
Contributor

@davidben davidben commented May 3, 2023

We're looking to make the RSA struct in BoringSSL opaque, to unblock a host of improvements around that type. As part of that, we'll need to fix existing callers touching the struct, including Conscrypt.

In principle, OpenSSL already had APIs RSA_set0_* for this, but they are tedious to use. They also don't allow one to make an RSA key without e, but Conscrypt needs to support this. (Unless we can guess e based on n and d because it's almost certainly 3 or 65537.) They also do a weird deferred initialization thing that causes us some problems in BoringSSL.

In an attempt to fix this, we've added new APIs in https://boringssl-review.googlesource.com/c/boringssl/+/59386, including some specifically for Conscrypt's use case.

We're looking to make the RSA struct in BoringSSL opaque, to unblock a
host of improvements around that type. As part of that, we'll need to
fix existing callers touching the struct, including Conscrypt.

In principle, OpenSSL already had APIs RSA_set0_* for this, but they are
tedious to use. They also don't allow one to make an RSA key without e,
but Conscrypt needs to support this. (Unless we can guess e based on n
and d because it's almost certainly 3 or 65537.) They also do a weird
deferred initialization thing that causes us some problems in BoringSSL.

In an attempt to fix this, we've added new APIs in
https://boringssl-review.googlesource.com/c/boringssl/+/59386, including
some specifically for Conscrypt's use case.
@davidben davidben requested a review from prbprbprb May 3, 2023 20:07
@prbprbprb prbprbprb merged commit 4e2b860 into google:master May 4, 2023
davidben added a commit to davidben/conscrypt that referenced this pull request May 5, 2023
This fixes the test failures introduced by
google#1133. Not sure why the issue
manifested the way it did, but this seems to fix it.
prbprbprb pushed a commit that referenced this pull request May 5, 2023
This fixes the test failures introduced by
#1133. Not sure why the issue
manifested the way it did, but this seems to fix it.
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.

2 participants