File: never.rb

package info (click to toggle)
ruby-net-ssh 1%3A6.1.0-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,884 kB
  • sloc: ruby: 15,997; makefile: 4
file content (21 lines) | stat: -rw-r--r-- 419 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
20
21
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