Subversion Repositories ALCASAR

Rev

Rev 2277 | Rev 2299 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 2277 Rev 2297
Line 441... Line 441...
441
	<?php echo $l_certificate;?><input type="file" name="crt"><br>
441
			<?php echo $l_certificate;?><input type="file" name="crt"><br>
442
	<?php echo $l_server_chain;?><input type="file" name="sc">
442
			<?php echo $l_server_chain;?><input type="file" name="sc">
443
	<input type="hidden" name="MAX_FILE_SIZE" value=<?php echo $maxsize;?>><br>
443
			<input type="hidden" name="MAX_FILE_SIZE" value=<?php echo $maxsize;?>><br>
444
	<input type="submit" <?php echo "value=\"".$l_import."\""?>>
444
			<input type="submit" <?php echo "value=\"".$l_import."\""?>>
445
	</form>
445
			</form>
-
 
446
 
446
<?php
447
			<?php
447
$cert_subject = exec("/bin/openssl x509 -noout -subject -in /etc/pki/tls/certs/alcasar.crt");
448
			$certificateInfos = openssl_x509_parse(file_get_contents('/etc/pki/tls/certs/alcasar.crt'));
448
$cert_issuer = exec("/bin/openssl x509 -noout -issuer -in /etc/pki/tls/certs/alcasar.crt");
-
 
449
$cert_expiration_date = exec("/bin/openssl x509 -noout -dates -in /etc/pki/tls/certs/alcasar.crt|grep After|cut -d\"=\" -f2");
-
 
450
$domain = exec("echo $cert_subject | sed -n '/^subject/s/^.*CN=//p' | cut -d'/' -f 1");
-
 
451
$organization = exec("echo $cert_subject | sed -n '/^subject/s/^.*O=//p' | cut -d'/' -f 1");
-
 
452
$CAdomain = exec("echo $cert_issuer | sed -n '/^issuer/s/^.*CN=//p' | cut -d'/' -f 1");
-
 
453
$CAorganization = exec("echo $cert_issuer | sed -n '/^issuer/s/^.*O=//p' | cut -d'/' -f 1");
-
 
454
 
449
 
455
	echo "<br>";
-
 
456
	echo "<h3>".$l_current_certificate."</h3>";
-
 
457
	echo "Expiration Date : ".$cert_expiration_date."<br>";
450
			$cert_expiration_date = date('d-m-Y H:i:s', $certificateInfos['validTo_time_t']);
458
	echo "Common name : ".$domain."<br>";
451
			$domain               = $certificateInfos['subject']['CN'];
459
	echo "Organization : ".$organization."<br/>";
452
			$organization         = (isset($certificateInfos['subject']['O'])) ? $certificateInfos['subject']['O'] : '';
460
	echo "<h4>". $l_validated ."</h4>";
-
 
461
	echo "Common name : ".$CAdomain."<br>";
453
			$CAdomain             = $certificateInfos['issuer']['CN'];
462
	echo "Organization : ".$CAorganization."<br>";
454
			$CAorganization       = (isset($certificateInfos['issuer']['O'])) ? $certificateInfos['issuer']['O'] : '';
463
?>
455
			?>
-
 
456
			<br>
-
 
457
			<h3><?= $l_current_certificate ?></h3>
-
 
458
			Expiration Date : <?= $cert_expiration_date ?><br>
-
 
459
			Common name : <?= $domain ?><br>
-
 
460
			Organization : <?= $organization ?><br/>
-
 
461
			<h4><?=  $l_validated ?></h4>
-
 
462
			Common name : <?= $CAdomain ?><br>
-
 
463
			Organization : <?= $CAorganization ?><br>
464
	</td><td>
464
			</td><td>
465
	<form method="post" action="network.php">
465
			<form method="post" action="network.php">
466
	<input type="hidden" name="default">
466
			<input type="hidden" name="default">
467
	<input type="submit" <?php echo "value=\"".$l_default_cert."\""; if(!file_exists("/etc/pki/tls/certs/alcasar.crt.old") || !file_exists("/etc/pki/tls/private/alcasar.key.old")){ echo " disabled";}?>>
467
			<input type="submit" <?php echo "value=\"".$l_default_cert."\""; if(!file_exists("/etc/pki/tls/certs/alcasar.crt.old") || !file_exists("/etc/pki/tls/private/alcasar.key.old")){ echo " disabled";}?>>
468
	</form>
468
			</form>