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

Resolve upcoming OpenSSL Ruby library deprecation of algorithm constants #1860

Merged
merged 1 commit into from Jun 4, 2020

Conversation

tas50
Copy link
Contributor

@tas50 tas50 commented May 22, 2020

Description

Lint/DeprecatedOpenSSLConstant:
Use OpenSSL::Digest.hexdigest('MD5', key_in_der_format) instead of
OpenSSL::Digest::MD5.hexdigest(key_in_der_format).

Rubocop has a new cop that detects an upcoming deprecation to the OpenSSL gem that's built into Ruby.

The previous constant will cause failures in Ruby 3.

Related Issue(s)

Closes #1859

@robbkidd
Copy link
Contributor

👍 This change is covered by the specs around the expected output of the method using the digest.

@tas50 Do you have any more details or links to the change coming in Ruby 3? I'm curious if we'll see issues elsewhere in this codebase.

> Lint/DeprecatedOpenSSLConstant:
>   Use OpenSSL::Digest.hexdigest('MD5', key_in_der_format) instead of
>   OpenSSL::Digest::MD5.hexdigest(key_in_der_format).

Rubocop has a new cop[1] that detects an upcoming deprecation to the
OpenSSL gem[2] that's built into Ruby.

[1] rubocop/rubocop#7950
[2] ruby/openssl#366

The previous constant will cause failures in Ruby 3.

Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Robb Kidd <rkidd@chef.io>
@robbkidd
Copy link
Contributor

robbkidd commented Jun 1, 2020

We might have some issues with our FIPS algorithm shell game then, too.

@robbkidd robbkidd self-assigned this Jun 1, 2020
@robbkidd robbkidd changed the title Resolve upcoming openssl deprecation Resolve upcoming OpenSSL Ruby library deprecation of algorithm constants Jun 4, 2020
Copy link
Contributor

@robbkidd robbkidd left a comment

Choose a reason for hiding this comment

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

OK

@robbkidd robbkidd merged commit f2b780f into master Jun 4, 2020
@chef-expeditor chef-expeditor bot deleted the openssl branch June 4, 2020 20:18
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.

OpenSSL usage deprecation warnings from Rubocop
2 participants