equal
deleted
inserted
replaced
637 |
637 |
638 show_message(error_messages[msg]) |
638 show_message(error_messages[msg]) |
639 return 1; |
639 return 1; |
640 end |
640 end |
641 |
641 |
642 local openssl = require "util.openssl"; |
642 local openssl; |
643 local lfs = require "lfs"; |
643 local lfs; |
644 |
644 |
645 local cert_commands = {}; |
645 local cert_commands = {}; |
646 |
646 |
647 local function ask_overwrite(filename) |
647 local function ask_overwrite(filename) |
648 return lfs.attributes(filename) and not show_yesno("Overwrite "..filename .. "?"); |
648 return lfs.attributes(filename) and not show_yesno("Overwrite "..filename .. "?"); |
742 end |
742 end |
743 end |
743 end |
744 |
744 |
745 function commands.cert(arg) |
745 function commands.cert(arg) |
746 if #arg >= 1 and arg[1] ~= "--help" then |
746 if #arg >= 1 and arg[1] ~= "--help" then |
|
747 openssl = require "util.openssl"; |
|
748 lfs = require "lfs"; |
747 local subcmd = table.remove(arg, 1); |
749 local subcmd = table.remove(arg, 1); |
748 if type(cert_commands[subcmd]) == "function" then |
750 if type(cert_commands[subcmd]) == "function" then |
749 if not arg[1] then |
751 if not arg[1] then |
750 show_message"You need to supply at least one hostname" |
752 show_message"You need to supply at least one hostname" |
751 arg = { "--help" }; |
753 arg = { "--help" }; |