<% local msg = {} if _SESSION["logined"] ~= nil then local filename = _POST["filename"] local filepath = _POST["filepath"] local bits = _POST["bits"] local country = _POST["country"] local state = _POST["state"] local locality = _POST["locality"] local organization = _POST["organization"] local domainName = _POST["domainName"] local password = _POST["password"] local retval = c_CreateSSLCertificate(filename,filepath,bits,country,state,locality,organization,domainName,password) if retval == true then c_AddAdminLog("administrator '".._SESSION["admin"].."' created ssl certificate ["..filename.."].",ADMIN_LOG_OK) rawset(msg, "code", 0) print(json.encode(msg)) else c_AddAdminLog("administrator '".._SESSION["admin"].."' created ssl certificate ["..filename.."] failed.",ADMIN_LOG_ERROR) rawset(msg, "code", -2) print(json.encode(msg)) end else rawset(msg, "code", -1) rawset(msg, "error", "not logged in") print(json.encode(msg)) end %>