summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorivan <ivan>2010-11-08 00:01:58 +0000
committerivan <ivan>2010-11-08 00:01:58 +0000
commite50b6ec8d63afe4c04ae33384758d8786fcc7cfe (patch)
tree37cce8990845f0618d51137fbfa613fb0a50d850 /httemplate/edit
parent874ad675da1321638b374d0b574231d7fa577196 (diff)
certificates ala communigate, RT#7515
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/process/svc_cert.cgi8
-rw-r--r--httemplate/edit/svc_cert/import_cacert.html22
2 files changed, 30 insertions, 0 deletions
diff --git a/httemplate/edit/process/svc_cert.cgi b/httemplate/edit/process/svc_cert.cgi
index a8dc0ca8a..0e6037e31 100644
--- a/httemplate/edit/process/svc_cert.cgi
+++ b/httemplate/edit/process/svc_cert.cgi
@@ -66,6 +66,14 @@ if ( $cgi->param('privatekey') eq '_generate' ) { #generate
$new->certificate( $cgi->param('certificate') );
$new->$_( $old->$_ ) for grep $old->$_, qw( recnum common_name organization organization_unit city state country cert_contact );
+} elsif ( $cgi->param('cacert') ) {
+
+ $popup = 'view';
+ $title = 'Certificate authority chain imported';
+
+ $new->cacert( $cgi->param('cacert') );
+ $new->$_( $old->$_ ) for grep $old->$_, qw( recnum common_name organization organization_unit city state country cert_contact );
+
}
my $error = '';
diff --git a/httemplate/edit/svc_cert/import_cacert.html b/httemplate/edit/svc_cert/import_cacert.html
new file mode 100644
index 000000000..bc6f4e7f3
--- /dev/null
+++ b/httemplate/edit/svc_cert/import_cacert.html
@@ -0,0 +1,22 @@
+<% include('/elements/header-popup.html', 'Import certificate authority chain' ) %>
+
+<% include('/elements/error.html') %>
+
+<FORM NAME="ImportKeyForm" ACTION="<% $p %>process/svc_cert.cgi" METHOD="POST">
+
+<INPUT TYPE="hidden" NAME="svcnum" VALUE="<% $svcnum %>">
+
+<TEXTAREA NAME="cacert" COLS=64 ROWS=15 STYLE="font-family:monospace"></TEXTAREA>
+
+<BR><BR>
+<INPUT TYPE="submit" VALUE="Import">
+
+</FORM>
+</BODY>
+</HTML>
+<%init>
+
+$cgi->param('svcnum') =~ /^(\d*)$/ or die 'illegal svcnum';
+my $svcnum = $1;
+
+</%init>