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

OpenSSL usage deprecation warnings from Rubocop #501

Open
tas50 opened this issue May 15, 2020 · 0 comments
Open

OpenSSL usage deprecation warnings from Rubocop #501

tas50 opened this issue May 15, 2020 · 0 comments
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@tas50
Copy link
Contributor

tas50 commented May 15, 2020

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

The openssl introducing the deprecation:
ruby/openssl#366

The new rubocop rule currently only in master:
rubocop/rubocop#7950

/Users/tsmith/dev/work/knife-azure/lib/azure/service_management/certificate.rb:88:20: W: Lint/DeprecatedOpenSSLConstant: Use OpenSSL::Digest.new('SHA256') instead of OpenSSL::Digest::SHA256.new.
      ca.sign(key, OpenSSL::Digest::SHA256.new)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/tsmith/dev/work/knife-azure/lib/azure/service_management/certificate.rb:90:22: W: Lint/DeprecatedOpenSSLConstant: Use OpenSSL::Digest.new('SHA1', ca.to_der) instead of OpenSSL::Digest::SHA1.new(ca.to_der).
      @fingerprint = OpenSSL::Digest::SHA1.new(ca.to_der)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/tsmith/dev/work/knife-azure/lib/azure/service_management/certificate.rb:219:26: W: Lint/DeprecatedOpenSSLConstant: Use OpenSSL::Digest.new('SHA1') instead of OpenSSL::Digest::SHA1.new.
      cert.sign(rsa_key, OpenSSL::Digest::SHA1.new)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/tsmith/dev/work/knife-azure/lib/azure/service_management/certificate.rb:220:21: W: Lint/DeprecatedOpenSSLConstant: Use OpenSSL::Digest.new('SHA1', cert.to_der) instead of OpenSSL::Digest::SHA1.new(cert.to_der).
      @thumbprint = OpenSSL::Digest::SHA1.new(cert.to_der)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/tsmith/dev/work/knife-windows/lib/chef/knife/windows_cert_generate.rb:101:28: W: Lint/DeprecatedOpenSSLConstant: Use OpenSSL::Digest.new('SHA1') instead of OpenSSL::Digest::SHA1.new.
        cert.sign(rsa_key, OpenSSL::Digest::SHA1.new)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^
/Users/tsmith/dev/work/knife-windows/lib/chef/knife/windows_cert_generate.rb:102:23: W: Lint/DeprecatedOpenSSLConstant: Use OpenSSL::Digest.new('SHA1', cert.to_der) instead of OpenSSL::Digest::SHA1.new(cert.to_der).
        @thumbprint = OpenSSL::Digest::SHA1.new(cert.to_der)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@tas50 tas50 added Type: Bug Does not work as expected. Status: Untriaged An issue that has yet to be triaged. labels May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

1 participant