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

improved check for OpenSSL::KDF #8

Merged
merged 6 commits into from
Jul 25, 2019
Merged

Conversation

escoffon
Copy link
Contributor

Some openssl distributions (e.g. the openssl library on macOS Mojave) don't export the OpenSSL::KDF symbol

Some openssl distributions (*e.g.* the openssl libray on macOS Mojave) don't export the OpenSSL::KDF symbol
@escoffon
Copy link
Contributor Author

It occurred to me that it should be possible to implement hasKDF as a class method instead, so that the constant check is done just once, rather than for each new instance of KeyGenerator. I can investigate and push a different PR if you'd like me to.

@escoffon
Copy link
Contributor Author

And this PR fixes #9

@ankane
Copy link
Owner

ankane commented Jul 24, 2019

Hey @escoffon, thanks for another PR 👍 I think this can be simplified to

if defined?(OpenSSL::KDF.hkdf)
  # ....

@escoffon
Copy link
Contributor Author

Ah yes of course. I really shouldn't write code late at night. I pushed a new commit on the PR. It's indirectly tested through my document tests.

@ankane ankane merged commit 2e2b46f into ankane:master Jul 25, 2019
@ankane
Copy link
Owner

ankane commented Jul 25, 2019

Thanks!

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

2 participants