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

Tests fails on Ruby 3/OpenSSL 3 #50

Closed
paulvt opened this issue Apr 28, 2022 · 0 comments · Fixed by #51
Closed

Tests fails on Ruby 3/OpenSSL 3 #50

paulvt opened this issue Apr 28, 2022 · 0 comments · Fixed by #51

Comments

@paulvt
Copy link
Contributor

paulvt commented Apr 28, 2022

Following #49, if I enable the legacy provider via the configuration (see #48), I can load the library fine, but tests still fail and I do not understand why:

Failures:

  1) Net::NTLM::Message::Type3.parse NTLM2 Session Response Authentication; NTLM2 Signing and Sealing Using the 128-bit NTLM2 Session Response User Session Key With Key Exchange Negotiated #password? should be true for "test1234"
     Failure/Error: expect(message.password?('test1234', server_challenge)).to be true
     
       expected true
            got false
     # ./spec/lib/net/ntlm/message/type3_spec.rb:155:in `block (5 levels) in <top (required)>'

  2) Net::NTLM should encrypt the string with DES for each key supplied
     Failure/Error: expect(Net::NTLM::apply_des(Net::NTLM::LM_MAGIC, keys)).to eq([first_crypt, second_crypt])
     
       expected: ["\xFF7P\xBC\xC2\xB2$\x12", "\xC2&[#sN\r\xAC"]
            got: ["\xFF7P\xBC\xC2\xB2$\x12", "\xACR\"\xA9\xCD\vs\xB2"]
     
       (compared using ==)
     # ./spec/lib/net/ntlm_spec.rb:39:in `block (2 levels) in <top (required)>'

  3) Net::NTLM should generate an lm_hash
     Failure/Error: expect(Net::NTLM::lm_hash(passwd)).to eq(["ff3750bcc2b22412c2265b23734e0dac"].pack("H*"))
     
       expected: "\xFF7P\xBC\xC2\xB2$\x12\xC2&[#sN\r\xAC"
            got: "\xFF7P\xBC\xC2\xB2$\x12\xACR\"\xA9\xCD\vs\xB2"
     
       (compared using ==)
     # ./spec/lib/net/ntlm_spec.rb:43:in `block (2 levels) in <top (required)>'

  4) Net::NTLM should generate an lm_response
     Failure/Error:
       expect(Net::NTLM::lm_response(
           {
               :lm_hash => Net::NTLM::lm_hash(passwd),
               :challenge => challenge
           }
       )).to eq(["c337cd5cbd44fc9782a667af6d427c6de67c20c2d3e77c56"].pack("H*"))
     
       expected: "\xC37\xCD\\\xBDD\xFC\x97\x82\xA6g\xAFmB|m\xE6| \xC2\xD3\xE7|V"
            got: "\xC37\xCD\\\xBDD\xFC\x970\xD2\x13\xE6\xFE\x10\xFC%Ry[\xD79\xA9&9"
     
       (compared using ==)
     # ./spec/lib/net/ntlm_spec.rb:63:in `block (2 levels) in <top (required)>'

  5) Net::NTLM should generate an ntlm_response
     Failure/Error:
       expect(Net::NTLM::ntlm_response(
           {
               :ntlm_hash => ntlm_hash,
               :challenge => challenge
           }
       )).to eq(["25a98c1c31e81847466b29b2df4680f39958fb8c213a9cc6"].pack("H*"))
     
       expected: "%\xA9\x8C\x1C1\xE8\x18GFk)\xB2\xDFF\x80\xF3\x99X\xFB\x8C!:\x9C\xC6"
            got: "%\xA9\x8C\x1C1\xE8\x18G\xA1\xDCcT\xDC\xB8\b\x12!&M\xAB\x9EH\xBE\x9D"
     
       (compared using ==)
     # ./spec/lib/net/ntlm_spec.rb:73:in `block (2 levels) in <top (required)>'

  6) Net::NTLM should generate a ntlm2_session
     Failure/Error: expect(session[1]).to eq(["10d550832d12b2ccb79d5ad1f4eed3df82aca4c3681dd455"].pack("H*"))
     
       expected: "\x10\xD5P\x83-\x12\xB2\xCC\xB7\x9DZ\xD1\xF4\xEE\xD3\xDF\x82\xAC\xA4\xC3h\x1D\xD4U"
            got: "\x10\xD5P\x83-\x12\xB2\xCC+(Mb\xE0\x14q\x81gPi\xC5n\x11:\xDF"
     
       (compared using ==)
     # ./spec/lib/net/ntlm_spec.rb:125:in `block (2 levels) in <top (required)>'

Finished in 0.6177 seconds (files took 0.64426 seconds to load)
741 examples, 6 failures

This is on Ubuntu 22.04 LTS with Ruby 3.0.2p107.

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 a pull request may close this issue.

1 participant