-
Notifications
You must be signed in to change notification settings - Fork 34
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 3.0 Support #9
Comments
@sukeerthiadiga Are you seeing any specific issues with openssl 3.0? |
Ok, I found exact issue. With following patch I have tests passing with ruby 3.2 and openssl gem 3.2 (required to get
diff --git a/lib/ntlm/util.rb b/lib/ntlm/util.rb
index 4eaeac2..77fdc7c 100644
--- a/lib/ntlm/util.rb
+++ b/lib/ntlm/util.rb
@@ -2,6 +2,10 @@
require 'openssl'
+if defined?(OpenSSL::Provider)
+ OpenSSL::Provider.load('legacy')
+end
+
module NTLM
module Util
@@ -54,7 +58,7 @@ module NTLM
keys = create_des_keys(key[0, key_length])
result = ''
- cipher = OpenSSL::Cipher::DES.new
+ cipher = OpenSSL::Cipher::DES.new(:ecb)
keys.each do |k|
cipher.encrypt
cipher.key = k
diff --git a/ruby-ntlm.gemspec b/ruby-ntlm.gemspec
index 4d41fc7..4c2f42d 100644
--- a/ruby-ntlm.gemspec
+++ b/ruby-ntlm.gemspec
@@ -18,7 +18,8 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
- spec.add_development_dependency "bundler", "~> 1.5"
+ spec.add_dependency "openssl", "~> 3.2.0"
+
spec.add_development_dependency "rake"
spec.add_development_dependency "test-unit"
end
|
I do have a branch for this there master...bak1an:ruby-ntlm:openssl3 @macks Would you be interested in a PR to properly release this? |
Having openssl 3.2 gem as a dependency will require limiting minimal ruby version to 2.7 (and will ideally mean some code cleanup here) but it seems fine to me. Older ruby version will not be affected by openssl 3 anyway so they can just use older gem version. |
https://github.com/bak1an/net-smtp-auth_ntlm Made |
No description provided.
The text was updated successfully, but these errors were encountered: