Subversion Repositories ALCASAR

Rev

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

Rev 2277 Rev 2297
Line 434... Line 434...
434
	<tr><th><?php echo $l_import_cert;?></th></tr>
434
	<tr><th><?php echo $l_import_cert;?></th></tr>
435
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
435
	<tr bgcolor="#FFCC66"><td><img src="/images/pix.gif" width="1" height="2"></td></tr>
436
</table>
436
</table>
437
<table width="100%" border="1" cellspacing="0" cellpadding="0">
437
<table width="100%" border="1" cellspacing="0" cellpadding="0">
438
	<tr><td>
438
	<tr><td>
439
	<form method="post" action="network.php" enctype="multipart/form-data">
439
			<form method="post" action="network.php" enctype="multipart/form-data">
440
	<?php echo $l_private_key;?><input type="file" name="key"><br>
440
			<?php echo $l_private_key;?><input type="file" name="key"><br>
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
<?php
-
 
447
$cert_subject = exec("/bin/openssl x509 -noout -subject -in /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
 
446
 
-
 
447
			<?php
-
 
448
			$certificateInfos = openssl_x509_parse(file_get_contents('/etc/pki/tls/certs/alcasar.crt'));
-
 
449
 
-
 
450
			$cert_expiration_date = date('d-m-Y H:i:s', $certificateInfos['validTo_time_t']);
-
 
451
			$domain               = $certificateInfos['subject']['CN'];
-
 
452
			$organization         = (isset($certificateInfos['subject']['O'])) ? $certificateInfos['subject']['O'] : '';
-
 
453
			$CAdomain             = $certificateInfos['issuer']['CN'];
-
 
454
			$CAorganization       = (isset($certificateInfos['issuer']['O'])) ? $certificateInfos['issuer']['O'] : '';
-
 
455
			?>
455
	echo "<br>";
456
			<br>
456
	echo "<h3>".$l_current_certificate."</h3>";
457
			<h3><?= $l_current_certificate ?></h3>
457
	echo "Expiration Date : ".$cert_expiration_date."<br>";
458
			Expiration Date : <?= $cert_expiration_date ?><br>
458
	echo "Common name : ".$domain."<br>";
459
			Common name : <?= $domain ?><br>
459
	echo "Organization : ".$organization."<br/>";
460
			Organization : <?= $organization ?><br/>
460
	echo "<h4>". $l_validated ."</h4>";
461
			<h4><?=  $l_validated ?></h4>
461
	echo "Common name : ".$CAdomain."<br>";
462
			Common name : <?= $CAdomain ?><br>
462
	echo "Organization : ".$CAorganization."<br>";
463
			Organization : <?= $CAorganization ?><br>
463
?>
-
 
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>
469
	</td>
469
		</td>
470
	</tr>
470
	</tr>
471
</table>
471
</table>
472
</body>
472
</body>
473
</html>
473
</html>
474
 
474