From d95ee329f5c3d923a66b4048ee316c51776a4760 Mon Sep 17 00:00:00 2001 From: John Crisp Date: Sun, 7 Mar 2021 18:56:21 +0100 Subject: [PATCH] More formatting --- ca/manage_certs.php | 192 +++++++++++----------- ca/request_cert.php | 221 +++++++++++++------------ setup.php-presetup | 385 ++++++++++++++++++++++---------------------- 3 files changed, 398 insertions(+), 400 deletions(-) diff --git a/ca/manage_certs.php b/ca/manage_certs.php index ea2f33b..990cd10 100644 --- a/ca/manage_certs.php +++ b/ca/manage_certs.php @@ -6,14 +6,14 @@ include('../include/my_functions.php'); include('../include/common.php'); include('../include/openssl_functions.php'); -$stage = gpvar('stage'); -$serial = gpvar('serial'); -$sortfield = gpvar('sortfield'); -$ascdec = gpvar('ascdec'); -$passwd = gpvar('passwd'); -$expiry = gpvar('expiry'); -$submit = gpvar('submit'); -$dl_type = gpvar('dl_type'); +$stage = gpvar('stage'); +$serial = gpvar('serial'); +$sortfield = gpvar('sortfield'); +$ascdec = gpvar('ascdec'); +$passwd = gpvar('passwd'); +$expiry = gpvar('expiry'); +$submit = gpvar('submit'); +$dl_type = gpvar('dl_type'); $search = gpvar('search'); $show_valid = gpvar('show_valid'); @@ -49,10 +49,10 @@ switch ($stage) { case 'display': printHeader(false); ?> - +

Certificate Details

(#)
')?>

- + -

You are about to download the PRIVATE certificate key for

+

You are about to download the PRIVATE certificate key for

DO NOT DISTRIBUTE THIS FILE TO THE PUBLIC!

File type: @@ -141,14 +141,14 @@ switch ($stage) { print ' - '.htvar($rec['serial']).'
- '.htvar($rec['common_name']).'
- '.htvar($rec['email']).'
- '.htvar($rec['organization']).'
- '.htvar($rec['unit']).'
- '.htvar($rec['locality']).'
- '.htvar($rec['province']).'
- '.htvar($rec['country']).'
+ '.htvar($rec['serial']).'
+ '.htvar($rec['common_name']).'
+ '.htvar($rec['email']).'
+ '.htvar($rec['organization']).'
+ '.htvar($rec['unit']).'
+ '.htvar($rec['locality']).'
+ '.htvar($rec['province']).'
+ '.htvar($rec['country']).'

Are you sure?

@@ -158,7 +158,7 @@ switch ($stage) {  
'; - + break; case 'revoke': @@ -177,11 +177,11 @@ switch ($stage) {

Debug Info:

-
-

- -

- + +

+ +

+

- - +

Certificate Renewal Form

+ - - - - - - - - + + + - - - - + + + + - - - - + + + + - - - + + + + - - - + + + - - - + + + - - - - + + + - - - - + + + + - - - + + - print "\n" ; - print "\n" ; - print "\n" ; - print "\n" ; - for ($i = 2; $i <= 5; $i++) { - print "\n" ; - } + + + + + + + + +

Certificate Renewal Form

This will Revoke the old Certificate and Create a new one
You can add a password if required
Common Name
This will Revoke the old Certificate and Create a new one
You can add a password if required
E-mail Address
Common Name
Organization
E-mail Address
Department/Unit
Organization
Locality
Department/Unit
State/Province
Locality
Country
State/Province
Certificate Password
Country
Certificate Life Certificate Password
Certificate Life
  +   + + + +
+
- - - -   - -   - - - - - - - -

Debug Info:

- -

- -

- - +

+ +

+ + + @@ -342,6 +341,7 @@ switch ($stage) { + '; - + $headings = array( 'status'=>"Status", 'issued'=>"Issued", 'expires'=>"Expires", 'common_name'=>"User's Name", 'email'=>"E-mail", @@ -392,7 +392,7 @@ switch ($stage) { $stcolor = array('Valid'=>'green','Revoked'=>'red','Expired'=>'orange'); foreach ($db as $rec) { - print ' + print ' diff --git a/ca/request_cert.php b/ca/request_cert.php index e39be0b..dac0c90 100644 --- a/ca/request_cert.php +++ b/ca/request_cert.php @@ -124,7 +124,7 @@ switch ($form_stage) { printHeader(); ?> - +
@@ -220,14 +220,14 @@ switch ($form_stage) { # Save user's defaults $fp = fopen($user_cnf, 'w'); $x = ''; + $country = \''.addslashes($country).'\'; + $locality = \''.addslashes($locality).'\'; + $province = \''.addslashes($province).'\'; + $organization = \''.addslashes($organization).'\'; + $unit = \''.addslashes($unit).'\'; + $expiry = \''.addslashes($expiry).'\'; + $keysize = \''.addslashes($keysize).'\'; + ?>'; fwrite($fp, $x); fclose($fp); @@ -336,110 +336,109 @@ switch ($form_stage) { -
CERTIFICATE MANAGEMENT CONTROL PANEL
' .$rec[status].' '.$rec['issued'].' '.$rec['expires'].'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Certificate Request Form

Common Name*
(i.e. User real name or computer hostname - used as SubjectAltName)
E-mail Address *
Organization (Company/Agency)*
Department/Unit*
Locality (City/County)*
State/Province*
Country*
Certificate Password*
(Mandatory for Email,SSL Client,Code signing)
   Again
Certificate Life* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Certificate Request Form

Common Name *
(i.e. User real name or computer hostname - used as SubjectAltName)
E-mail Address *
Organization (Company/Agency) *
Department/Unit *
Locality (City/County) *
State/Province *
Country *
Certificate Password *
(Min 8 chars - Mandatory for Email,SSL Client,Code signing)
   Again
Certificate Life*
Key Size*
Certificate Use:*
  
* Fields are required
+ 1 Month\n" ; - print "\n" ; - print "\n" ; - print "\n" ; - for ($i = 2; $i <= 5; $i++) { - print "\n" ; - } - - ?> - -
Key Size*
Certificate Use:*
  
* Fields are required
- - &1");