diff options
author | Ted Trask <ttrask01@yahoo.com> | 2008-05-16 16:07:43 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2008-05-16 16:07:43 +0000 |
commit | af360b084b8b5c787a0141cba65191d13e2a4aa4 (patch) | |
tree | ae662ca45bdcdf6340f40ad60512745c93a363a9 /openssl-controller.lua | |
download | acf-openssl-af360b084b8b5c787a0141cba65191d13e2a4aa4.tar.bz2 acf-openssl-af360b084b8b5c787a0141cba65191d13e2a4aa4.tar.xz |
Saving incomplete openssl pages
git-svn-id: svn://svn.alpinelinux.org/acf/openssl/trunk@1124 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'openssl-controller.lua')
-rw-r--r-- | openssl-controller.lua | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/openssl-controller.lua b/openssl-controller.lua new file mode 100644 index 0000000..88bb098 --- /dev/null +++ b/openssl-controller.lua @@ -0,0 +1,73 @@ +-- the openssl certificates controller +module (..., package.seeall) + +require("getopts") + +default_action = "read" + +-- View all pending and approved requests and revoked certificates +readall = function(self) +end + +-- Return all certificates (pending, approved, and revoked) for this user +read = function(self) + local user = cfe({ value="Ted", label="User Name" }) + local result = cfe({ type="list", value={user=user} }) +-- result.value[1] = getopts.getoptsfromfile(configfile, nil, nil) +-- getopts.setoptsinfile(configfile, "Hey", "test", "--qasdg", true, nil) +-- result.value[2] = getopts.getoptsfromfile(configfile, nil, nil) + return result +end + +-- Form to request a new cert +request = function(self) + local request + if self.clientdata.Submit then + -- Try to submit the request + request = cfe({ type="group", value={} }) + else + request = self.model.getdefaults() + end + + request.type = "form" + request.label = "Request Certificate" + request.option = "Submit" + + return request +end + +-- Form to edit request defaults +editdefaults = function(self) + local defaults + if self.clientdata.Save then + defaults = cfe({ type="group", value={} }) + else + defaults = self.model.getdefaults() + end + + defaults.type = "form" + defaults.label = "Edit certificate defaults" + defaults.option = "Save" + + return defaults +end + +-- Approve the specified request +approve = function(self) +end + +-- Revoke the specified cert +revoke = function(self) +end + +-- Get the specified cert +getcert = function(self) +end + +-- Get the revoked list +getrevoked = function(self) +end + +-- Put the CA cert +putcacert = function(self) +end |