diff options
author | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2017-10-10 17:39:20 +0100 |
---|---|---|
committer | Phillip Smyth <phillip.smyth@codethink.co.uk> | 2017-10-13 09:32:57 +0100 |
commit | 447d308f973b13a893cb69f26267f6c76ba909df (patch) | |
tree | bddb0c84cb9cea36b887747c3d3416235d940fdb | |
parent | aae625c318033fa199c1a2a3af509c357a8c0b91 (diff) | |
download | gitano-447d308f973b13a893cb69f26267f6c76ba909df.tar.gz |
Use new ssh type test
-rw-r--r-- | lib/gitano/config.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitano/config.lua b/lib/gitano/config.lua index 7227866..ebf9181 100644 --- a/lib/gitano/config.lua +++ b/lib/gitano/config.lua @@ -42,6 +42,7 @@ local pat = require 'gitano.patterns' local luxio = require 'luxio' local sio = require 'luxio.simple' local clod = require 'clod' +local util = require 'gitano.util' local pcall = pcall local pairs = pairs @@ -163,10 +164,7 @@ local function parse_admin_config(commit) if not (keytype and keydata and keytag) then return nil, i18n.expand("ERROR_BAD_KEY_SMELL", {filename=filename}) 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 return nil, i18n.expand("ERROR_BAD_KEY_TYPE", {keytype=keytype, filename=filename}) end |