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

crypto: Fix compilation with no ChaCha20 #27

Closed
wants to merge 1 commit into from
Closed

crypto: Fix compilation with no ChaCha20 #27

wants to merge 1 commit into from

Conversation

neheb
Copy link
Contributor

@neheb neheb commented May 10, 2019

ChaCha20 can be compile time disabled. Check for it.

@knekritz
Copy link
Contributor

Can you create a FIZZ_HAS_CHACHA define or similar and based the other checks (like

#if FOLLY_OPENSSL_IS_110
) on the same define? As-is this PR will result in the default configuration advertising support for ciphers which don't actually work.

@neheb
Copy link
Contributor Author

neheb commented May 13, 2019

This looks like it would be better suited for inclusion in folly's portability header.

On the other hand, a git grep of the code base also shows three of these:

#if FOLLY_OPENSSL_IS_110 && !defined(OPENSSL_NO_OCB)

facebook-github-bot pushed a commit to facebook/folly that referenced this pull request Jun 1, 2019
Summary:
This can be used to check if ChaCha20 is available for use.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

related: facebookincubator/fizz#27
Pull Request resolved: #1146

Reviewed By: knekritz

Differential Revision: D15583706

Pulled By: yfeldblum

fbshipit-source-id: 1195d623098018992811cd7d6cef72e2366ace19
ChaCha20 can be compile time disabled. Check for it.

Using folly's define for this.
@neheb
Copy link
Contributor Author

neheb commented Jun 1, 2019

I pushed a new version. I checked every place in the fizz source that checks for ChaCha20 compatibility and replaced it with the new define.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knekritz has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@knekritz merged this pull request in 9d84ab9.

@neheb neheb deleted the patch-1 branch June 4, 2019 17:47
facebook-github-bot pushed a commit that referenced this pull request Jul 16, 2020
Summary:
Pull Request resolved: facebook/sapling#27

Pull Request resolved: facebookexperimental/rust-shed#9

Original diffs: D22417488 (1adf0d7), D22528869 (9176fae)

Reviewed By: markbt

Differential Revision: D22571972

fbshipit-source-id: c6f013565680a757b642dd79e647207fce3351ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants