Skip to content

Commit

Permalink
get config requires session arg - #148
Browse files Browse the repository at this point in the history
  • Loading branch information
retrogradeorbit committed Apr 1, 2022
1 parent bd6e469 commit fc59175
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions src/clj/spire/ssh.clj
Original file line number Diff line number Diff line change
Expand Up @@ -236,42 +236,42 @@ keys. All other option key pairs will be passed as SSH config options."
:fingerprint-hash #(.setConfig %1 "FingerprintHash" %2)
:max-auth-tries #(.setConfig %1 "MaxAuthTries" %2)

:kex-fn #(.setConfig %1 "kex" (%2 (.getConfig "kex")))
:server-host-key-fn #(.setConfig %1 "server_host_key" (%2 (.getConfig "server_host_key")))
:prefer-known-host-key-types-fn #(.setConfig %1 "server_host_key" (%2 (.getConfig "server_host_key")))
:enable-server-sig-algs-fn #(.setConfig %1 "enable_server_sig_algs" (%2 (.getConfig "enable_server_sig_algs")))
:kex-fn #(.setConfig %1 "kex" (%2 (.getConfig %1 "kex")))
:server-host-key-fn #(.setConfig %1 "server_host_key" (%2 (.getConfig %1 "server_host_key")))
:prefer-known-host-key-types-fn #(.setConfig %1 "server_host_key" (%2 (.getConfig %1 "server_host_key")))
:enable-server-sig-algs-fn #(.setConfig %1 "enable_server_sig_algs" (%2 (.getConfig %1 "enable_server_sig_algs")))
:cipher-fn #(do
(.setConfig %1 "cipher.s2c" (%2 (.getConfig "cipher.s2c")))
(.setConfig %1 "cipher.c2s" (%2 (.getConfig "cipher.c2s"))))
:cipher-s2c-fn #(.setConfig %1 "cipher.s2c" (%2 (.getConfig "cipher.s2c")))
:cipher-c2s-fn #(.setConfig %1 "cipher.c2s" (%2 (.getConfig "cipher.c2s")))
(.setConfig %1 "cipher.s2c" (%2 (.getConfig %1 "cipher.s2c")))
(.setConfig %1 "cipher.c2s" (%2 (.getConfig %1 "cipher.c2s"))))
:cipher-s2c-fn #(.setConfig %1 "cipher.s2c" (%2 (.getConfig %1 "cipher.s2c")))
:cipher-c2s-fn #(.setConfig %1 "cipher.c2s" (%2 (.getConfig %1 "cipher.c2s")))
:mac-fn #(do
(.setConfig %1 "mac.s2c" (%2 (.getConfig "mac.s2c")))
(.setConfig %1 "mac.c2s" (%2 (.getConfig "mac.c2s"))))
:mac-s2c-fn #(.setConfig %1 "mac.s2c" (%2 (.getConfig "mac.s2c")))
:mac-c2s-fn #(.setConfig %1 "mac.c2s" (%2 (.getConfig "mac.c2s")))
(.setConfig %1 "mac.s2c" (%2 (.getConfig %1 "mac.s2c")))
(.setConfig %1 "mac.c2s" (%2 (.getConfig %1 "mac.c2s"))))
:mac-s2c-fn #(.setConfig %1 "mac.s2c" (%2 (.getConfig %1 "mac.s2c")))
:mac-c2s-fn #(.setConfig %1 "mac.c2s" (%2 (.getConfig %1 "mac.c2s")))
:compression-fn #(do
(.setConfig %1 "compression.s2c" (%2 (.getConfig "compression.s2c")))
(.setConfig %1 "compression.c2s" (%2 (.getConfig "compression.c2s"))))
:compression-s2c-fn #(.setConfig %1 "compression.s2c" (%2 (.getConfig "compression.s2c")))
:compression-c2s-fn #(.setConfig %1 "compression.c2s" (%2 (.getConfig "compression.c2s")))
(.setConfig %1 "compression.s2c" (%2 (.getConfig %1 "compression.s2c")))
(.setConfig %1 "compression.c2s" (%2 (.getConfig %1 "compression.c2s"))))
:compression-s2c-fn #(.setConfig %1 "compression.s2c" (%2 (.getConfig %1 "compression.s2c")))
:compression-c2s-fn #(.setConfig %1 "compression.c2s" (%2 (.getConfig %1 "compression.c2s")))
:lang-fn #(do
(.setConfig %1 "lang.s2c" (%2 (.getConfig "lang.s2c")))
(.setConfig %1 "lang.c2s" (%2 (.getConfig "lang.c2s"))))
:lang-s2c-fn #(.setConfig %1 "lang.s2c" (%2 (.getConfig "lang.s2c")))
:lang-c2s-fn #(.setConfig %1 "lang.c2s" (%2 (.getConfig "lang.c2s")))
:dhgex-min-fn #(.setConfig %1 "dhgex_min" (%2 (.getConfig "dhgex_min")))
:dhgex-max-fn #(.setConfig %1 "dhgex_max" (%2 (.getConfig "dhgex_max")))
:dhgex-preferred-fn #(.setConfig %1 "dhgex_preferred" (%2 (.getConfig "dhgex_preferred")))
:compression-level-fn #(.setConfig %1 "compression_level" (%2 (.getConfig "compression_level")))
:preferred-authentications-fn #(.setConfig %1 "PreferredAuthentications" (%2 (.getConfig "PreferredAuthentications")))
:client-pubkey-fn #(.setConfig %1 "PubkeyAcceptedAlgorithms" (%2 (.getConfig "PubkeyAcceptedAlgorithms")))
:check-ciphers-fn #(.setConfig %1 "CheckCiphers" (%2 (.getConfig "CheckCiphers")))
:check-macs-fn #(.setConfig %1 "CheckMacs" (%2 (.getConfig "CheckMacs")))
:check-kexes-fn #(.setConfig %1 "CheckKexes" (%2 (.getConfig "CheckKexes")))
:check-signatures-fn #(.setConfig %1 "CheckSignatures" (%2 (.getConfig "CheckSignatures")))
:fingerprint-hash-fn #(.setConfig %1 "FingerprintHash" (%2 (.getConfig "FingerprintHash")))
:max-auth-tries-fn #(.setConfig %1 "MaxAuthTries" (%2 (.getConfig "MaxAuthTries")))}
(.setConfig %1 "lang.s2c" (%2 (.getConfig %1 "lang.s2c")))
(.setConfig %1 "lang.c2s" (%2 (.getConfig %1 "lang.c2s"))))
:lang-s2c-fn #(.setConfig %1 "lang.s2c" (%2 (.getConfig %1 "lang.s2c")))
:lang-c2s-fn #(.setConfig %1 "lang.c2s" (%2 (.getConfig %1 "lang.c2s")))
:dhgex-min-fn #(.setConfig %1 "dhgex_min" (%2 (.getConfig %1 "dhgex_min")))
:dhgex-max-fn #(.setConfig %1 "dhgex_max" (%2 (.getConfig %1 "dhgex_max")))
:dhgex-preferred-fn #(.setConfig %1 "dhgex_preferred" (%2 (.getConfig %1 "dhgex_preferred")))
:compression-level-fn #(.setConfig %1 "compression_level" (%2 (.getConfig %1 "compression_level")))
:preferred-authentications-fn #(.setConfig %1 "PreferredAuthentications" (%2 (.getConfig %1 "PreferredAuthentications")))
:client-pubkey-fn #(.setConfig %1 "PubkeyAcceptedAlgorithms" (%2 (.getConfig %1 "PubkeyAcceptedAlgorithms")))
:check-ciphers-fn #(.setConfig %1 "CheckCiphers" (%2 (.getConfig %1 "CheckCiphers")))
:check-macs-fn #(.setConfig %1 "CheckMacs" (%2 (.getConfig %1 "CheckMacs")))
:check-kexes-fn #(.setConfig %1 "CheckKexes" (%2 (.getConfig %1 "CheckKexes")))
:check-signatures-fn #(.setConfig %1 "CheckSignatures" (%2 (.getConfig %1 "CheckSignatures")))
:fingerprint-hash-fn #(.setConfig %1 "FingerprintHash" (%2 (.getConfig %1 "FingerprintHash")))
:max-auth-tries-fn #(.setConfig %1 "MaxAuthTries" (%2 (.getConfig %1 "MaxAuthTries")))}
f (fs k)]
(when (and f (not (nil? v)))
(f session v))))
Expand Down

0 comments on commit fc59175

Please sign in to comment.