Remove Create and Download Certificate

This commit is contained in:
John Crisp
2021-04-02 13:22:32 +02:00
parent aaa6d96ac5
commit 3ccd6eec38

View File

@@ -209,7 +209,7 @@ switch ($form_stage) {
<p><form action='<?php echo $PHP_SELF?>' method=post>
<?php echo $hidden_fields ?>
<input type=hidden name=form_stage value=final>
<input type=submit name=submit value='Yes. Create and Download' >&nbsp;
<!-- <input type=submit name=submit value='Yes. Create and Download' >&nbsp; -->
<input type=submit name=submit value='Yes. Just Create' >&nbsp;
<input type=submit name=submit value='Go Back'>
</form>
@@ -263,12 +263,18 @@ switch ($form_stage) {
}
}
// This section is disabled in the form above
// If we do Download it does not return to Create New cert
// I believe this is because the upload function messes the http headers
// There may be a solution but I haven't got one
if ($submit == "Yes. Create and Download") {
switch ($cert_type) {
case 'server':
# upload(array("$config[private_dir]/$serial-key.pem","$config[new_certs_dir]/$serial.pem",$config['cacert_pem']), "$common_name ($email).pem",'application/pkix-cert');
upload(array($config['private_dir'] . "/$serial-key.pem",$config['new_certs_dir'] . "/$serial.pem",$config['cacert_pem']), $rec['common_name'] . "-Bundle.pem", 'application/pkix-cert');
break;
break; # << Here
case 'email':
case 'email_signing':
case 'time_stamping':
@@ -277,7 +283,7 @@ switch ($form_stage) {
case 'vpn_server':
# upload("$config[pfx_dir]/$serial.pfx", "$common_name ($email).p12", 'application/x-pkcs12');
upload($config['pfx_dir'] . "/$serial.pfx", $rec['common_name'] . ".p12", 'application/x-pkcs12');
break;
break; # << here
}
# Clear common_name fields