Fix the rake spec failures under ruby 2.4.
Ths typo3_spec is giving some errors under ruby 2.4+ and OpenSSL 1.1+.bug/bundler_fix
parent
10cedf81b3
commit
29d1022ae2
|
@ -100,8 +100,13 @@ module Msf::Exploit::Remote::HTTP::Typo3::Login
|
|||
key = OpenSSL::PKey::RSA.new
|
||||
exponent = OpenSSL::BN.new e.hex.to_s
|
||||
modulus = OpenSSL::BN.new n.hex.to_s
|
||||
if key.respond_to?(:set_key)
|
||||
# Ruby 2.4+
|
||||
key.set_key(modulus, exponent, nil)
|
||||
else
|
||||
key.e = exponent
|
||||
key.n = modulus
|
||||
end
|
||||
enc = key.public_encrypt(password)
|
||||
enc_b64 = Rex::Text.encode_base64(enc)
|
||||
"rsa:#{enc_b64}"
|
||||
|
|
Loading…
Reference in New Issue