Skip to content

Commit

Permalink
Fixup: spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-sidorenko committed Dec 5, 2016
1 parent 994436e commit 271dbab
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions libraries/devsec_ssh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,37 +74,24 @@ class Ssh # rubocop:disable Metrics/ClassLength
class << self
def get_server_privilege_separarion(node)
Chef::Log.debug('Called get_server_privilege_separarion')

found_ssh_version = find_ssh_version(get_ssh_server_version(node), PRIVILEGE_SEPARATION.keys)

ret = PRIVILEGE_SEPARATION[found_ssh_version]

Chef::Log.debug("Using configuration for ssh version #{found_ssh_version}, value: #{ret}")

ret
end

private

def method_missing(method, node, enable_weak = false)
super unless respond_to_missing?(method)

type, call = parse_method(method)

Chef::Log.debug("Called #{method}")

ssh_version = send("get_ssh_#{type}_version", node)

Chef::Log.debug("Detected ssh version #{ssh_version}")

found_ssh_version = find_ssh_version(ssh_version, CRYPTO[call].keys)

Chef::Log.debug("Using configuration for ssh version #{found_ssh_version}")

crypto = []

crypto += CRYPTO[call][found_ssh_version]

# Sometimes we do not have a value, e.g. this feature is not supported
# on the particilar ssh version. Return nil in such cases
if crypto.empty?
Expand Down

0 comments on commit 271dbab

Please sign in to comment.