if $"new" <> "" then
val cert = $"cert";
val domain = $"domain";
+ val subdomain = $"subdomain";
val msg = $"msg";
if cert = "" then
%><h3>You don't have permissions on domain <tt><% Web.html domain %></tt>.</h3><%
else
%>Are you sure you want to ask for permissions on an SSL certificate
+ <ul>
<li> at <tt><% Web.html cert %></tt>,</li>
- <li> for domain <tt><% domain %></tt>?</li>
- <a href="?cmd=request&cert=<% Web.html cert %>&domain=<% Web.html domain %>&msg=<% Web.urlEncode msg %>">Yes, I want to request that.</a><%
+ <li> for domain <tt><% Sec.fulldomain (subdomain, domain) %></tt>?</li>
+ </ul>
+ <a href="?cmd=request&cert=<% Web.html cert %>&domain=<% Web.html domain %>&subdomain=<% Web.html subdomain %>&msg=<% Web.urlEncode msg %>">Yes, I want to request that.</a><%
end
elseif $"cmd" = "request" then
val cert = $"cert";
val domain = $"domain";
+ val subdomain = $"subdomain";
val msg = $"msg";
if cert = "" then
else
val text = "/afs/hcoop.net/common/etc/scripts/ca-install "
^ Init.getUserName () ^ " "
- ^ domain ^ " "
+ ^ (Sec.fulldomain (subdomain, domain)) ^ " "
^ cert
val id = Cert.add (Init.getUserId (), text, msg);
<p>Use this form to request Domtool permissions to use an SSL certificate. Give the location of your certificate/key (<tt>.pem</tt>) file within <tt>/afs/hcoop.net</tt>.</p>
-<p>If you want your certificate authenticated by chaining through HCoop's root certificate, then <a href="sign">get it signed</a> before submitting this form.</p>
-
-<p>Note that you can't use SSL certificates very well over HTTPS without an IP address assigned to your web virtual host. You can request one separately on <a href="ip">the IP address request page</a>.</p>
-
<p>The <a href="http://wiki.hcoop.net/MemberManual/ServingWebsites/SslCert">instructions on our wiki for creating SSL certificates</a> may be helpful.</p>
+<p>If you need to install an <strong>intermediate certificate</strong>, please include the url to either the certificate or the CA's webpage (e.g. <a href="http://wiki.gandi.net/en/ssl/intermediate">Gandi</a>, <a href="https://www.startssl.com/?app=21">StartSSL</a>) in your additional comments.</p>
+
<form method="post">
<input type="hidden" name="new" value="1">
<table class="blanks">
-<tr> <td>Domain:</td> <td><% @chooseDomain[] %></td> </tr>
-<tr> <td>OpenSSL certificate:</td> <td><input name="cert" size="60"></td> </tr>
+<tr> <td>Subdomain <span style="font-size: smaller">(optional)</span>:</td> <td><input name="subdomain" /></td></tr>
+<tr> <td>Domain:</td> <td><% @chooseDomain [] %></td> </tr>
+<tr> <td>OpenSSL certificate:</td> <td><input name="cert" size="60" required="required" value="<% Quotas.path ("user." ^ Init.getUserName ()) ^ "/certificates/" %>" ></td> </tr>
<tr> <td>Additional comments:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
<tr> <td><input type="submit" value="Request"></td> </tr>
</table>
</form>
+<h3>Your certificates</h3>
+
+<ul>
+ <% foreach cert in Domtool.perms "cert" (Init.getUserName ()) do %>
+ <li><tt><% cert %></tt></li>
+<% end %>
+</ul>
+
+<h3>Your intermediate certificates</h3>
+
+<ul>
+ <% foreach cert in Domtool.perms "cacert" (Init.getUserName ()) do %>
+ <li><tt><% cert %></tt></li>
+<% end %>
+</ul>
+
<% end %>
<% @footer[] %>