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

[XrdCrypto] Generate DH parameters on first call to XrdCryptosslCipher #1595

Merged
merged 3 commits into from
Jan 25, 2022

Conversation

jthiltges
Copy link
Contributor

This should address the increased load issue discussed in #1556. I've very lightly tested this change in production, and it seems OK. I'm planning more thorough tests tomorrow.

We'll also need to update openssl3/XrdCryptosslCipher.cc to match, but it should be fairly straightforward.

@abh3
Copy link
Member

abh3 commented Jan 19, 2022

Looks good, thanks JT. Let me know when it passes your tests and I will merge it.

@ellert
Copy link
Contributor

ellert commented Jan 19, 2022

Please note that this PR updates a file that exists in both an old pre openssl 3 version

src/XrdCrypto/XrdCryptosslCipher.cc

and a new openssl 3 compatible version

src/XrdCrypto/openssl3/XrdCryptosslCipher.cc

Until the new code (that also works on older openssl versions) replaces the old code, all changes must be done to both versions to keep them in sync.

@abh3
Copy link
Member

abh3 commented Jan 19, 2022

Yes, we are aware of this. We are not merging this until a) final tests have been performed, and b) the openssl3 update is included in the pr. This is just a preliminary pr.

@jthiltges
Copy link
Contributor Author

At Nebraska, we've been running with this patch in production on our local redirector for about 27 hours now. Redirector CPU use looks OK, CMS ETF and HammerCloud look OK, and we haven't received reports of issues.

Since things look promising, I'll look at getting the equivalent openssl3 changes into this PR. Though at present, we don't have a suitable environment for testing.

@abh3
Copy link
Member

abh3 commented Jan 20, 2022

Sounds good. I think we can manage verifying the SSL3 part with our Ubuntu collaborators.

- Move DH parameter generation inside server scope
    - Avoid overhead of generating DH parameters on client
- Remove DH_check() call on server side
    - Adds overhead, and the server-generated key should already be safe
- Include cassert instead of assert.h
@jthiltges
Copy link
Contributor Author

This adds openssl3 code that should be equivalent to the pre-openssl3 code. I'd greatly appreciate feedback from @ellert.

It also adds a bit of cleanup. Time permitting, I'll put it into production at Nebraska tomorrow.

@abh3
Copy link
Member

abh3 commented Jan 25, 2022

@ellert Could you check if the openssl3 changes are not problematic? We really need to push this out ASAP.

@simonmichal
Copy link
Contributor

@abh3 : if the PR is ready to be merged and @ellert don't have time to have a look at it, then please go ahead with the merge and once done I will port the changes to openssl3

@xrootd-dev
Copy link

xrootd-dev commented Jan 25, 2022 via email

@abh3 abh3 merged commit 8c38b20 into xrootd:master Jan 25, 2022
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.

None yet

5 participants