From f94033a603d5483083c7873fb3417bf70c531c3a Mon Sep 17 00:00:00 2001 From: haccht Date: Thu, 6 Aug 2020 14:50:40 +0900 Subject: Fix missing OpenSSL::Pkey::EC::Point#ssh_signature_type --- lib/net/ssh/transport/openssl.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/net/ssh/transport/openssl.rb b/lib/net/ssh/transport/openssl.rb index 7b16c3d..4511d8f 100644 --- a/lib/net/ssh/transport/openssl.rb +++ b/lib/net/ssh/transport/openssl.rb @@ -245,6 +245,10 @@ module OpenSSL "ecdsa-sha2-#{CurveNameAliasInv[group.curve_name]}" end + def ssh_signature_type + ssh_type + end + # Converts the key to a blob, according to the SSH2 protocol. def to_blob @blob ||= Net::SSH::Buffer.from(:string, ssh_type, -- cgit v1.2.1 From 79365879eeb3091de961eb2ae449613956decdbe Mon Sep 17 00:00:00 2001 From: haccht Date: Fri, 7 Aug 2020 10:39:23 +0900 Subject: Make it clear that ssh_signature_type is an alias for ssh_type by using alias keyword --- lib/net/ssh/transport/openssl.rb | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/net/ssh/transport/openssl.rb b/lib/net/ssh/transport/openssl.rb index 4511d8f..d12a74b 100644 --- a/lib/net/ssh/transport/openssl.rb +++ b/lib/net/ssh/transport/openssl.rb @@ -53,9 +53,7 @@ module OpenSSL "ssh-rsa" end - def ssh_signature_type - ssh_type - end + alias ssh_signature_type ssh_type # Converts the key to a blob, according to the SSH2 protocol. def to_blob @@ -92,9 +90,7 @@ module OpenSSL "ssh-dss" end - def ssh_signature_type - ssh_type - end + alias ssh_signature_type ssh_type # Converts the key to a blob, according to the SSH2 protocol. def to_blob @@ -172,9 +168,7 @@ module OpenSSL "ecdsa-sha2-#{CurveNameAliasInv[group.curve_name]}" end - def ssh_signature_type - ssh_type - end + alias ssh_signature_type ssh_type def digester if group.curve_name =~ /^[a-z]+(\d+)\w*\z/ @@ -245,9 +239,7 @@ module OpenSSL "ecdsa-sha2-#{CurveNameAliasInv[group.curve_name]}" end - def ssh_signature_type - ssh_type - end + alias ssh_signature_type ssh_type # Converts the key to a blob, according to the SSH2 protocol. def to_blob -- cgit v1.2.1