File: never.rb

package info (click to toggle)
ruby-net-ssh 1%3A7.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,804 kB
  • sloc: ruby: 16,999; makefile: 5
file content (19 lines) | stat: -rw-r--r-- 417 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Net
  module SSH
    module Verifiers
      # This host key verifier simply allows every key it sees, without
      # any verification. This is simple, but very insecure because it
      # exposes you to MiTM attacks.
      class Never
        # Returns true.
        def verify(arguments)
          true
        end

        def verify_signature(&block)
          true
        end
      end
    end
  end
end