<%# Opennet Firmware Copyright 2010 Rene Ejury Copyright 2015 Lars Kruse Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -%> <% require("luci.model.opennet.on_crt_data") require("luci.model.opennet.funcs") %>
<%:Key/Cert Status%>
<% if certstatus.on_crt_exists then %> <% end %> <% if certstatus.on_csr_exists and not certstatus.on_keycrt_ok then %> <% end %> <% else %> <% end %> <% else %> <% end %>
<% display_crt_infotable(cert_type) %><% display_csr_infotable(cert_type) %>
<%= os.date("%c", certstatus.on_csr_date) %>
   
<%:download%>

<% if certstatus.on_key_exists then %>
<%= os.date("%c", certstatus.on_key_date) %>
   
<%:download%>
   

<% if certstatus.on_crt_exists then %>
<%= os.date("%c", certstatus.on_crt_date) %>
   
<%:download%>
   
<%# Melde eventuelle Widersprueche zwischen Zertifikat und Schluessel %> <% if certstatus.on_crt_exists and certstatus.on_key_exists and (certstatus.on_crt_modulus ~= certstatus.on_key_modulus) then %>
<% if certstatus.on_csr_modulus == certstatus.on_key_modulus then %> <%=html_box(luci.i18n.translate("Private Key and Certificate do not match. Please replace Certificate!", "error"))%> <% else %> <%=html_box(luci.i18n.translate("Private Key and Certificate do not match. Certificate-Request also does not match Private Key, therefore sending the Certificate Request to opennet authority will not help. Please replace Certificate or Private Key or regenerate Key and Certificate Request.", "error"))%> <% end %>
<% end %>
<%:Key Management%> <%# Sende den CSR an die CA %> <% if certstatus.on_keycsr_ok and (not(certstatus.on_crt_exists) or not(certstatus.on_keycrt_ok)) then local contact_email = on_function("get_on_core_default", {"csr_contact"}) local on_id = on_function("uci_get", {"on-core.settings.on_id"}) %>
<% local type if (cert_type == "mesh") then type = luci.i18n.translate("UserGateway (type user gateway)") else type = luci.i18n.translate("AccessPoint (type users)") end %>

<%:Submit certificate request%>

<%:Choose one of the following options for submitting your certificate signing request%>:

<% end %> <% if certstatus.on_key_exists and certstatus.on_crt_exists and not force_show_uploadfields then %>
<% else %>
<%:upload Certificate (.crt) or Private Key (.key)%>
<% end %>