summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Smyth <phillip.smyth@codethink.co.uk>2017-10-13 09:27:36 +0100
committerPhillip Smyth <phillip.smyth@codethink.co.uk>2017-10-13 09:32:57 +0100
commitad2e4c11a51e25cef13eeb05f4d43bf701321d44 (patch)
tree56d2d1e89462cde75c2e2b9becd317b36edc4ba2
parent447d308f973b13a893cb69f26267f6c76ba909df (diff)
downloadgitano-ad2e4c11a51e25cef13eeb05f4d43bf701321d44.tar.gz
Use new ssh type test
-rw-r--r--lib/gitano/usercommand.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/gitano/usercommand.lua b/lib/gitano/usercommand.lua
index af7141c..187e6db 100644
--- a/lib/gitano/usercommand.lua
+++ b/lib/gitano/usercommand.lua
@@ -219,10 +219,7 @@ local function builtin_sshkey_run(conf, _, cmdline, env)
return "exit", 1
end
- if (keytype ~= "ssh-rsa") and (keytype ~= "ssh-dss") and
- (keytype ~= "ecdsa-sha2-nistp256") and
- (keytype ~= "ecdsa-sha2-nistp384") and
- (keytype ~= "ecdsa-sha2-nistp521") then
+ if util.ssh_type_is_invalid(keytype) then
log.error("Unknown key type", keytype)
return "exit", 1
end