diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Ssh.hs | 9 | ||||
| -rw-r--r-- | src/Propellor/Types/PrivData.hs | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/Propellor/Property/Ssh.hs b/src/Propellor/Property/Ssh.hs index 9a0b2153..301c628b 100644 --- a/src/Propellor/Property/Ssh.hs +++ b/src/Propellor/Property/Ssh.hs @@ -90,13 +90,10 @@ pubKey t k = pureInfoProperty ("ssh pubkey known") $ getPubKey :: Propellor (M.Map SshKeyType String) getPubKey = asks (_sshPubKey . hostInfo) --- | Installs all commonly used types of ssh host keys. +-- | Installs all available types of ssh host keys. hostKeys :: IsContext c => c -> Property -hostKeys ctx = propertyList "known ssh host keys" - [ hostKey SshDsa ctx - , hostKey SshRsa ctx - , hostKey SshEcdsa ctx - ] +hostKeys ctx = propertyList "known ssh host keys" $ + map (flip hostKey ctx) [minBound..maxBound] -- | Installs a single ssh host key. -- diff --git a/src/Propellor/Types/PrivData.hs b/src/Propellor/Types/PrivData.hs index d6941a77..c760ae55 100644 --- a/src/Propellor/Types/PrivData.hs +++ b/src/Propellor/Types/PrivData.hs @@ -90,7 +90,7 @@ hostContext = HostContext Context type PrivData = String data SshKeyType = SshRsa | SshDsa | SshEcdsa | SshEd25519 - deriving (Read, Show, Ord, Eq) + deriving (Read, Show, Ord, Eq, Enum, Bounded) -- | Parameter that would be passed to ssh-keygen to generate key of this type sshKeyTypeParam :: SshKeyType -> String |
