From c62f9d8b976cb3de0f72f37344fad92b8903db6e Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Thu, 3 Aug 2023 21:28:03 -0400 Subject: [PATCH] Don't ASN.1 encode the RSA key. Just set the modulus and exponent --- lib/ssh_data/public_key/rsa.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ssh_data/public_key/rsa.rb b/lib/ssh_data/public_key/rsa.rb index caf5de1..c104d9f 100644 --- a/lib/ssh_data/public_key/rsa.rb +++ b/lib/ssh_data/public_key/rsa.rb @@ -18,8 +18,8 @@ def initialize(algo:, e:, n:) @e = e @n = n - @openssl = OpenSSL::PKey::RSA.new(asn1.to_der) - + @openssl = OpenSSL::PKey::RSA.new + @openssl.set_key(n, e, nil) super(algo: algo) end