summaryrefslogtreecommitdiffstats
path: root/openssl-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-05-28 17:56:17 +0000
committerTed Trask <ttrask01@yahoo.com>2008-05-28 17:56:17 +0000
commit68b08ba0a7525e7571f304e4756c2e0a8f7d6e47 (patch)
tree2dfada6b11660074f3f318ae97435d9fe5507e07 /openssl-controller.lua
parent2c7efb258612b0039becb4d535b0e118c400d79d (diff)
downloadacf-openssl-68b08ba0a7525e7571f304e4756c2e0a8f7d6e47.tar.bz2
acf-openssl-68b08ba0a7525e7571f304e4756c2e0a8f7d6e47.tar.xz
Check to see if necessary openssl directories exist, add support to create them
And enddate and daysremaining to list of certificates Add ability to renew a certificate git-svn-id: svn://svn.alpinelinux.org/acf/openssl/trunk@1188 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'openssl-controller.lua')
-rw-r--r--openssl-controller.lua27
1 files changed, 26 insertions, 1 deletions
diff --git a/openssl-controller.lua b/openssl-controller.lua
index ff9fb91..0b3cdde 100644
--- a/openssl-controller.lua
+++ b/openssl-controller.lua
@@ -12,7 +12,9 @@ mvc.pre_exec = function(self)
sslstatus = self.model.getstatus()
if (sslstatus.value.version.errtxt and self.conf.action ~= "status")
or (sslstatus.value.conffile.errtxt and self.conf.action ~= "status" and self.conf.action ~= "editconfigfile")
- or ((sslstatus.value.cacert.errtxt or sslstatus.value.cakey.errtxt) and self.conf.action ~= "status" and self.conf.action ~= "editconfigfile" and self.conf.action ~= "putcacert" and self.conf.action ~= "generatecacert") then
+ or (sslstatus.value.environment.errtxt and self.conf.action ~= "status" and self.conf.action ~= "editconfigfile" and self.conf.action ~= "checkenvironment")
+ or ((sslstatus.value.cacert.errtxt or sslstatus.value.cakey.errtxt) and self.conf.action ~= "status" and self.conf.action ~= "editconfigfile" and self.conf.action ~= "putcacert" and self.conf.action ~= "generatecacert" and self.conf.action ~= "checkenvironment")
+ then
redirect(self)
end
end
@@ -138,6 +140,20 @@ deletecert = function(self)
redirect_to_referrer(self)
end
+-- Submit request to renew the specified certificate
+requestrenewcert = function(self)
+ local cmdresult = self.model.renewcert(self.clientdata.cert)
+ self.sessiondata.cmdresult = cmdresult
+ redirect_to_referrer(self)
+end
+
+-- Renew the specified certificate
+renewcert = function(self)
+ local cmdresult = self.model.renewcert(self.clientdata.cert, true)
+ self.sessiondata.cmdresult = cmdresult
+ redirect_to_referrer(self)
+end
+
-- Get the revoked list
getrevoked = function(self)
self.conf.viewtype="stream"
@@ -195,3 +211,12 @@ editconfigfile = function(self)
end
return configfile
end
+
+checkenvironment = function(self)
+ local form = cfe({ type="form", value={}, label="Check Environment", option="Configure" })
+ form.value.status = self.model.checkenvironment(self.clientdata.Configure)
+ if self.clientdata.Configure and not form.value.status.errtxt then
+ redirect_to_referrer(self)
+ end
+ return form
+end