diff options
-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 |