Sha256: a28ac98cbcca55bdb74b75364a2676c738c36e69e88fa992cffdc66232eefb8e

Contents?: true

Size: 978 Bytes

Versions: 21

Compression:

Stored size: 978 Bytes

Contents

module Net; module SSH; module Authentication

# Loads ED25519 support which requires optinal dependecies like
# rbnacl, bcrypt_pbkdf
module ED25519Loader

begin
  require 'net/ssh/authentication/ed25519'
  LOADED = true
  ERROR = nil
rescue LoadError => e
  ERROR = e
  LOADED = false
end

def self.raiseUnlessLoaded(message)
  description = ERROR.is_a?(LoadError) ? dependenciesRequiredForED25519 : ''
  description << "#{ERROR.class} : \"#{ERROR.message}\"\n" if ERROR
  raise NotImplementedError, "#{message}\n#{description}" unless LOADED
end

def self.dependenciesRequiredForED25519
  result = "net-ssh requires the following gems for ed25519 support:\n"
  result << " * rbnacl (>= 3.2, < 5.0)\n"
  result << " * rbnacl-libsodium, if your system doesn't have libsodium installed.\n"
  result << " * bcrypt_pbkdf (>= 1.0, < 2.0)\n" unless RUBY_PLATFORM == "java"
  result << "See https://github.com/net-ssh/net-ssh/issues/478 for more information\n"
end

end
end; end; end

Version data entries

21 entries across 18 versions & 3 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/net-ssh-4.2.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/authentication/ed25519_loader.rb
net-ssh-4.2.0 lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/authentication/ed25519_loader.rb
net-ssh-4.2.0.rc2 lib/net/ssh/authentication/ed25519_loader.rb
net-ssh-4.2.0.rc1 lib/net/ssh/authentication/ed25519_loader.rb
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/net-ssh-4.1.0/lib/net/ssh/authentication/ed25519_loader.rb
net-ssh-4.1.0 lib/net/ssh/authentication/ed25519_loader.rb
net-ssh-4.1.0.rc1 lib/net/ssh/authentication/ed25519_loader.rb