Sha256: fd83452b0f24ed20cf117c50eeb10ada23a7a9307706a56cbfa93c6bc782cb02

Contents?: true

Size: 488 Bytes

Versions: 5

Compression:

Stored size: 488 Bytes

Contents

# frozen_string_literal: true

module Facts
  module Macosx
    class SshfpAlgorithm
      FACT_NAME = 'sshfp_.*'

      def call_the_resolver
        facts = []
        result = Facter::Resolvers::SshResolver.resolve(:ssh)
        result.each do |ssh|
          facts << Facter::ResolvedFact.new("sshfp_#{ssh.name.to_sym}",
                                            "#{ssh.fingerprint.sha1} \n #{ssh.fingerprint.sha256}", :legacy)
        end
        facts
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
facter-4.0.14 lib/facts/macosx/sshfp_algorithm.rb
facter-4.0.13 lib/facts/macosx/sshfp_algorithm.rb
facter-4.0.12 lib/facts/macosx/sshfp_algorithm.rb
facter-4.0.11 lib/facts/macosx/sshfp_algorithm.rb
facter-4.0.10.pre lib/facts/macosx/sshfp_algorithm.rb