<%# 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(certtype) %><% display_csr_infotable(certtype) %>
<%= 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_error_box(luci.i18n.translate("Private Key and Certificate do not match. Please replace Certificate!"))%> <% else %> <%=html_error_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."))%> <% 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 (certtype == "ugw") 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%>:

  • <%:Send your request with one click%>: <%:via Opennet%> / <%:via Internet%>
  • <%:Download the CSR file and upload it manually%>: <%:via Opennet%> / <%:via Internet%>
  • <%= luci.i18n.translatef([[Send Certificate Request (.csr) and only this file to %s in order to get the required certificate.]], contact_email, type, on_id, contact_email) %>
<% 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 %>