diff options
author | Ted Trask <ttrask01@yahoo.com> | 2012-10-28 02:34:39 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-10-28 02:34:39 +0000 |
commit | a573cc3dd897e96bc4f73f851b5a6092c67e4064 (patch) | |
tree | 09974d86775e9a23bc65bb8edf32ae14d843e36c | |
parent | 317ccde9c617d79329269d7f4745fd0a0a56cf9e (diff) | |
download | acf-openssl-a573cc3dd897e96bc4f73f851b5a6092c67e4064.tar.bz2 acf-openssl-a573cc3dd897e96bc4f73f851b5a6092c67e4064.tar.xz |
Removed unneeded views by updating CFE for autoview
-rw-r--r-- | openssl-editdefaults-html.lsp | 13 | ||||
-rw-r--r-- | openssl-generatecacert-html.lsp | 12 | ||||
-rw-r--r-- | openssl-model.lua | 22 | ||||
-rw-r--r-- | openssl-request-html.lsp | 15 |
4 files changed, 14 insertions, 48 deletions
diff --git a/openssl-editdefaults-html.lsp b/openssl-editdefaults-html.lsp deleted file mode 100644 index 245e1d2..0000000 --- a/openssl-editdefaults-html.lsp +++ /dev/null @@ -1,13 +0,0 @@ -<% local form, viewlibrary, page_info = ... %> -<% require("htmlviewfunctions") %> -<% html = require("acf.html") %> - -<H1><%= html.html_escape(form.label) %></H1> -<% - form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action - local order = { "countryName", "C", "stateOrProvinceName", "ST", "localityName", "L", "organizationName", "O", - "organizationalUnitName", "OU", "commonName", "CN", "emailAddress" } - local finishingorder = { "encryption", "validdays", "certtype", "extensions" } - htmlviewfunctions.displayform(form, order, finishingorder) -%> - diff --git a/openssl-generatecacert-html.lsp b/openssl-generatecacert-html.lsp deleted file mode 100644 index 07f4479..0000000 --- a/openssl-generatecacert-html.lsp +++ /dev/null @@ -1,12 +0,0 @@ -<% local form, viewlibrary, page_info = ... %> -<% require("htmlviewfunctions") %> -<% html = require("acf.html") %> - -<H1><%= html.html_escape(form.label) %></H1> -<% - form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action - local order = { "countryName", "C", "stateOrProvinceName", "ST", "localityName", "L", "organizationName", "O", - "organizationalUnitName", "OU", "commonName", "CN", "emailAddress" } - htmlviewfunctions.displayform(form, order) -%> - diff --git a/openssl-model.lua b/openssl-model.lua index 47b02d0..d998664 100644 --- a/openssl-model.lua +++ b/openssl-model.lua @@ -38,11 +38,17 @@ local getdefaults = function() config = config or format.parse_ini_file(fs.read_file(configfile) or "") local distinguished_name = config.req.distinguished_name or "" + -- Define the order of the parameters in the form + local order = { "countryName", "C", "stateOrProvinceName", "ST", "localityName", "L", "organizationName", "O", + "organizationalUnitName", "OU", "commonName", "CN", "emailAddress" } + local reverseorder = {} + for i,o in ipairs(order) do reverseorder[o] = i end + -- Get the distinguished name defaults for name,value in pairs(config[distinguished_name]) do if nil == string.find(name, "_") then defaults.value[name] = cfe({ label=value, - value=config[distinguished_name][name .. "_default"] or "" }) + value=config[distinguished_name][name .. "_default"] or "", seq=reverseorder[name] or 90 }) end end @@ -310,15 +316,15 @@ getreqdefaults = function() --Add in the encryption bit default local encryption = config.req.default_bits - defaults.value.encryption = cfe({ type="select", label="Encryption Bits", value=encryption, option={"2048", "4096"} }) + defaults.value.encryption = cfe({ type="select", label="Encryption Bits", value=encryption, option={"2048", "4096"}, seq=94 }) -- Add in the default days local validdays = getconfigentry(config.ca.default_ca, "default_days") - defaults.value.validdays = cfe({ type="text", label="Period of Validity (Days)", value=validdays, descr="Number of days this certificate is valid for" }) + defaults.value.validdays = cfe({ type="text", label="Period of Validity (Days)", value=validdays, descr="Number of days this certificate is valid for", seq=95 }) -- Add in the ca type default defaults.value.certtype = cfe({ type="select", label="Certificate Type", - value=config.ca.default_ca, option=find_ca_sections() }) + value=config.ca.default_ca, option=find_ca_sections(), seq=96 }) -- Add in the extensions local extensions = "" local content = fs.read_file(configfile) or "" @@ -326,7 +332,7 @@ getreqdefaults = function() if config.req.req_extensions then extensions = format.get_ini_section(content, config.req.req_extensions) end - defaults.value.extensions = cfe({ type="longtext", label="Additional x509 Extensions", value=extensions, descr="These extensions can be overridden by the Certificate Type" }) + defaults.value.extensions = cfe({ type="longtext", label="Additional x509 Extensions", value=extensions, descr="These extensions can be overridden by the Certificate Type", seq=97 }) return defaults end @@ -364,8 +370,8 @@ end getnewrequest = function() local values = getreqdefaults() -- In addition to the request defaults, we need a password and confirmation - values.value.password = cfe({ label="Password" }) - values.value.password_confirm = cfe({ label="Password confirmation" }) + values.value.password = cfe({ type="password", label="Password", seq=98 }) + values.value.password_confirm = cfe({ type="password", label="Password confirmation", seq=99 }) return values end @@ -829,7 +835,7 @@ end getnewcarequest = function() request = getdefaults() -- In addition to the distinguished name defaults, we need days - request.value.days = cfe({ value="365", label="Number of days to certify" }) + request.value.days = cfe({ value="365", label="Number of days to certify", seq=95 }) return request end diff --git a/openssl-request-html.lsp b/openssl-request-html.lsp deleted file mode 100644 index f214d23..0000000 --- a/openssl-request-html.lsp +++ /dev/null @@ -1,15 +0,0 @@ -<% local form, viewlibrary, page_info = ... %> -<% require("htmlviewfunctions") %> -<% html = require("acf.html") %> - -<H1><%= html.html_escape(form.label) %></H1> -<% - form.action = page_info.script .. page_info.prefix .. page_info.controller .. "/" .. page_info.action - form.value.password.type = "password" - form.value.password_confirm.type = "password" - local order = { "countryName", "C", "stateOrProvinceName", "ST", "localityName", "L", "organizationName", "O", - "organizationalUnitName", "OU", "commonName", "CN", "emailAddress" } - local finishingorder = { "certtype", "validdays", "extensions", "password", "password_confirm" } - htmlviewfunctions.displayform(form, order, finishingorder) -%> - |