Format with CodeSniffer --standard=PSR2
This commit is contained in:
11
about.php
11
about.php
@@ -1,31 +1,32 @@
|
||||
<?php
|
||||
|
||||
|
||||
include('./config.php');
|
||||
include('./include/my_functions.php');
|
||||
include('./include/common.php');
|
||||
|
||||
printHeader('about');
|
||||
|
||||
?>
|
||||
|
||||
<p>
|
||||
PHPki is an <a href=http://www.opensource.org target=_blank>Open Source</a>
|
||||
Web application for managing a <a href=<?php echo BASE_URL?>help/glossary.html#PKI target=help/glossary>
|
||||
Public Key Infrastructure</a> within a small organizations. PHPki acts as a
|
||||
mechanism for the centralized creation and management of digital certificates.
|
||||
PHPki is capable of managing certificates for multiple organizations or user
|
||||
accounts.
|
||||
accounts.</p>
|
||||
|
||||
<p>
|
||||
PHPki requires the Apache Web Server, the <href=http://www.php.net target=_blank>PHP</a> Scripting Language, and <href=http://www.openssl.org target=_blank>
|
||||
OpenSSL</a>, all of which are included with any major
|
||||
<a href=http://www.linux.org target=_blank> Linux Operating System</a>
|
||||
<a href=http://www.redhat.com target=_blank>distribution</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
This software may be freely redistributed under the terms of the
|
||||
<a href=http://www.gnu.org target=_blank>GNU</a> Public
|
||||
License provided this page and all copyright notices remain completely intact.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<center><h4>Copyright: 2003, William E. Roadcap</h4>
|
||||
<form>
|
||||
@@ -36,7 +37,7 @@ readfile("./LICENSE.TXT");
|
||||
</textarea>
|
||||
</form>
|
||||
</center>
|
||||
<p>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
printFooter();
|
||||
|
201
admin/index.php
201
admin/index.php
@@ -10,118 +10,117 @@ $login = gpvar('login');
|
||||
$passwd = gpvar('passwd');
|
||||
$passwdv = gpvar('passwdv');
|
||||
|
||||
switch($stage) {
|
||||
case 'list_users':
|
||||
printHeader('admin');
|
||||
switch ($stage) {
|
||||
case 'list_users':
|
||||
printHeader('admin');
|
||||
print '<p><h3>Contents of '.htvar($config['passwd_file']).' file:</h3><pre>';
|
||||
readfile($config['passwd_file'])
|
||||
|
||||
?>
|
||||
</pre>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
printFooter(false);
|
||||
break;
|
||||
?>
|
||||
</pre>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
printFooter(false);
|
||||
break;
|
||||
|
||||
case 'add_user_form';
|
||||
printHeader('admin');
|
||||
?>
|
||||
<body onLoad="self.focus();document.form.login.focus()">
|
||||
<form action="<?php echo $PHP_SELF?>" method="post" name="form">
|
||||
<table>
|
||||
<th colspan=2><h3>Add User or Change Password</h3></th>
|
||||
<tr><td>User ID</td><td><input type=text name=login value="<?php echo htvar($login)?>" maxlength=15 size=15></td></tr>
|
||||
<tr><td>Password </td><td><input type=password name=passwd value='' size=20></td></tr>
|
||||
<tr><td>Verify Password </td><td><input type=password name=passwdv value='' size=20></td></tr>
|
||||
</table>
|
||||
<input type=hidden name=stage value=add_user>
|
||||
<input type=submit name=submit value='Submit'>
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'add_user_form';
|
||||
printHeader('admin');
|
||||
?>
|
||||
<body onLoad="self.focus();document.form.login.focus()">
|
||||
<form action="<?php echo $PHP_SELF?>" method="post" name="form">
|
||||
<table>
|
||||
<th colspan=2><h3>Add User or Change Password</h3></th>
|
||||
<tr><td>User ID</td><td><input type=text name=login value="<?php echo htvar($login)?>" maxlength=15 size=15></td></tr>
|
||||
<tr><td>Password </td><td><input type=password name=passwd value='' size=20></td></tr>
|
||||
<tr><td>Verify Password </td><td><input type=password name=passwdv value='' size=20></td></tr>
|
||||
</table>
|
||||
<input type=hidden name=stage value=add_user>
|
||||
<input type=submit name=submit value='Submit'>
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'add_user':
|
||||
printHeader('admin');
|
||||
if (! $passwd || ! $passwdv || $passwd != $passwdv || strlen($passwd) < 8) {
|
||||
print "<center><h2><font color=red>Missing or invalid password or password and password verification do not match.</font></h2></center>"
|
||||
case 'add_user':
|
||||
printHeader('admin');
|
||||
if (! $passwd || ! $passwdv || $passwd != $passwdv || strlen($passwd) < 8) {
|
||||
print "<center><h2><font color=red>Missing or invalid password or password and password verification do not match.</font></h2></center>"
|
||||
|
||||
?>
|
||||
<p><center>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=hidden name=stage value=add_user_form>
|
||||
<input type=hidden name=login value="<?php echo htvar($login)?>">
|
||||
<input type=submit name=submit value=Back>
|
||||
</form></center>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
$pwdfile = escapeshellarg($config['passwd_file']);
|
||||
$login = escapeshellarg($login);
|
||||
$passwd = escapeshellarg($passwd);
|
||||
?>
|
||||
<p><center>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=hidden name=stage value=add_user_form>
|
||||
<input type=hidden name=login value="<?php echo htvar($login)?>">
|
||||
<input type=submit name=submit value=Back>
|
||||
</form></center>
|
||||
<?php
|
||||
} else {
|
||||
$pwdfile = escapeshellarg($config['passwd_file']);
|
||||
$login = escapeshellarg($login);
|
||||
$passwd = escapeshellarg($passwd);
|
||||
|
||||
print 'Results of htpasswd command:<br>';
|
||||
system("htpasswd -bm $pwdfile $login $passwd 2>&1")
|
||||
?>
|
||||
<p>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
printFooter();
|
||||
break;
|
||||
print 'Results of htpasswd command:<br>';
|
||||
system("htpasswd -bm $pwdfile $login $passwd 2>&1")
|
||||
?>
|
||||
<p>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
printFooter();
|
||||
break;
|
||||
|
||||
case 'del_user_form';
|
||||
printHeader('admin');
|
||||
?>
|
||||
<body onLoad="self.focus();document.form.login.focus();">
|
||||
<form action="<?php echo $PHP_SELF?>" method="post" name="form">
|
||||
<table>
|
||||
<th colspan=2><h3>Remove User</h3></th>
|
||||
<tr><td>User ID</td><td><input type=text name=login value="<?php echo htvar($login)?>" maxlength=15 size=15></td></tr>
|
||||
</table>
|
||||
<input type=hidden name=stage value=del_user>
|
||||
<input type=submit name=submit value='Submit'>
|
||||
</form>
|
||||
<?php
|
||||
printFooter();
|
||||
break;
|
||||
case 'del_user':
|
||||
printHeader('admin');
|
||||
case 'del_user_form';
|
||||
printHeader('admin');
|
||||
?>
|
||||
<body onLoad="self.focus();document.form.login.focus();">
|
||||
<form action="<?php echo $PHP_SELF?>" method="post" name="form">
|
||||
<table>
|
||||
<th colspan=2><h3>Remove User</h3></th>
|
||||
<tr><td>User ID</td><td><input type=text name=login value="<?php echo htvar($login)?>" maxlength=15 size=15></td></tr>
|
||||
</table>
|
||||
<input type=hidden name=stage value=del_user>
|
||||
<input type=submit name=submit value='Submit'>
|
||||
</form>
|
||||
<?php
|
||||
printFooter();
|
||||
break;
|
||||
case 'del_user':
|
||||
printHeader('admin');
|
||||
|
||||
$pwdfile = escapeshellarg($config['passwd_file']);
|
||||
$login = escapeshellarg($login);
|
||||
$pwdfile = escapeshellarg($config['passwd_file']);
|
||||
$login = escapeshellarg($login);
|
||||
|
||||
print 'Results of htpasswd command:<br>';
|
||||
system("htpasswd -D $pwdfile $login 2>&1")
|
||||
?>
|
||||
<p>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
printFooter();
|
||||
break;
|
||||
print 'Results of htpasswd command:<br>';
|
||||
system("htpasswd -D $pwdfile $login 2>&1")
|
||||
?>
|
||||
<p>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
printFooter();
|
||||
break;
|
||||
|
||||
default:
|
||||
printHeader('admin');
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<table class=menu><th class=menu>SYSADMIN MENU</th>
|
||||
<tr><td class=menu style="padding-left: 1em;"><table>
|
||||
<tr><td class=menu-pad><a href=<?php echo $PHP_SELF?>?stage=add_user_form>Add User or Change Password</a></td></tr>
|
||||
<tr><td class=menu-pad><a href=<?php echo $PHP_SELF?>?stage=del_user_form>Remove User</a></td></tr>
|
||||
<tr><td class=menu-pad><a href=<?php echo $PHP_SELF?>?stage=list_users>List Password File Contents</a></td></tr>
|
||||
</table></td></tr>
|
||||
</table>
|
||||
</center>
|
||||
<br><br>
|
||||
<?php
|
||||
printFooter();
|
||||
default:
|
||||
printHeader('admin');
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<table class=menu><th class=menu>SYSADMIN MENU</th>
|
||||
<tr><td class=menu style="padding-left: 1em;"><table>
|
||||
<tr><td class=menu-pad><a href=<?php echo $PHP_SELF?>?stage=add_user_form>Add User or Change Password</a></td></tr>
|
||||
<tr><td class=menu-pad><a href=<?php echo $PHP_SELF?>?stage=del_user_form>Remove User</a></td></tr>
|
||||
<tr><td class=menu-pad><a href=<?php echo $PHP_SELF?>?stage=list_users>List Password File Contents</a></td></tr>
|
||||
</table></td></tr>
|
||||
</table>
|
||||
</center>
|
||||
<br><br>
|
||||
<?php
|
||||
printFooter();
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -1,3 +1,2 @@
|
||||
<?php
|
||||
header("Location: ./../index.php");
|
||||
?>
|
||||
|
268
ca/main.php
268
ca/main.php
@@ -8,161 +8,159 @@ include("../include/openssl_functions.php");
|
||||
|
||||
$stage = gpvar('stage');
|
||||
|
||||
switch($stage) {
|
||||
switch ($stage) {
|
||||
case 'dl_takey':
|
||||
upload($config['private_dir'] . '/takey.pem', $config['ca_prefix'] . 'takey.pem', 'application/octet-stream');
|
||||
break;
|
||||
|
||||
case 'dl_takey':
|
||||
upload($config['private_dir'] . '/takey.pem', $config['ca_prefix'] . 'takey.pem', 'application/octet-stream');
|
||||
break;
|
||||
case 'dl_dhparam':
|
||||
upload($config['private_dir'] . '/dhparam2048.pem', $config['ca_prefix'] . 'dhparam2048.pem', 'application/octet-stream');
|
||||
break;
|
||||
|
||||
case 'dl_dhparam':
|
||||
upload($config['private_dir'] . '/dhparam2048.pem', $config['ca_prefix'] . 'dhparam2048.pem', 'application/octet-stream');
|
||||
break;
|
||||
case 'dl_root':
|
||||
upload($config['cacert_pem'], $config['ca_prefix'] . 'cacert.crt', 'application/x-x509-ca-cert');
|
||||
break;
|
||||
|
||||
case 'dl_root':
|
||||
upload($config['cacert_pem'], $config['ca_prefix'] . 'cacert.crt', 'application/x-x509-ca-cert');
|
||||
break;
|
||||
case 'dl_crl':
|
||||
upload($config['cacrl_der'], $config['ca_prefix'] . 'cacrl.crl', 'application/pkix-crl');
|
||||
break;
|
||||
|
||||
case 'dl_crl':
|
||||
upload($config['cacrl_der'], $config['ca_prefix'] . 'cacrl.crl', 'application/pkix-crl');
|
||||
break;
|
||||
case 'dl_crl_pem':
|
||||
upload($config['cacrl_pem'], $config['ca_prefix'] . 'cacrl.crl', 'application/octet-stream');
|
||||
break;
|
||||
|
||||
case 'dl_crl_pem':
|
||||
upload($config['cacrl_pem'], $config['ca_prefix'] . 'cacrl.crl', 'application/octet-stream');
|
||||
break;
|
||||
case 'gen_crl':
|
||||
list($ret,$errtxt) = CA_generate_crl();
|
||||
|
||||
case 'gen_crl':
|
||||
list($ret,$errtxt) = CA_generate_crl();
|
||||
printHeader(false);
|
||||
|
||||
printHeader(false);
|
||||
if ($ret) {
|
||||
?>
|
||||
<center><h2>Certificate Revocation List Updated</h2></center>
|
||||
<br>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type="submit" name="submit" value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
print '<pre>'.CA_crl_text().'</pre>';
|
||||
} else {
|
||||
?>
|
||||
<font color="#ff0000">
|
||||
<h2>There was an error updating the Certificate Revocation List.</h2></font><br>
|
||||
<blockquote>
|
||||
<h3>Debug Info:</h3>
|
||||
<pre><?php echo $errtxt?></pre>
|
||||
</blockquote>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<br>
|
||||
<input type="submit" name="submit" value="Back to Menu">
|
||||
<br>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
break;
|
||||
|
||||
if ($ret) {
|
||||
?>
|
||||
<center><h2>Certificate Revocation List Updated</h2></center>
|
||||
<br>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type="submit" name="submit" value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
print '<pre>'.CA_crl_text().'</pre>';
|
||||
}
|
||||
else {
|
||||
?>
|
||||
<font color="#ff0000">
|
||||
<h2>There was an error updating the Certificate Revocation List.</h2></font><br>
|
||||
<blockquote>
|
||||
<h3>Debug Info:</h3>
|
||||
<pre><?php echo $errtxt?></pre>
|
||||
</blockquote>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<br>
|
||||
<input type="submit" name="submit" value="Back to Menu">
|
||||
<br>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
break;
|
||||
case 'display_takey':
|
||||
printHeader(false);
|
||||
|
||||
case 'display_takey':
|
||||
printHeader(false);
|
||||
?>
|
||||
<center><h2>OpenVPN pre-shared Key</h2></center>
|
||||
<br>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type="submit" name="submit" value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
print '<pre>'.ta_key_text().'</pre>';
|
||||
break;
|
||||
|
||||
?>
|
||||
<center><h2>OpenVPN pre-shared Key</h2></center>
|
||||
<br>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type="submit" name="submit" value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
print '<pre>'.ta_key_text().'</pre>';
|
||||
break;
|
||||
case 'display_dhparam':
|
||||
printHeader(false);
|
||||
|
||||
case 'display_dhparam':
|
||||
printHeader(false);
|
||||
?>
|
||||
<center><h2>OpenVPN Diffie-Helman parameters</h2></center>
|
||||
<br>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
print '<pre>'.dhparam_text().'</pre>';
|
||||
break;
|
||||
|
||||
?>
|
||||
<center><h2>OpenVPN Diffie-Helman parameters</h2></center>
|
||||
<br>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
print '<pre>'.dhparam_text().'</pre>';
|
||||
break;
|
||||
case 'display_root_pem':
|
||||
printHeader(false);
|
||||
|
||||
case 'display_root_pem':
|
||||
printHeader(false);
|
||||
|
||||
?>
|
||||
<center><h2>Root certificate file (PEM Encoded)</h2></center>
|
||||
<br>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type="submit" name="submit" value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
print '<pre>'.root_pem_text().'</pre>';
|
||||
break;
|
||||
?>
|
||||
<center><h2>Root certificate file (PEM Encoded)</h2></center>
|
||||
<br>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type="submit" name="submit" value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
print '<pre>'.root_pem_text().'</pre>';
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
printHeader('ca');
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<table class="menu" width="600px"><th class="menu" colspan="2"><big>CERTIFICATE MANAGEMENT MENU</big></th>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;" width="33%">
|
||||
<a href="request_cert.php">Create a New Certificate</a></td>
|
||||
<td>Use the <strong><cite>Certificate Request Form</cite></strong> to create and download new digital certificates.
|
||||
You may create certificates in succession without re-entering the entire form
|
||||
by clicking the "<strong>Go Back</strong>" button after each certificate is created.</td></tr>
|
||||
default:
|
||||
printHeader('ca');
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<table class="menu" width="600px"><th class="menu" colspan="2"><big>CERTIFICATE MANAGEMENT MENU</big></th>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;" width="33%">
|
||||
<a href="request_cert.php">Create a New Certificate</a></td>
|
||||
<td>Use the <strong><cite>Certificate Request Form</cite></strong> to create and download new digital certificates.
|
||||
You may create certificates in succession without re-entering the entire form
|
||||
by clicking the "<strong>Go Back</strong>" button after each certificate is created.</td></tr>
|
||||
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="manage_certs.php">Manage Certificates</a></td>
|
||||
<td>Conveniently view, download, revoke, and renew your existing certificates using the
|
||||
<strong><cite>Certificate Management Control Panel</cite></strong>.</td></tr>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="manage_certs.php">Manage Certificates</a></td>
|
||||
<td>Conveniently view, download, revoke, and renew your existing certificates using the
|
||||
<strong><cite>Certificate Management Control Panel</cite></strong>.</td></tr>
|
||||
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=gen_crl">Update & View the Certificate Revocation List</a></td>
|
||||
<td>Some applications automagically reference the Certificate Revocation List to determine
|
||||
certificate validity. It is not necessary to perform this update function, as the CRL is
|
||||
updated when certificates are revoked. However, doing so is harmless.
|
||||
<a href="../help.php" target="_help">Read the online help</a> to learn more about this.</td></tr>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=gen_crl">Update & View the Certificate Revocation List</a></td>
|
||||
<td>Some applications automagically reference the Certificate Revocation List to determine
|
||||
certificate validity. It is not necessary to perform this update function, as the CRL is
|
||||
updated when certificates are revoked. However, doing so is harmless.
|
||||
<a href="../help.php" target="_help">Read the online help</a> to learn more about this.</td></tr>
|
||||
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_root">Download the Root Certificate</a><br><br>
|
||||
<a href="<?php echo $PHP_SELF?>?stage=display_root_pem">Display the Root Certificate (PEM Encoded)</a></td>
|
||||
<td>The "Root" certificate must be installed before using any of the
|
||||
certificates issued here. <a href="../help.php" target="_help">Read the online help</a>
|
||||
to learn more about this.</td></tr>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_root">Download the Root Certificate</a><br><br>
|
||||
<a href="<?php echo $PHP_SELF?>?stage=display_root_pem">Display the Root Certificate (PEM Encoded)</a></td>
|
||||
<td>The "Root" certificate must be installed before using any of the
|
||||
certificates issued here. <a href="../help.php" target="_help">Read the online help</a>
|
||||
to learn more about this.</td></tr>
|
||||
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_crl">Download the Certificate Revocation List</a><br><br>
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_crl_pem">Download in PEM format.</a></td>
|
||||
<td>This is the official list of revoked certificates. Using this list with your e-mail or
|
||||
browser application is optional. Some applications will automagically reference this list.</td></tr>
|
||||
<?php
|
||||
if (file_exists($config['private_dir'] . '/takey.pem')) {
|
||||
?>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_takey">Download the static pre-shared key</a><br><br>
|
||||
<a href="<?php echo $PHP_SELF?>?stage=display_takey">Display the static pre-shared key</a></td>
|
||||
<td>This key can be used with OpenVPN as a standalone auth mechanism, or as an additional TLS authentication.</td></tr>
|
||||
<?php }
|
||||
?>
|
||||
<?php if (file_exists ($config['private_dir'] . '/dhparam2048.pem')) {
|
||||
?>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_dhparam">Download the Diffie-Hellman parameters</a><br><br>
|
||||
<a href="<?php echo $PHP_SELF?>?stage=display_dhparam">Display the Diffie-Hellman parameters</a></td>
|
||||
<td>This file is used by OpenVPN for the hand-shake. The Diffie-Hellman key agreement
|
||||
protocol enables two communication partners to exchange a secret key safely.</td></tr>
|
||||
<?php }
|
||||
?>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_crl">Download the Certificate Revocation List</a><br><br>
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_crl_pem">Download in PEM format.</a></td>
|
||||
<td>This is the official list of revoked certificates. Using this list with your e-mail or
|
||||
browser application is optional. Some applications will automagically reference this list.</td></tr>
|
||||
<?php
|
||||
if (file_exists($config['private_dir'] . '/takey.pem')) {
|
||||
?>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_takey">Download the static pre-shared key</a><br><br>
|
||||
<a href="<?php echo $PHP_SELF?>?stage=display_takey">Display the static pre-shared key</a></td>
|
||||
<td>This key can be used with OpenVPN as a standalone auth mechanism, or as an additional TLS authentication.</td></tr>
|
||||
<?php }
|
||||
?>
|
||||
<?php if (file_exists($config['private_dir'] . '/dhparam2048.pem')) {
|
||||
?>
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href="<?php echo $PHP_SELF?>?stage=dl_dhparam">Download the Diffie-Hellman parameters</a><br><br>
|
||||
<a href="<?php echo $PHP_SELF?>?stage=display_dhparam">Display the Diffie-Hellman parameters</a></td>
|
||||
<td>This file is used by OpenVPN for the hand-shake. The Diffie-Hellman key agreement
|
||||
protocol enables two communication partners to exchange a secret key safely.</td></tr>
|
||||
<?php }
|
||||
?>
|
||||
|
||||
</table>
|
||||
</center>
|
||||
<br><br>
|
||||
<?php
|
||||
printFooter();
|
||||
</table>
|
||||
</center>
|
||||
<br><br>
|
||||
<?php
|
||||
printFooter();
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -23,403 +23,402 @@ $show_expired = gpvar('show_expired');
|
||||
|
||||
# Prevent handling certs that don't belong to user
|
||||
if ($serial && CAdb_issuer($serial) != $PHPki_user && ! in_array($PHPki_user, $PHPki_admins)) {
|
||||
$stage = 'goaway';
|
||||
$stage = 'goaway';
|
||||
}
|
||||
|
||||
if ( !($show_valid.$show_revoked.$show_expired) ) {
|
||||
$show_valid = 'V';
|
||||
$show_revoked = 'R';
|
||||
$show_expired = 'E';
|
||||
if (!($show_valid.$show_revoked.$show_expired)) {
|
||||
$show_valid = 'V';
|
||||
$show_revoked = 'R';
|
||||
$show_expired = 'E';
|
||||
}
|
||||
|
||||
$qstr_filter = 'search='.htvar($search) . '&' . "show_valid=$show_valid&" . "show_revoked=$show_revoked&" . "show_expired=$show_expired&";
|
||||
$qstr_filter = 'search='.htvar($search) . '&' . "show_valid=$show_valid&" . "show_revoked=$show_revoked&" . "show_expired=$show_expired&";
|
||||
|
||||
$qstr_sort = "sortfield=$sortfield&ascdec=$ascdec";
|
||||
|
||||
switch ($stage) {
|
||||
case 'goaway':
|
||||
printHeader(false);
|
||||
?>
|
||||
case 'goaway':
|
||||
printHeader(false);
|
||||
?>
|
||||
|
||||
<p><center><h1><font color="red">YOU ARE A VERY BAD BOY!</font></h2></center>
|
||||
<p><center><h1><font color="red">YOU ARE A VERY BAD BOY!</font></h2></center>
|
||||
|
||||
<?php
|
||||
break;
|
||||
<?php
|
||||
break;
|
||||
|
||||
case 'display':
|
||||
printHeader(false);
|
||||
?>
|
||||
case 'display':
|
||||
printHeader(false);
|
||||
?>
|
||||
|
||||
<center><h2>Certificate Details</h2></center>
|
||||
<center><font color="#0000AA"><h3>(#<?php echo $serial?>)<br><?php echo htvar(CA_cert_cname($serial).' <'.CA_cert_email($serial).'>')?> </h3></font></center>
|
||||
|
||||
<?php
|
||||
|
||||
if ($revoke_date = CAdb_is_revoked($serial)) {
|
||||
print '<center><font color=red><h2>REVOKED '.$revoke_date.'</h2></font></center>';
|
||||
}
|
||||
|
||||
print '<pre>'.CA_cert_text($serial).'</pre>';
|
||||
break;
|
||||
|
||||
case 'dl-confirm':
|
||||
printHeader('ca');
|
||||
|
||||
$rec = CAdb_get_entry($serial);
|
||||
|
||||
?>
|
||||
<h3>You are about to download the <font color=red>PRIVATE</font> certificate key for <?php echo $rec['common_name'].' <'.$rec['email'].'> '?></h3>
|
||||
<h3><font color="red">DO NOT DISTRIBUTE THIS FILE TO THE PUBLIC!</font></h3>
|
||||
<form action="<?php echo $PHP_SELF.'?stage=download&serial='.$serial.'&'.$qstr_sort.'&'.$qstr_filter?>" method="post">
|
||||
<strong>File type: </strong>
|
||||
<select name="dl_type">
|
||||
<option value="PKCS#12">PKCS#12 Bundle</option>
|
||||
<option value="PEMCERT">PEM Certificate</option>
|
||||
<option value="PEMKEY">PEM Key</option>
|
||||
<option value="PEMBUNDLE">PEM Bundle</option>
|
||||
<option value="PEMCABUNDLE">PEM Bundle w/Root</option>
|
||||
</select>
|
||||
<input type="submit" name="submit" value="Download">
|
||||
or
|
||||
<input type="submit" name="submit" value="Go Back">
|
||||
</form>
|
||||
<center><h2>Certificate Details</h2></center>
|
||||
<center><font color="#0000AA"><h3>(#<?php echo $serial?>)<br><?php echo htvar(CA_cert_cname($serial).' <'.CA_cert_email($serial).'>')?> </h3></font></center>
|
||||
|
||||
<?php
|
||||
|
||||
break;
|
||||
if ($revoke_date = CAdb_is_revoked($serial)) {
|
||||
print '<center><font color=red><h2>REVOKED '.$revoke_date.'</h2></font></center>';
|
||||
}
|
||||
|
||||
case 'download':
|
||||
if (strstr($submit, "Back")) $dl_type = '';
|
||||
print '<pre>'.CA_cert_text($serial).'</pre>';
|
||||
break;
|
||||
|
||||
$rec = CAdb_get_entry($serial);
|
||||
case 'dl-confirm':
|
||||
printHeader('ca');
|
||||
|
||||
switch ($dl_type) {
|
||||
case 'PKCS#12':
|
||||
upload($config['pfx_dir'] . "/$serial.pfx", "$rec[common_name].p12", 'application/x-pkcs12');
|
||||
break;
|
||||
case 'PEMCERT':
|
||||
upload($config['new_certs_dir'] . "/$serial.pem", "$rec[common_name]-cert.pem",'application/pkix-cert');
|
||||
break;
|
||||
case 'PEMKEY':
|
||||
upload($config['private_dir'] . "/$serial-key.pem", "$rec[common_name]-key.pem",'application/octet-stream');
|
||||
break;
|
||||
case 'PEMBUNDLE':
|
||||
upload(array($config['private_dir'] . "/$serial-key.pem",$config['new_certs_dir'] . "/$serial.pem"), $rec['common_name'] . "-Bundle.pem",'application/octet-stream');
|
||||
break;
|
||||
case 'PEMCABUNDLE':
|
||||
upload(array($config['private_dir'] . "/$serial-key.pem",$config['new_certs_dir'] . "/$serial.pem", $config['cacert_pem']), $rec['common_name'] . "-CABundle.pem",'application/octet-stream');
|
||||
break;
|
||||
default:
|
||||
header("Location: ${PHP_SELF}?$qstr_sort&$qstr_filter");
|
||||
}
|
||||
break;
|
||||
$rec = CAdb_get_entry($serial);
|
||||
|
||||
case 'revoke-form':
|
||||
$rec = CAdb_get_entry($serial);
|
||||
?>
|
||||
<h3>You are about to download the <font color=red>PRIVATE</font> certificate key for <?php echo $rec['common_name'].' <'.$rec['email'].'> '?></h3>
|
||||
<h3><font color="red">DO NOT DISTRIBUTE THIS FILE TO THE PUBLIC!</font></h3>
|
||||
<form action="<?php echo $PHP_SELF.'?stage=download&serial='.$serial.'&'.$qstr_sort.'&'.$qstr_filter?>" method="post">
|
||||
<strong>File type: </strong>
|
||||
<select name="dl_type">
|
||||
<option value="PKCS#12">PKCS#12 Bundle</option>
|
||||
<option value="PEMCERT">PEM Certificate</option>
|
||||
<option value="PEMKEY">PEM Key</option>
|
||||
<option value="PEMBUNDLE">PEM Bundle</option>
|
||||
<option value="PEMCABUNDLE">PEM Bundle w/Root</option>
|
||||
</select>
|
||||
<input type="submit" name="submit" value="Download">
|
||||
or
|
||||
<input type="submit" name="submit" value="Go Back">
|
||||
</form>
|
||||
|
||||
printHeader('ca');
|
||||
<?php
|
||||
|
||||
?>
|
||||
<h4>You are about to <font color=red>REVOKE</font> the following certificate:
|
||||
<hr>
|
||||
<table width="500px"><tr>
|
||||
<td width="25%" style="white-space: nowrap">
|
||||
<p align="right">
|
||||
break;
|
||||
|
||||
case 'download':
|
||||
if (strstr($submit, "Back")) {
|
||||
$dl_type = '';
|
||||
}
|
||||
|
||||
$rec = CAdb_get_entry($serial);
|
||||
|
||||
switch ($dl_type) {
|
||||
case 'PKCS#12':
|
||||
upload($config['pfx_dir'] . "/$serial.pfx", "$rec[common_name].p12", 'application/x-pkcs12');
|
||||
break;
|
||||
case 'PEMCERT':
|
||||
upload($config['new_certs_dir'] . "/$serial.pem", "$rec[common_name]-cert.pem", 'application/pkix-cert');
|
||||
break;
|
||||
case 'PEMKEY':
|
||||
upload($config['private_dir'] . "/$serial-key.pem", "$rec[common_name]-key.pem", 'application/octet-stream');
|
||||
break;
|
||||
case 'PEMBUNDLE':
|
||||
upload(array($config['private_dir'] . "/$serial-key.pem",$config['new_certs_dir'] . "/$serial.pem"), $rec['common_name'] . "-Bundle.pem", 'application/octet-stream');
|
||||
break;
|
||||
case 'PEMCABUNDLE':
|
||||
upload(array($config['private_dir'] . "/$serial-key.pem",$config['new_certs_dir'] . "/$serial.pem", $config['cacert_pem']), $rec['common_name'] . "-CABundle.pem", 'application/octet-stream');
|
||||
break;
|
||||
default:
|
||||
header("Location: ${PHP_SELF}?$qstr_sort&$qstr_filter");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'revoke-form':
|
||||
$rec = CAdb_get_entry($serial);
|
||||
|
||||
printHeader('ca');
|
||||
|
||||
?>
|
||||
<h4>You are about to <font color=red>REVOKE</font> the following certificate:
|
||||
<hr>
|
||||
<table width="500px"><tr>
|
||||
<td width="25%" style="white-space: nowrap">
|
||||
<p align="right">
|
||||
Serial Number<br>
|
||||
User's Name<br>
|
||||
Email Address<br>
|
||||
Organization<br>
|
||||
Department/Unit<br>
|
||||
Locality<br>
|
||||
State/Province<br>
|
||||
Country<br>
|
||||
</p>
|
||||
</td>
|
||||
<?php
|
||||
User's Name<br>
|
||||
Email Address<br>
|
||||
Organization<br>
|
||||
Department/Unit<br>
|
||||
Locality<br>
|
||||
State/Province<br>
|
||||
Country<br>
|
||||
</p>
|
||||
</td>
|
||||
<?php
|
||||
|
||||
print '
|
||||
<td>
|
||||
'.htvar($rec['serial']).'<br>
|
||||
'.htvar($rec['common_name']).'<br>
|
||||
'.htvar($rec['email']).'<br>
|
||||
'.htvar($rec['organization']).'<br>
|
||||
'.htvar($rec['unit']).'<br>
|
||||
'.htvar($rec['locality']).'<br>
|
||||
'.htvar($rec['province']).'<br>
|
||||
'.htvar($rec['country']).'<br>
|
||||
</td>
|
||||
</tr></table>
|
||||
<h4>Are you sure?</h4>
|
||||
<form action="'.$PHP_SELF.'?'.$qstr_sort.'&'.$qstr_filter.'" method=post>
|
||||
<input type=hidden name=stage value=revoke >
|
||||
<input type=hidden name=serial value='.$serial.' >
|
||||
<input type=submit name=submit value=Yes > 
|
||||
<input type=submit name=submit value=Cancel>
|
||||
</form>';
|
||||
print '
|
||||
<td>
|
||||
'.htvar($rec['serial']).'<br>
|
||||
'.htvar($rec['common_name']).'<br>
|
||||
'.htvar($rec['email']).'<br>
|
||||
'.htvar($rec['organization']).'<br>
|
||||
'.htvar($rec['unit']).'<br>
|
||||
'.htvar($rec['locality']).'<br>
|
||||
'.htvar($rec['province']).'<br>
|
||||
'.htvar($rec['country']).'<br>
|
||||
</td>
|
||||
</tr></table>
|
||||
<h4>Are you sure?</h4>
|
||||
<form action="'.$PHP_SELF.'?'.$qstr_sort.'&'.$qstr_filter.'" method=post>
|
||||
<input type=hidden name=stage value=revoke >
|
||||
<input type=hidden name=serial value='.$serial.' >
|
||||
<input type=submit name=submit value=Yes > 
|
||||
<input type=submit name=submit value=Cancel>
|
||||
</form>';
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'revoke':
|
||||
$ret = true;
|
||||
if ($submit == 'Yes')
|
||||
list($ret, $errtxt) = CA_revoke_cert($serial);
|
||||
case 'revoke':
|
||||
$ret = true;
|
||||
if ($submit == 'Yes') {
|
||||
list($ret, $errtxt) = CA_revoke_cert($serial);
|
||||
}
|
||||
|
||||
if (! $ret) {
|
||||
printHeader('ca');
|
||||
if (! $ret) {
|
||||
printHeader('ca');
|
||||
|
||||
print "<form action=\"$PHP_SELF?stage=revoke-form&serial=$serial&$qstr_sort&$qstr_filter\" method=post>";
|
||||
?>
|
||||
<font color=#ff0000>
|
||||
<h2>There was an error revoking your certificate.</h2></font><br>
|
||||
<blockquote>
|
||||
<h3>Debug Info:</h3>
|
||||
<pre><?php echo $errtxt?></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<input type=submit name=submit value=Back>
|
||||
<p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
header("Location: ${PHP_SELF}?$qstr_sort&$qstr_filter");
|
||||
break;
|
||||
print "<form action=\"$PHP_SELF?stage=revoke-form&serial=$serial&$qstr_sort&$qstr_filter\" method=post>";
|
||||
?>
|
||||
<font color=#ff0000>
|
||||
<h2>There was an error revoking your certificate.</h2></font><br>
|
||||
<blockquote>
|
||||
<h3>Debug Info:</h3>
|
||||
<pre><?php echo $errtxt?></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<input type=submit name=submit value=Back>
|
||||
<p>
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
header("Location: ${PHP_SELF}?$qstr_sort&$qstr_filter");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'renew-form':
|
||||
#
|
||||
# Get last known values submitted by this user. We only really
|
||||
# need the expiry value, but the old cert values will override
|
||||
# the rest.
|
||||
#
|
||||
if (! $submit and file_exists("config/user-${PHPki_user}.php")) {
|
||||
include("config/user-${PHPki_user}.php");
|
||||
}
|
||||
#
|
||||
# Get values from the old certificate.
|
||||
#
|
||||
$rec = CAdb_get_entry($serial);
|
||||
$country = $rec['country'];
|
||||
$province = $rec['province'];
|
||||
$locality = $rec['locality'];
|
||||
$organization = $rec['organization'];
|
||||
$unit = $rec['unit'];
|
||||
$common_name = $rec['common_name'];
|
||||
$email = $rec['email'];
|
||||
case 'renew-form':
|
||||
#
|
||||
# Get last known values submitted by this user. We only really
|
||||
# need the expiry value, but the old cert values will override
|
||||
# the rest.
|
||||
#
|
||||
if (! $submit and file_exists("config/user-${PHPki_user}.php")) {
|
||||
include("config/user-${PHPki_user}.php");
|
||||
}
|
||||
#
|
||||
# Get values from the old certificate.
|
||||
#
|
||||
$rec = CAdb_get_entry($serial);
|
||||
$country = $rec['country'];
|
||||
$province = $rec['province'];
|
||||
$locality = $rec['locality'];
|
||||
$organization = $rec['organization'];
|
||||
$unit = $rec['unit'];
|
||||
$common_name = $rec['common_name'];
|
||||
$email = $rec['email'];
|
||||
|
||||
printHeader('ca');
|
||||
?>
|
||||
<body onLoad="self.focus();document.form.passwd.focus();">
|
||||
printHeader('ca');
|
||||
?>
|
||||
<body onLoad="self.focus();document.form.passwd.focus();">
|
||||
|
||||
<form action="<?php echo $PHP_SELF.'?'.$qstr_sort.'&'.$qstr_filter?>" method=post name=form>
|
||||
<table width=99%>
|
||||
<th colspan="2"><h3>Certificate Renewal Form</h3></th>
|
||||
<form action="<?php echo $PHP_SELF.'?'.$qstr_sort.'&'.$qstr_filter?>" method=post name=form>
|
||||
<table width=99%>
|
||||
<th colspan="2"><h3>Certificate Renewal Form</h3></th>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" style="text-align:center">This will Revoke the old Certificate and Create a new one<br>You can add a password if required</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align:center">This will Revoke the old Certificate and Create a new one<br>You can add a password if required</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="25%">Common Name </td>
|
||||
<td><input type="text"" name="common_name" value="<?php echo htvar($common_name)?>" size="50" maxlength="60" disabled></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="25%">Common Name </td>
|
||||
<td><input type="text"" name="common_name" value="<?php echo htvar($common_name)?>" size="50" maxlength="60" disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>E-mail Address </td>
|
||||
<td><input type="text" name="email" value="<?php echo htvar($email)?>" size="50" maxlength="60" disabled></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>E-mail Address </td>
|
||||
<td><input type="text" name="email" value="<?php echo htvar($email)?>" size="50" maxlength="60" disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Organization </td>
|
||||
<td><input type="text" name="organization" value="<?php echo htvar($organization)?>" size="60" maxlength="60" disabled></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Organization </td>
|
||||
<td><input type="text" name="organization" value="<?php echo htvar($organization)?>" size="60" maxlength="60" disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Department/Unit </td><td><input type="text" name="unit" value="<?php echo htvar($unit) ?>" size="40" maxlength="60" disabled></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Department/Unit </td><td><input type="text" name="unit" value="<?php echo htvar($unit) ?>" size="40" maxlength="60" disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Locality</td><td><input type="text" name="locality" value="<?php echo htvar($locality) ?>" size="30" maxlength="30" disabled></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Locality</td><td><input type="text" name="locality" value="<?php echo htvar($locality) ?>" size="30" maxlength="30" disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>State/Province</td><td><input type="text" name="province" value="<?php echo htvar($province) ?>" size="30" maxlength="30" disabled></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>State/Province</td><td><input type="text" name="province" value="<?php echo htvar($province) ?>" size="30" maxlength="30" disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Country</td>
|
||||
<td><input type="text" name="country" value="<?php echo htvar($country) ?>" size="2" maxlength="2" disabled></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Country</td>
|
||||
<td><input type="text" name="country" value="<?php echo htvar($country) ?>" size="2" maxlength="2" disabled></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Password </td>
|
||||
<td><input type="password" name="passwd" value="<?php echo htvar($passwd) ?>" size="30"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Certificate Password </td>
|
||||
<td><input type="password" name="passwd" value="<?php echo htvar($passwd) ?>" size="30"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Life </td>
|
||||
<td><select name=expiry>
|
||||
<?php
|
||||
<tr>
|
||||
<td>Certificate Life </td>
|
||||
<td><select name=expiry>
|
||||
<?php
|
||||
|
||||
print "<option value=0.083 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Month</option>\n" ;
|
||||
print "<option value=0.25 " . ($expiry == 1 ? "selected='selected'" : "") . " >3 Months</option>\n" ;
|
||||
print "<option value=0.5 " . ($expiry == 1 ? "selected='selected'" : "") . " >6 Months</option>\n" ;
|
||||
print "<option value=1 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Year</option>\n" ;
|
||||
for ( $i = 2 ; $i <= 5 ; $i++ ) {
|
||||
print "<option value=$i " . ($expiry == $i ? "selected='selected'" : "") . " >$i Years</option>\n" ;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<input type="submit" name="submit" value="Submit Request"> 
|
||||
<input type="submit" name="submit" value="Back">
|
||||
<input type="hidden" name="stage" value="renew">
|
||||
<input type="hidden" name="serial" value="<?php echo $serial ?>" >
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
printFooter();
|
||||
break;
|
||||
|
||||
case 'renew':
|
||||
$ret = true;
|
||||
if ($submit == "Submit Request") {
|
||||
list($ret, $errtxt) = CA_renew_cert($serial, $expiry, $passwd);
|
||||
print "<option value=0.083 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Month</option>\n" ;
|
||||
print "<option value=0.25 " . ($expiry == 1 ? "selected='selected'" : "") . " >3 Months</option>\n" ;
|
||||
print "<option value=0.5 " . ($expiry == 1 ? "selected='selected'" : "") . " >6 Months</option>\n" ;
|
||||
print "<option value=1 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Year</option>\n" ;
|
||||
for ($i = 2; $i <= 5; $i++) {
|
||||
print "<option value=$i " . ($expiry == $i ? "selected='selected'" : "") . " >$i Years</option>\n" ;
|
||||
}
|
||||
|
||||
if (! $ret) {
|
||||
printHeader('ca');
|
||||
?>
|
||||
|
||||
print "<form action=\"$PHP_SELF?stage=renew-form&serial=$serial&$qstr_sort&$qstr_filter\" method=post>";
|
||||
?>
|
||||
<font color=#ff0000>
|
||||
<h2>There was an error creating your certificate.</h2>
|
||||
</font><br>
|
||||
<blockquote>
|
||||
<h3>Debug Info:</h3>
|
||||
<pre><?php echo $errtxt?></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<input type="submit" name="submit" value="Back">
|
||||
<p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else {
|
||||
header("Location: $PHP_SELF?$qstr_sort&$qstr_filter");
|
||||
}
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>
|
||||
<input type="submit" name="submit" value="Submit Request"> 
|
||||
<input type="submit" name="submit" value="Back">
|
||||
<input type="hidden" name="stage" value="renew">
|
||||
<input type="hidden" name="serial" value="<?php echo $serial ?>" >
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
break;
|
||||
<?php
|
||||
|
||||
default:
|
||||
printFooter();
|
||||
break;
|
||||
|
||||
printHeader('ca');
|
||||
case 'renew':
|
||||
$ret = true;
|
||||
if ($submit == "Submit Request") {
|
||||
list($ret, $errtxt) = CA_renew_cert($serial, $expiry, $passwd);
|
||||
}
|
||||
|
||||
?>
|
||||
<body onLoad="self.focus();document.filter.search.focus();">
|
||||
<table style="margin:0 auto">
|
||||
<tr><th colspan=9><big>CERTIFICATE MANAGEMENT CONTROL PANEL</big></th></tr>
|
||||
<tr><td colspan=9><center>
|
||||
<form action="<?php echo "$PHP_SELF?$qstr_sort"?>" method="get" name="filter">
|
||||
if (! $ret) {
|
||||
printHeader('ca');
|
||||
|
||||
print "<form action=\"$PHP_SELF?stage=renew-form&serial=$serial&$qstr_sort&$qstr_filter\" method=post>";
|
||||
?>
|
||||
<font color=#ff0000>
|
||||
<h2>There was an error creating your certificate.</h2>
|
||||
</font><br>
|
||||
<blockquote>
|
||||
<h3>Debug Info:</h3>
|
||||
<pre><?php echo $errtxt?></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<input type="submit" name="submit" value="Back">
|
||||
<p>
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
header("Location: $PHP_SELF?$qstr_sort&$qstr_filter");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
printHeader('ca');
|
||||
|
||||
?>
|
||||
<body onLoad="self.focus();document.filter.search.focus();">
|
||||
<table style="margin:0 auto">
|
||||
<tr><th colspan=9><big>CERTIFICATE MANAGEMENT CONTROL PANEL</big></th></tr>
|
||||
<tr><td colspan=9><center>
|
||||
<form action="<?php echo "$PHP_SELF?$qstr_sort"?>" method="get" name="filter">
|
||||
Search: <input type="text" name=search" value="<?php echo htvar($search)?>" style="font-size: 11px;" maxlength="60" size="30">
|
||||
      
|
||||
<input type="checkbox" name="show_valid" value="V" <?php echo ($show_valid?'checked':'')?>>Valid
|
||||
<input type="checkbox" name="show_valid" value="V" <?php echo ($show_valid?'checked':'')?>>Valid
|
||||
  
|
||||
<input type="checkbox" name="show_revoked" value="R" <?php echo ($show_revoked?'checked':'')?>>Revoked
|
||||
<input type="checkbox" name="show_revoked" value="R" <?php echo ($show_revoked?'checked':'')?>>Revoked
|
||||
  
|
||||
<input type="checkbox" name="show_expired" value="E" <?php echo ($show_expired?'checked':'')?>>Expired
|
||||
<input type="checkbox" name="show_expired" value="E" <?php echo ($show_expired?'checked':'')?>>Expired
|
||||
     
|
||||
<input type="submit" name="submit" value="Apply Filter" style="font-size: 11px;">
|
||||
<input type="submit" name="submit" value="Apply Filter" style="font-size: 11px;">
|
||||
</form>
|
||||
</center></td>
|
||||
</tr>
|
||||
<?php
|
||||
</center></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
if (! $sortfield) {
|
||||
$sortfield = 'email' ;
|
||||
$ascdec = 'A';
|
||||
}
|
||||
if (! $sortfield) {
|
||||
$sortfield = 'email' ;
|
||||
$ascdec = 'A';
|
||||
}
|
||||
|
||||
if ($ascdec == 'A') {
|
||||
$arrow_gif = '../images/uparrow-blue.gif';
|
||||
$ht_ascdec = 'D';
|
||||
}
|
||||
else {
|
||||
$arrow_gif = '../images/downarrow-blue.gif';
|
||||
$ht_ascdec = 'A';
|
||||
}
|
||||
if ($ascdec == 'A') {
|
||||
$arrow_gif = '../images/uparrow-blue.gif';
|
||||
$ht_ascdec = 'D';
|
||||
} else {
|
||||
$arrow_gif = '../images/downarrow-blue.gif';
|
||||
$ht_ascdec = 'A';
|
||||
}
|
||||
|
||||
print '<tr>';
|
||||
print '<tr>';
|
||||
|
||||
$headings = array(
|
||||
'status'=>"Status", 'issued'=>"Issued", 'expires'=>"Expires",
|
||||
'common_name'=>"User's Name", 'email'=>"E-mail",
|
||||
'organization'=>"Organization", 'unit'=>"Department",
|
||||
'locality'=>"Locality"
|
||||
);
|
||||
$headings = array(
|
||||
'status'=>"Status", 'issued'=>"Issued", 'expires'=>"Expires",
|
||||
'common_name'=>"User's Name", 'email'=>"E-mail",
|
||||
'organization'=>"Organization", 'unit'=>"Department",
|
||||
'locality'=>"Locality"
|
||||
);
|
||||
|
||||
foreach($headings as $field=>$head) {
|
||||
print '<th><a href="'.$PHP_SELF.'?sortfield='.$field.'&ascdec=A&'.$qstr_filter.'" title="Click to sort on this column."><u>'.$head.'</u></a>';
|
||||
foreach ($headings as $field => $head) {
|
||||
print '<th><a href="'.$PHP_SELF.'?sortfield='.$field.'&ascdec=A&'.$qstr_filter.'" title="Click to sort on this column."><u>'.$head.'</u></a>';
|
||||
|
||||
if ($sortfield == $field) {
|
||||
print ' <a href="'.$PHP_SELF.'?sortfield='.$field.'&ascdec='.$ht_ascdec.'&'.$qstr_filter.'" >'.
|
||||
'<img src='.$arrow_gif.' height=12 alt=\'Change sort order.\' title=\'Click to reverse sort order.\'></a>';
|
||||
}
|
||||
if ($sortfield == $field) {
|
||||
print ' <a href="'.$PHP_SELF.'?sortfield='.$field.'&ascdec='.$ht_ascdec.'&'.$qstr_filter.'" >'.
|
||||
'<img src='.$arrow_gif.' height=12 alt=\'Change sort order.\' title=\'Click to reverse sort order.\'></a>';
|
||||
}
|
||||
|
||||
print '</th>';
|
||||
}
|
||||
print '<th><font color=green>Actions</font></th>';
|
||||
print '</tr>';
|
||||
print '</th>';
|
||||
}
|
||||
print '<th><font color=green>Actions</font></th>';
|
||||
print '</tr>';
|
||||
|
||||
$x = "^[$show_valid$show_revoked$show_expired]";
|
||||
$x = "^[$show_valid$show_revoked$show_expired]";
|
||||
|
||||
if (in_array($PHPki_user, $PHPki_admins)) {
|
||||
$x = "$x.*$search";
|
||||
}
|
||||
else {
|
||||
$x = "$x.*$search.*$PHPki_user|$x.*$PHPki_user.*$search";
|
||||
}
|
||||
if (in_array($PHPki_user, $PHPki_admins)) {
|
||||
$x = "$x.*$search";
|
||||
} else {
|
||||
$x = "$x.*$search.*$PHPki_user|$x.*$PHPki_user.*$search";
|
||||
}
|
||||
|
||||
$db = csort(CAdb_to_array($x), $sortfield, ($ascdec=='A'?SORT_ASC:SORT_DESC));
|
||||
$db = csort(CAdb_to_array($x), $sortfield, ($ascdec=='A'?SORT_ASC:SORT_DESC));
|
||||
|
||||
$stcolor = array('Valid'=>'green','Revoked'=>'red','Expired'=>'orange');
|
||||
$stcolor = array('Valid'=>'green','Revoked'=>'red','Expired'=>'orange');
|
||||
|
||||
foreach($db as $rec) {
|
||||
print '<tr style="font-size: 11px;">
|
||||
<td><font color='.$stcolor[$rec['status']].'><b>' .$rec[status].'</b></font></td>
|
||||
<td style="white-space: nowrap">'.$rec['issued'].'</td>
|
||||
<td style="white-space: nowrap">'.$rec['expires'].'</td>
|
||||
<td>'.$rec['common_name'].'</td>
|
||||
<td style="white-space: nowrap"><a href="mailto:' . htvar($rec['common_name']) . ' <' . htvar($rec['email']) . '>" >' . htvar($rec['email']) . '</a></td>
|
||||
<td>'.htvar($rec['organization']).'</td>
|
||||
<td>'.htvar($rec['unit']).'</td>
|
||||
<td>'.htvar($rec['locality']).'</td>
|
||||
<td><a href="'.$PHP_SELF.'?stage=display&serial='.$rec['serial'].'" target=_certdisp>'.
|
||||
'<img src=../images/display.png alt="Display" title="Display complete certificate details."></a>';
|
||||
foreach ($db as $rec) {
|
||||
print '<tr style="font-size: 11px;">
|
||||
<td><font color='.$stcolor[$rec['status']].'><b>' .$rec[status].'</b></font></td>
|
||||
<td style="white-space: nowrap">'.$rec['issued'].'</td>
|
||||
<td style="white-space: nowrap">'.$rec['expires'].'</td>
|
||||
<td>'.$rec['common_name'].'</td>
|
||||
<td style="white-space: nowrap"><a href="mailto:' . htvar($rec['common_name']) . ' <' . htvar($rec['email']) . '>" >' . htvar($rec['email']) . '</a></td>
|
||||
<td>'.htvar($rec['organization']).'</td>
|
||||
<td>'.htvar($rec['unit']).'</td>
|
||||
<td>'.htvar($rec['locality']).'</td>
|
||||
<td><a href="'.$PHP_SELF.'?stage=display&serial='.$rec['serial'].'" target=_certdisp>'.
|
||||
'<img src=../images/display.png alt="Display" title="Display complete certificate details."></a>';
|
||||
|
||||
if ($rec['status'] == 'Valid') {
|
||||
print '
|
||||
<a href="'.$PHP_SELF.'?stage=dl-confirm&serial='.$rec['serial'].'&'.$qstr_sort.'&'.$qstr_filter.'">'.
|
||||
'<img src=../images/download.png alt="Download" title="Download the PRIVATE certificate. DO NOT DISTRIBUTE THIS TO THE PUBLIC!"></a>
|
||||
<a href="'.$PHP_SELF.'?stage=revoke-form&serial='.$rec['serial'].'&'.$qstr_sort.'&'.$qstr_filter.'">'.
|
||||
'<img src=../images/revoke.png alt="Revoke" title="Revoke the certificate when the e-mail address is no longer valid or the certificate password or private key has been compromised."></a>';
|
||||
}
|
||||
print '
|
||||
<a href="'.$PHP_SELF.'?stage=renew-form&serial='.$rec['serial'].'&'.$qstr_sort.'&'.$qstr_filter.'">'.
|
||||
'<img src=../images/renew.png alt="Renew" title="Renew the certificate by revoking it, if necessary, and creating a replacement with a new expiration date."></a>
|
||||
</td></tr>';
|
||||
}
|
||||
if ($rec['status'] == 'Valid') {
|
||||
print '
|
||||
<a href="'.$PHP_SELF.'?stage=dl-confirm&serial='.$rec['serial'].'&'.$qstr_sort.'&'.$qstr_filter.'">'.
|
||||
'<img src=../images/download.png alt="Download" title="Download the PRIVATE certificate. DO NOT DISTRIBUTE THIS TO THE PUBLIC!"></a>
|
||||
<a href="'.$PHP_SELF.'?stage=revoke-form&serial='.$rec['serial'].'&'.$qstr_sort.'&'.$qstr_filter.'">'.
|
||||
'<img src=../images/revoke.png alt="Revoke" title="Revoke the certificate when the e-mail address is no longer valid or the certificate password or private key has been compromised."></a>';
|
||||
}
|
||||
print '
|
||||
<a href="'.$PHP_SELF.'?stage=renew-form&serial='.$rec['serial'].'&'.$qstr_sort.'&'.$qstr_filter.'">'.
|
||||
'<img src=../images/renew.png alt="Renew" title="Renew the certificate by revoking it, if necessary, and creating a replacement with a new expiration date."></a>
|
||||
</td></tr>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</table>';
|
||||
|
||||
printFooter();
|
||||
printFooter();
|
||||
}
|
||||
?>
|
||||
|
@@ -1,78 +1,34 @@
|
||||
<html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Certificate Authority Agreement</title>
|
||||
<title>Certificate Authority Agreement</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h2 align="center">Certificate Authority Agreement</h2>
|
||||
|
||||
<h2 align=center>Certificate Authority Agreement</h2>
|
||||
<h3 align=center>Policy and Practices</h3>
|
||||
<h3 align="center">Policy and Practices</h3><br>
|
||||
<br>
|
||||
|
||||
<br><br>
|
||||
<p>This is a statement of practices by this Digital Certificate Authority.
|
||||
Your use of this Certificate Authority constitutes your and/or your agency's
|
||||
understanding and full acceptance of these practices and all associated risks.
|
||||
<strong>Please have an authorized person at your agency sign this document and fax it to 000-000-0000</strong>
|
||||
<p>This is a statement of practices by this Digital Certificate Authority. Your use of this Certificate Authority constitutes your and/or your agency's understanding and full acceptance of these practices and all associated risks. <strong>Please have an authorized person at your agency sign this document and fax it to 000-000-0000</strong></p>
|
||||
|
||||
<p>This document may not be all encompassing, and we reserve the right to modify it at any time.
|
||||
<p>This document may not be all encompassing, and we reserve the right to modify it at any time.</p>
|
||||
|
||||
<ul>
|
||||
<li> The sole role of this Certificate Authority is
|
||||
to provide and maintain a password protected software application for the easy
|
||||
and instant creation and management of standard x.509 personal digital
|
||||
certificates for e-mail encryption. We assume no responsibility for
|
||||
verifying the identity of any persons other than that of the limited number of
|
||||
authorized users of the software.
|
||||
We accept no liability for damages resulting from the use, misuse,
|
||||
or compromise of the software application or its host server.
|
||||
<ul>
|
||||
<li>The sole role of this Certificate Authority is to provide and maintain a password protected software application for the easy and instant creation and management of standard x.509 personal digital certificates for e-mail encryption. We assume no responsibility for verifying the identity of any persons other than that of the limited number of authorized users of the software. We accept no liability for damages resulting from the use, misuse, or compromise of the software application or its host server.</li>
|
||||
|
||||
<p><li>As an authorized user of the software, you are in effect <strong>THE</strong> Certificate Authority for your
|
||||
agency. As such, you are solely
|
||||
responsible for authenticating the identity of the persons for whom you obtain
|
||||
certificates. We accept no
|
||||
responsibility or liability for non-repudiation in any digital certificate
|
||||
created by this software. You agree that
|
||||
password protection to the application by authorized certificate managers,
|
||||
and personal identity management by
|
||||
those managers is sufficient to create a chain of trust for non-repudiation
|
||||
in all digital certificates created using the software.
|
||||
<li>As an authorized user of the software, you are in effect <strong>THE</strong> Certificate Authority for your agency. As such, you are solely responsible for authenticating the identity of the persons for whom you obtain certificates. We accept no responsibility or liability for non-repudiation in any digital certificate created by this software. You agree that password protection to the application by authorized certificate managers, and personal identity management by those managers is sufficient to create a chain of trust for non-repudiation in all digital certificates created using the software.</li>
|
||||
|
||||
<p><li>No more than two(2)
|
||||
users at your agency should have access to your agency's Certificate Authority
|
||||
password. We should be notified
|
||||
immediately, via e-mail, when the employment of any
|
||||
authorized user at your agency is terminated so that a new password can be
|
||||
issued.
|
||||
<li>No more than two(2) users at your agency should have access to your agency's Certificate Authority password. We should be notified immediately, via e-mail, when the employment of any authorized user at your agency is terminated so that a new password can be issued.</li>
|
||||
|
||||
<p><li>This Certificate
|
||||
Authority software application is accessed via the Internet using standard SSL
|
||||
or Secure Server encryption mechanisms.
|
||||
Although steps have been taken to protect the security and availability
|
||||
of the host server and application, its exposure to the Internet as well as any
|
||||
presently unknown security flaws could lead to potential compromise of the
|
||||
software and your certificates.
|
||||
<li>This Certificate Authority software application is accessed via the Internet using standard SSL or Secure Server encryption mechanisms. Although steps have been taken to protect the security and availability of the host server and application, its exposure to the Internet as well as any presently unknown security flaws could lead to potential compromise of the software and your certificates.</li>
|
||||
|
||||
<p><li>No promise is made as
|
||||
to the availability of the software in the event of hardware, software, or
|
||||
telecommunications failure or maintenance.<2E>
|
||||
No advanced notice will be given when the software must be temporarily
|
||||
taken off line for service.
|
||||
<li>No promise is made as to the availability of the software in the event of hardware, software, or telecommunications failure or maintenance. No advanced notice will be given when the software must be temporarily taken off line for service.</li>
|
||||
|
||||
<p><li>In order to provide
|
||||
software which can easily create "instant" certificates it is
|
||||
necessary to store all private keys on the host server. As such, all private keys are potentially exposed
|
||||
to the Internet and suffer some risk of unauthorized access. However, since all private keys <strong>ARE
|
||||
ENCRYPTED</strong> using a password provided by you, they are unlikely to be usable by
|
||||
any intruder.
|
||||
<li>In order to provide software which can easily create "instant" certificates it is necessary to store all private keys on the host server. As such, all private keys are potentially exposed to the Internet and suffer some risk of unauthorized access. However, since all private keys <strong>ARE ENCRYPTED</strong> using a password provided by you, they are unlikely to be usable by any intruder.</li>
|
||||
|
||||
<p><li>A publicly accessible
|
||||
web page is provided for interested Internet users to download the Certificate
|
||||
Authority root certificate, certificate revocation list, and search for the
|
||||
e-mail addresses and public certificates of users. So as to avoid e-mail address scraping by spammers, no static
|
||||
content with users' e-mail addresses is available.
|
||||
|
||||
</ul>
|
||||
<li>A publicly accessible web page is provided for interested Internet users to download the Certificate Authority root certificate, certificate revocation list, and search for the e-mail addresses and public certificates of users. So as to avoid e-mail address scraping by spammers, no static content with users' e-mail addresses is available.</li>
|
||||
</ul>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@@ -7,7 +7,7 @@ include('../include/common.php') ;
|
||||
include('../include/openssl_functions.php') ;
|
||||
|
||||
# User's preferences file
|
||||
$user_cnf = $config['home_dir'] . "/config/user-".strtr($PHPki_user,'/\\','|#').'.php';
|
||||
$user_cnf = $config['home_dir'] . "/config/user-".strtr($PHPki_user, '/\\', '|#').'.php';
|
||||
|
||||
# Retrieve GET/POST values
|
||||
$form_stage = gpvar('form_stage');
|
||||
@@ -48,355 +48,399 @@ $hidden_fields = '
|
||||
|
||||
|
||||
switch ($form_stage) {
|
||||
case 'validate':
|
||||
$er = '';
|
||||
|
||||
case 'validate':
|
||||
$er = '';
|
||||
if (! $country) {
|
||||
$er .= 'Missing Country<br>';
|
||||
}
|
||||
if (! $province) {
|
||||
$er .= 'Missing State/Province<br>';
|
||||
}
|
||||
if (! $locality) {
|
||||
$er .= 'Missing Locality (City/County)<br>';
|
||||
}
|
||||
if (! $organization) {
|
||||
$er .= 'Missing Organization (Company/Agency)<br>';
|
||||
}
|
||||
if (! $unit) {
|
||||
$er .= 'Missing Unit/Department<br>';
|
||||
}
|
||||
if (! $common_name) {
|
||||
$er .= 'Missing E-mail User\'s Full Name<br>';
|
||||
}
|
||||
if (! $email) {
|
||||
$er .= 'Missing E-mail Address<br>';
|
||||
}
|
||||
|
||||
if (! $country) $er .= 'Missing Country<br>';
|
||||
if (! $province) $er .= 'Missing State/Province<br>';
|
||||
if (! $locality) $er .= 'Missing Locality (City/County)<br>';
|
||||
if (! $organization) $er .= 'Missing Organization (Company/Agency)<br>';
|
||||
if (! $unit) $er .= 'Missing Unit/Department<br>';
|
||||
if (! $common_name) $er .= 'Missing E-mail User\'s Full Name<br>';
|
||||
if (! $email) $er .= 'Missing E-mail Address<br>';
|
||||
if (($cert_type == 'email' || $cert_type == 'email_signing') && ! $passwd) {
|
||||
$er .= 'Missing Certificate Password<br>';
|
||||
}
|
||||
if (($cert_type == 'email' || $cert_type == 'email_signing') && ! $passwdv) {
|
||||
$er .= 'Missing Certificate Password Verification "Again"<br>';
|
||||
}
|
||||
|
||||
if (($cert_type == 'email' || $cert_type == 'email_signing') && ! $passwd) $er .= 'Missing Certificate Password<br>';
|
||||
if (($cert_type == 'email' || $cert_type == 'email_signing') && ! $passwdv) $er .= 'Missing Certificate Password Verification "Again"<br>';
|
||||
if ($passwd && strlen($passwd) < 8) {
|
||||
$er .= 'Certificate password is too short.<br>';
|
||||
}
|
||||
|
||||
if ( $passwd && strlen($passwd) < 8 )
|
||||
$er .= 'Certificate password is too short.<br>';
|
||||
if ($passwd and $passwd != $passwdv) {
|
||||
$er .= 'Password and password verification do not match.<br>';
|
||||
}
|
||||
|
||||
if ( $passwd and $passwd != $passwdv )
|
||||
$er .= 'Password and password verification do not match.<br>';
|
||||
//if ( ! is_alnum($passwd) or ! is_alnum($passwdv) )
|
||||
// $er .= 'Password contains invalid characters.<br>';
|
||||
|
||||
//if ( ! is_alnum($passwd) or ! is_alnum($passwdv) )
|
||||
// $er .= 'Password contains invalid characters.<br>';
|
||||
if ($email && ! is_email($email)) {
|
||||
$er .= 'E-mail address ('. htvar($email) . ') may be invalid.<br>';
|
||||
}
|
||||
|
||||
if ( $email && ! is_email($email) )
|
||||
$er .= 'E-mail address ('. htvar($email) . ') may be invalid.<br>';
|
||||
$ip_ar=explode("\n", $ip_addr);
|
||||
foreach ($ip_ar as $value) {
|
||||
if ($value && ! is_ip($value)) {
|
||||
$er .= 'IP address ('. htvar($value) . ') may be invalid.<br>';
|
||||
}
|
||||
}
|
||||
|
||||
$ip_ar=explode("\n", $ip_addr);
|
||||
foreach ($ip_ar as $value){
|
||||
if ( $value && ! is_ip($value) )
|
||||
$er .= 'IP address ('. htvar($value) . ') may be invalid.<br>';
|
||||
}
|
||||
$dns_n=explode("\n", $dns_names);
|
||||
foreach ($dns_n as $value) {
|
||||
if ($value && ! is_fqdn(trim($value))) {
|
||||
$er .= 'DNS Name ('. htvar($value) . ') may be invalid.<br>';
|
||||
}
|
||||
}
|
||||
|
||||
$dns_n=explode("\n", $dns_names);
|
||||
foreach ($dns_n as $value){
|
||||
if ( $value && ! is_fqdn(trim($value)) )
|
||||
$er .= 'DNS Name ('. htvar($value) . ') may be invalid.<br>';
|
||||
}
|
||||
if ($er) {
|
||||
$er = '<h2>ERROR(S) IN FORM:</h2><h4><blockquote>' . $er . '</blockquote></h4>';
|
||||
}
|
||||
|
||||
if ( $er )
|
||||
$er = '<h2>ERROR(S) IN FORM:</h2><h4><blockquote>' . $er . '</blockquote></h4>';
|
||||
if ($email && ($serial = CAdb_in($email, $common_name))) {
|
||||
$er = '';
|
||||
$certtext = CA_cert_text($serial);
|
||||
$er .= '<h2>A valid certificate already exists for ' . htvar("$common_name <$email>") . '</h2>';
|
||||
$er .= '</font><blockquote><pre> ' . htvar($certtext) . ' </pre></blockquote>';
|
||||
}
|
||||
|
||||
if ($email && ($serial = CAdb_in($email,$common_name))) {
|
||||
$er = '';
|
||||
$certtext = CA_cert_text($serial);
|
||||
$er .= '<h2>A valid certificate already exists for ' . htvar("$common_name <$email>") . '</h2>';
|
||||
$er .= '</font><blockquote><pre> ' . htvar($certtext) . ' </pre></blockquote>';
|
||||
if ($er) {
|
||||
printHeader();
|
||||
?>
|
||||
|
||||
}
|
||||
<form action='<?php echo $PHP_SELF?>' method=post>
|
||||
<input type=submit name=submit value='Go Back'>
|
||||
<font color=#ff0000><?php echo $er?></font>
|
||||
<br><input type=submit name=submit value='Go Back'>
|
||||
|
||||
if ($er) {
|
||||
printHeader();
|
||||
?>
|
||||
<?php
|
||||
print $hidden_fields;
|
||||
print "</form>";
|
||||
|
||||
<form action='<?php echo $PHP_SELF?>' method=post>
|
||||
<input type=submit name=submit value='Go Back'>
|
||||
<font color=#ff0000><?php echo $er?></font>
|
||||
<br><input type=submit name=submit value='Go Back'>
|
||||
printFooter();
|
||||
break;
|
||||
}
|
||||
|
||||
<?php
|
||||
print $hidden_fields;
|
||||
print "</form>";
|
||||
case 'confirm':
|
||||
printHeader();
|
||||
|
||||
printFooter();
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<h4>You are about to create a certificate using the following information:</h4>
|
||||
<table width=500><tr>
|
||||
<td width=25% style='white-space: nowrap'>
|
||||
<p align=right>
|
||||
User's Name<br>
|
||||
E-mail Address<br>
|
||||
Organization<br>
|
||||
Department/Unit<br>
|
||||
Locality<br>
|
||||
State/Province<br>
|
||||
Country<br>
|
||||
Certificate Life<br>
|
||||
Key Size<br>
|
||||
Certificate Use<br>
|
||||
<?php
|
||||
if ($cert_type == 'server') {
|
||||
print 'DNS Alt Names<br>';
|
||||
print 'IP Addresses<br>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
|
||||
case 'confirm':
|
||||
printHeader();
|
||||
<td>
|
||||
<?php
|
||||
print htvar($common_name) . '<br>';
|
||||
print htvar($email) . '<br>';
|
||||
print htvar($organization) . '<br>';
|
||||
print htvar($unit) . '<br>';
|
||||
print htvar($locality) . '<br>';
|
||||
print htvar($province) . '<br>';
|
||||
print htvar($country) . '<br>';
|
||||
print htvar($expiry). ' Year'.($expiry == 1 ? '' : 's').'<br>';
|
||||
print htvar($keysize). ' bits<br>';
|
||||
|
||||
?>
|
||||
<h4>You are about to create a certificate using the following information:</h4>
|
||||
<table width=500><tr>
|
||||
<td width=25% style='white-space: nowrap'>
|
||||
<p align=right>
|
||||
User's Name<br>
|
||||
E-mail Address<br>
|
||||
Organization<br>
|
||||
Department/Unit<br>
|
||||
Locality<br>
|
||||
State/Province<br>
|
||||
Country<br>
|
||||
Certificate Life<br>
|
||||
Key Size<br>
|
||||
Certificate Use<br>
|
||||
<?php
|
||||
if ($cert_type == 'server' ) {
|
||||
print 'DNS Alt Names<br>';
|
||||
print 'IP Addresses<br>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</td>
|
||||
switch ($cert_type) {
|
||||
case 'email':
|
||||
print 'E-mail, SSL Client' . '<br>';
|
||||
break;
|
||||
case 'email_signing':
|
||||
print 'E-mail, SSL Client, Code Signing' . '<br>';
|
||||
break;
|
||||
case 'server':
|
||||
print 'SSL Server' . '<br>';
|
||||
print htvar($dns_names). '<br>';
|
||||
print htvar($ip_addr). '<br>';
|
||||
break;
|
||||
case 'vpn_client':
|
||||
print 'VPN Client Only' . '<br>';
|
||||
break;
|
||||
case 'vpn_server':
|
||||
print 'VPN Server Only' . '<br>';
|
||||
break;
|
||||
case 'vpn_client_server':
|
||||
print 'VPN Client, VPN Server' . '<br>';
|
||||
break;
|
||||
case 'time_stamping':
|
||||
print 'Time Stamping' . '<br>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
print htvar($common_name) . '<br>';
|
||||
print htvar($email) . '<br>';
|
||||
print htvar($organization) . '<br>';
|
||||
print htvar($unit) . '<br>';
|
||||
print htvar($locality) . '<br>';
|
||||
print htvar($province) . '<br>';
|
||||
print htvar($country) . '<br>';
|
||||
print htvar($expiry). ' Year'.($expiry == 1 ? '' : 's').'<br>';
|
||||
print htvar($keysize). ' bits<br>';
|
||||
</tr></table>
|
||||
|
||||
switch ($cert_type) {
|
||||
case 'email':
|
||||
print 'E-mail, SSL Client' . '<br>';
|
||||
break;
|
||||
case 'email_signing':
|
||||
print 'E-mail, SSL Client, Code Signing' . '<br>';
|
||||
break;
|
||||
case 'server':
|
||||
print 'SSL Server' . '<br>';
|
||||
print htvar($dns_names). '<br>';
|
||||
print htvar($ip_addr). '<br>';
|
||||
break;
|
||||
case 'vpn_client':
|
||||
print 'VPN Client Only' . '<br>';
|
||||
break;
|
||||
case 'vpn_server':
|
||||
print 'VPN Server Only' . '<br>';
|
||||
break;
|
||||
case 'vpn_client_server':
|
||||
print 'VPN Client, VPN Server' . '<br>';
|
||||
break;
|
||||
case 'time_stamping':
|
||||
print 'Time Stamping' . '<br>';
|
||||
<h4>Are you sure?</h4>
|
||||
<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' >
|
||||
<input type=submit name=submit value='Yes. Just Create' >
|
||||
<input type=submit name=submit value='Go Back'>
|
||||
</form>
|
||||
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php
|
||||
printFooter();
|
||||
|
||||
</tr></table>
|
||||
# Save user's defaults
|
||||
$fp = fopen($user_cnf, 'w');
|
||||
$x = '<?php
|
||||
$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);
|
||||
|
||||
<h4>Are you sure?</h4>
|
||||
<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' >
|
||||
<input type=submit name=submit value='Yes. Just Create' >
|
||||
<input type=submit name=submit value='Go Back'>
|
||||
</form>
|
||||
break;
|
||||
|
||||
<?php
|
||||
printFooter();
|
||||
case 'final':
|
||||
if ($submit == "Yes Create and Download" || $submit == "Yes. Just Create") {
|
||||
if (! $serial = CAdb_in($email, $common_name)) {
|
||||
list($ret,$errtxt) = CA_create_cert($cert_type, $country, $province, $locality, $organization, $unit, $common_name, $email, $expiry, $passwd, $keysize, $dns_names, $ip_addr);
|
||||
|
||||
# Save user's defaults
|
||||
$fp = fopen($user_cnf,'w');
|
||||
$x = '<?php
|
||||
$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);
|
||||
if (! $ret) {
|
||||
printHeader();
|
||||
?>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<font color=#ff0000>
|
||||
<h2>There was an error creating your certificate.</h2></font><br>
|
||||
<blockquote>
|
||||
<h3>Debug Info:</h3>
|
||||
<pre><?php echo $errtxt?></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<?php echo $hidden_fields?>
|
||||
<input type=submit name=submit value=Back>
|
||||
<p>
|
||||
</form>
|
||||
<?php
|
||||
printFooter();
|
||||
break;
|
||||
} else {
|
||||
$serial = $errtxt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
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;
|
||||
case 'email':
|
||||
case 'email_signing':
|
||||
case 'time_stamping':
|
||||
case 'vpn_client_server':
|
||||
case 'vpn_client':
|
||||
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;
|
||||
}
|
||||
|
||||
case 'final':
|
||||
if ($submit == "Yes Create and Download" || $submit == "Yes. Just Create") {
|
||||
if (! $serial = CAdb_in($email,$common_name)) {
|
||||
list($ret,$errtxt) = CA_create_cert($cert_type, $country, $province, $locality, $organization, $unit, $common_name, $email, $expiry, $passwd, $keysize, $dns_names, $ip_addr);
|
||||
# Clear common_name fields
|
||||
$common_name = '';
|
||||
break;
|
||||
}
|
||||
|
||||
if (! $ret) {
|
||||
printHeader();
|
||||
?>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<font color=#ff0000>
|
||||
<h2>There was an error creating your certificate.</h2></font><br>
|
||||
<blockquote>
|
||||
<h3>Debug Info:</h3>
|
||||
<pre><?php echo $errtxt?></pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
<?php echo $hidden_fields?>
|
||||
<input type=submit name=submit value=Back>
|
||||
<p>
|
||||
</form>
|
||||
<?php
|
||||
printFooter();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
$serial = $errtxt;
|
||||
}
|
||||
}
|
||||
}
|
||||
# Clear common_name fields
|
||||
$common_name = '';
|
||||
|
||||
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;
|
||||
case 'email':
|
||||
case 'email_signing':
|
||||
case 'time_stamping':
|
||||
case 'vpn_client_server':
|
||||
case 'vpn_client':
|
||||
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;
|
||||
}
|
||||
// We could add 'return to index or create another certificate'
|
||||
|
||||
# Clear common_name fields
|
||||
$common_name = '';
|
||||
break;
|
||||
}
|
||||
default:
|
||||
#
|
||||
# Default fields to reasonable values if necessary.
|
||||
#
|
||||
if (! $submit and file_exists($user_cnf)) {
|
||||
include($user_cnf);
|
||||
}
|
||||
|
||||
# Clear common_name fields
|
||||
$common_name = '';
|
||||
if (! $country) {
|
||||
$country = $config['country'];
|
||||
}
|
||||
if (! $province) {
|
||||
$province = $config['province'];
|
||||
}
|
||||
if (! $locality) {
|
||||
$locality = "";
|
||||
}
|
||||
if (! $organization) {
|
||||
$organization = "";
|
||||
}
|
||||
if (! $unit) {
|
||||
$unit = "";
|
||||
}
|
||||
if (! $email) {
|
||||
$email = "";
|
||||
}
|
||||
if (! $expiry) {
|
||||
$expiry = 1;
|
||||
}
|
||||
if (! $keysize) {
|
||||
$keysize = 2048;
|
||||
}
|
||||
if (! $cert_type) {
|
||||
$cert_type = 'email';
|
||||
}
|
||||
if (! $dns_names) {
|
||||
$dns_names = "";
|
||||
}
|
||||
if (! $ip_addr) {
|
||||
$ip_addr = "";
|
||||
}
|
||||
|
||||
// We could add 'return to index or create another certificate'
|
||||
printHeader();
|
||||
?>
|
||||
|
||||
default:
|
||||
#
|
||||
# Default fields to reasonable values if necessary.
|
||||
#
|
||||
if (! $submit and file_exists($user_cnf)) include($user_cnf);
|
||||
<body onLoad="self.focus();document.request.common_name.focus();document.request.cert_type.onchange();">
|
||||
<form action="<?php echo $PHP_SELF?>" method=post name=request>
|
||||
<table width=99%>
|
||||
<th colspan=2><h3>Certificate Request Form</h3></th>
|
||||
|
||||
if (! $country) $country = $config['country'];
|
||||
if (! $province) $province = $config['province'];
|
||||
if (! $locality) $locality = "";
|
||||
if (! $organization) $organization = "";
|
||||
if (! $unit) $unit = "";
|
||||
if (! $email) $email = "";
|
||||
if (! $expiry) $expiry = 1;
|
||||
if (! $keysize) $keysize = 2048;
|
||||
if (! $cert_type) $cert_type = 'email';
|
||||
if (! $dns_names) $dns_names = "";
|
||||
if (! $ip_addr) $ip_addr = "";
|
||||
|
||||
printHeader();
|
||||
?>
|
||||
|
||||
<body onLoad="self.focus();document.request.common_name.focus();document.request.cert_type.onchange();">
|
||||
<form action="<?php echo $PHP_SELF?>" method=post name=request>
|
||||
<table width=99%>
|
||||
<th colspan=2><h3>Certificate Request Form</h3></th>
|
||||
|
||||
<tr>
|
||||
<td width=30%>Common Name<font color=red size=3>*</font><br>(i.e. User real name or computer hostname - used as SubjectAltName)</td>
|
||||
<td><input type=text name=common_name value="<?php echo htvar($common_name)?>" size=50 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>E-mail Address <font color=red size=3>*</font></td>
|
||||
<td><input type=text name=email value="<?php echo htvar($email)?>" size=50 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Organization (Company/Agency)<font color=red size=3>*</font></td>
|
||||
<td><input type=text name=organization value="<?php echo htvar($organization)?>" size=60 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Department/Unit<font color=red size=3>*</font> </td><td><input type=text name=unit value="<?php echo htvar($unit) ?>" size=40 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Locality (City/County)<font color=red size=3>*</font></td><td><input type=text name=locality value="<?php echo htvar($locality) ?>" size=30 maxlength=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>State/Province<font color=red size=3>*</font></td><td><input type=text name=province value="<?php echo htvar($province) ?>" size=30 maxlength=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Country<font color=red size=3>*</font></td>
|
||||
<td><input type=text name=country value="<?php echo htvar($country) ?>" size=2 maxlength=2></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Password<font color=red size=3>*</font><br>(Mandatory for Email,SSL Client,Code signing)</td>
|
||||
<td><input type=password name=passwd value="<?php echo htvar($passwd) ?>" size=30> Again <input type=password name=passwdv value="<?php echo htvar($passwdv) ?>" size=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Life<font color=red size=3>*</font> </td>
|
||||
<td><select name=expiry>
|
||||
|
||||
<?php
|
||||
print "<option value=0.083 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Month</option>\n" ;
|
||||
print "<option value=0.25 " . ($expiry == 1 ? "selected='selected'" : "") . " >3 Months</option>\n" ;
|
||||
print "<option value=0.5 " . ($expiry == 1 ? "selected='selected'" : "") . " >6 Months</option>\n" ;
|
||||
print "<option value=1 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Year</option>\n" ;
|
||||
for ( $i = 2 ; $i <= 5 ; $i++ ) {
|
||||
print "<option value=$i " . ($expiry == $i ? "selected='selected'" : "") . " >$i Years</option>\n" ;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Key Size<font color=red size=3>*</font> </td>
|
||||
<td><select name=keysize>
|
||||
<?php
|
||||
for ( $i = 512 ; $i <= 4096 ; $i+= 512 ) {
|
||||
print "<option value=$i " . ($keysize == $i ? "selected='selected'" : "") . ">$i bits</option>\n" ;
|
||||
}
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Use:<font color=red size=3>*</font> </td>
|
||||
<td><select name=cert_type onchange="if (this.value=='server')
|
||||
{setVisibility('testrow1',true);setVisibility('testrow2',true);} else {setVisibility('testrow1',false);setVisibility('testrow2',false);}">
|
||||
<?php
|
||||
print '<option value="email" '.($cert_type=='email'?'selected':'').'>E-mail, SSL Client</option>';
|
||||
print '<option value="email_signing" '.($cert_type=='email_signing'?'selected':'').'>E-mail, SSL Client, Code Signing</option>';
|
||||
print '<option value="server" '.($cert_type=='server'?'selected':'').'>SSL Server</option>';
|
||||
print '<option value="vpn_client" '.($cert_type=='vpn_client'?'selected':'').'>VPN Client Only</option>';
|
||||
print '<option value="vpn_server" '.($cert_type=='vpn_server'?'selected':'').'>VPN Server Only</option>';
|
||||
print '<option value="vpn_client_server" '.($cert_type=='vpn_client_server'?'selected':'').'>VPN Client, VPN Server</option>';
|
||||
print '<option value="time_stamping" '.($cert_type=='time_stamping'?'selected':'').'>Time Stamping</option>';
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr id="testrow2" name="testrow2" style="visibility:hidden;display:none;">
|
||||
<td>Alternative DNS Names<br>(only one per Line)</td><td><textarea name=dns_names cols=30 rows=5><?php echo htvar($dns_names) ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr id="testrow1" name="testrow1" style="visibility:hidden;display:none;">
|
||||
<td>IP's<br>(only one per Line)</td><td><textarea name=ip_addr cols=30 rows=5><?php echo htvar($ip_addr) ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color=red size=3>* Fields are required</td><td><input type=submit name=submit value='Submit Request'><input type=hidden name=form_stage value='validate'></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
<td width=30%>Common Name<font color=red size=3>*</font><br>(i.e. User real name or computer hostname - used as SubjectAltName)</td>
|
||||
<td><input type=text name=common_name value="<?php echo htvar($common_name)?>" size=50 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
printFooter();
|
||||
<tr>
|
||||
<td>E-mail Address <font color=red size=3>*</font></td>
|
||||
<td><input type=text name=email value="<?php echo htvar($email)?>" size=50 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Organization (Company/Agency)<font color=red size=3>*</font></td>
|
||||
<td><input type=text name=organization value="<?php echo htvar($organization)?>" size=60 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Department/Unit<font color=red size=3>*</font> </td><td><input type=text name=unit value="<?php echo htvar($unit) ?>" size=40 maxlength=60></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Locality (City/County)<font color=red size=3>*</font></td><td><input type=text name=locality value="<?php echo htvar($locality) ?>" size=30 maxlength=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>State/Province<font color=red size=3>*</font></td><td><input type=text name=province value="<?php echo htvar($province) ?>" size=30 maxlength=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Country<font color=red size=3>*</font></td>
|
||||
<td><input type=text name=country value="<?php echo htvar($country) ?>" size=2 maxlength=2></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Password<font color=red size=3>*</font><br>(Mandatory for Email,SSL Client,Code signing)</td>
|
||||
<td><input type=password name=passwd value="<?php echo htvar($passwd) ?>" size=30> Again <input type=password name=passwdv value="<?php echo htvar($passwdv) ?>" size=30></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Life<font color=red size=3>*</font> </td>
|
||||
<td><select name=expiry>
|
||||
|
||||
<?php
|
||||
print "<option value=0.083 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Month</option>\n" ;
|
||||
print "<option value=0.25 " . ($expiry == 1 ? "selected='selected'" : "") . " >3 Months</option>\n" ;
|
||||
print "<option value=0.5 " . ($expiry == 1 ? "selected='selected'" : "") . " >6 Months</option>\n" ;
|
||||
print "<option value=1 " . ($expiry == 1 ? "selected='selected'" : "") . " >1 Year</option>\n" ;
|
||||
for ($i = 2; $i <= 5; $i++) {
|
||||
print "<option value=$i " . ($expiry == $i ? "selected='selected'" : "") . " >$i Years</option>\n" ;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Key Size<font color=red size=3>*</font> </td>
|
||||
<td><select name=keysize>
|
||||
<?php
|
||||
for ($i = 512; $i <= 4096; $i+= 512) {
|
||||
print "<option value=$i " . ($keysize == $i ? "selected='selected'" : "") . ">$i bits</option>\n" ;
|
||||
}
|
||||
?>
|
||||
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Certificate Use:<font color=red size=3>*</font> </td>
|
||||
<td><select name=cert_type onchange="if (this.value=='server')
|
||||
{setVisibility('testrow1',true);setVisibility('testrow2',true);} else {setVisibility('testrow1',false);setVisibility('testrow2',false);}">
|
||||
<?php
|
||||
print '<option value="email" '.($cert_type=='email'?'selected':'').'>E-mail, SSL Client</option>';
|
||||
print '<option value="email_signing" '.($cert_type=='email_signing'?'selected':'').'>E-mail, SSL Client, Code Signing</option>';
|
||||
print '<option value="server" '.($cert_type=='server'?'selected':'').'>SSL Server</option>';
|
||||
print '<option value="vpn_client" '.($cert_type=='vpn_client'?'selected':'').'>VPN Client Only</option>';
|
||||
print '<option value="vpn_server" '.($cert_type=='vpn_server'?'selected':'').'>VPN Server Only</option>';
|
||||
print '<option value="vpn_client_server" '.($cert_type=='vpn_client_server'?'selected':'').'>VPN Client, VPN Server</option>';
|
||||
print '<option value="time_stamping" '.($cert_type=='time_stamping'?'selected':'').'>Time Stamping</option>';
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
|
||||
<tr id="testrow2" name="testrow2" style="visibility:hidden;display:none;">
|
||||
<td>Alternative DNS Names<br>(only one per Line)</td><td><textarea name=dns_names cols=30 rows=5><?php echo htvar($dns_names) ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
<tr id="testrow1" name="testrow1" style="visibility:hidden;display:none;">
|
||||
<td>IP's<br>(only one per Line)</td><td><textarea name=ip_addr cols=30 rows=5><?php echo htvar($ip_addr) ?></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><font color=red size=3>* Fields are required</td><td><input type=submit name=submit value='Submit Request'><input type=hidden name=form_stage value='validate'></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
|
||||
printFooter();
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -1,3 +1,2 @@
|
||||
<?php
|
||||
define("PHPKI_VERSION", "0.84");
|
||||
?>
|
||||
|
206
css/style.css
206
css/style.css
@@ -1,171 +1,171 @@
|
||||
h1 {
|
||||
font-size: 32px;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 18px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 10px;
|
||||
padding: 0;
|
||||
background: #fafaff;
|
||||
font-family: Arial, Veranda, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
margin: 10px;
|
||||
padding: 0;
|
||||
background: #fafaff;
|
||||
font-family: Arial, Veranda, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #00F;
|
||||
background-color: transparent;
|
||||
color: #00F;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
a:link, a:active, a:visited {
|
||||
color: #00F;
|
||||
background-color: transparent;
|
||||
color: #00F;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
a.headermenu:link, a.headermenu:active, a.headermenu:visited {
|
||||
text-decoration: underline;
|
||||
color: #00F;
|
||||
background-color: transparent;
|
||||
padding-left: 8px;
|
||||
text-decoration: underline;
|
||||
color: #00F;
|
||||
background-color: transparent;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
form {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 2px solid black;
|
||||
margin-left: 10px;
|
||||
padding: 10px;
|
||||
width: 700px;
|
||||
font-size: 10px;
|
||||
border: 2px solid black;
|
||||
margin-left: 10px;
|
||||
padding: 10px;
|
||||
width: 700px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
legend {
|
||||
background-color: rgb(200, 220, 240);
|
||||
border: 2px solid black;
|
||||
padding: 0.25em;
|
||||
padding-top: 0.1em;
|
||||
font-size: 12px;
|
||||
background-color: rgb(200, 220, 240);
|
||||
border: 2px solid black;
|
||||
padding: 0.25em;
|
||||
padding-top: 0.1em;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 12px;
|
||||
margin-right: .1in;
|
||||
font-size: 12px;
|
||||
margin-right: .1in;
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: bold;
|
||||
background-color: #AFC3E4;
|
||||
padding: 3px;
|
||||
color: #323C4D;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #606060;
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
background-color: #AFC3E4;
|
||||
padding: 3px;
|
||||
color: #323C4D;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #606060;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
td {
|
||||
background-color: #DEE3EC;
|
||||
padding: 3px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #a0a0a0;
|
||||
background-color: #DEE3EC;
|
||||
padding: 3px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
border: 1px solid #a0a0a0;
|
||||
}
|
||||
|
||||
.menu {
|
||||
height: 22px;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
border: 1px solid #808080;
|
||||
border-left: 2px solid #808080;
|
||||
border-bottom: 2px solid #808080;
|
||||
color: #000000;
|
||||
height: 22px;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
border: 1px solid #808080;
|
||||
border-left: 2px solid #808080;
|
||||
border-bottom: 2px solid #808080;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.menu-pad {
|
||||
height: 22px;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
vertical-align: bottom;
|
||||
border: 1px solid #808080;
|
||||
border-left: 2px solid #808080;
|
||||
border-bottom: 2px solid #808080;
|
||||
color: #000000;
|
||||
height: 22px;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
vertical-align: bottom;
|
||||
border: 1px solid #808080;
|
||||
border-left: 2px solid #808080;
|
||||
border-bottom: 2px solid #808080;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.menu a {
|
||||
vertical-align: bottom;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
vertical-align: bottom;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.headermenu-ie {
|
||||
text-align: center;
|
||||
margin-right: 0.1in;
|
||||
margin-top: 0.20in;
|
||||
text-align: center;
|
||||
margin-right: 0.1in;
|
||||
margin-top: 0.20in;
|
||||
}
|
||||
|
||||
.headermenu-konq {
|
||||
text-align: center;
|
||||
margin-right: 0.1in;
|
||||
margin-top: 0.25in;
|
||||
text-align: center;
|
||||
margin-right: 0.1in;
|
||||
margin-top: 0.25in;
|
||||
}
|
||||
|
||||
.logo-ie {
|
||||
font-family: 'impact', sans-serif;
|
||||
font-size: 60pt;
|
||||
font-weight: bold;
|
||||
color: #99caff;
|
||||
margin-top: -0.20in;
|
||||
margin-bottom: 0;
|
||||
margin-right: 0.2in;
|
||||
text-align: left;
|
||||
font-family: 'impact', sans-serif;
|
||||
font-size: 60pt;
|
||||
font-weight: bold;
|
||||
color: #99caff;
|
||||
margin-top: -0.20in;
|
||||
margin-bottom: 0;
|
||||
margin-right: 0.2in;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.title-ie {
|
||||
font-family: 'impact', sans-serif;
|
||||
font-size: 22pt;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
margin-right: 0.4in;
|
||||
margin-top: -0.52in;
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
font-family: 'impact', sans-serif;
|
||||
font-size: 22pt;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
margin-right: 0.4in;
|
||||
margin-top: -0.52in;
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.logo-konq {
|
||||
font-family: 'impact', sans-serif;
|
||||
font-size: 62pt;
|
||||
font-weight: bold;
|
||||
color: #99caff;
|
||||
margin-top: -0.20in;
|
||||
margin-bottom: 0;
|
||||
margin-right: 0.2in;
|
||||
text-align: left;
|
||||
font-family: 'impact', sans-serif;
|
||||
font-size: 62pt;
|
||||
font-weight: bold;
|
||||
color: #99caff;
|
||||
margin-top: -0.20in;
|
||||
margin-bottom: 0;
|
||||
margin-right: 0.2in;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.title-konq {
|
||||
font-family: 'impact', 'sans-serif';
|
||||
font-size: 24pt;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
margin-right: 0.4in;
|
||||
margin-top: -0.55in;
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
font-family: 'impact', 'sans-serif';
|
||||
font-size: 24pt;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
margin-right: 0.4in;
|
||||
margin-top: -0.55in;
|
||||
margin-bottom: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
@@ -10,5 +10,3 @@ include('../html/include/common.php') ;
|
||||
include('../html/include/openssl_functions.php') ;
|
||||
|
||||
CA_generate_crl();
|
||||
|
||||
?>
|
||||
|
11
help.php
11
help.php
@@ -5,11 +5,12 @@ include('./include/common.php');
|
||||
|
||||
printHeader(about);
|
||||
?>
|
||||
<center><h1>PHPki HELP FILES</h1>
|
||||
<a href=<?php echo BASE_URL?>help/PKI_basics.html><h3>PKI and E-mail Encryption - A Brief Explanation</h3></a>
|
||||
<a href=<?php echo BASE_URL?>help/cacert_install_ie.html><h3>Installing Our Root Certificate For Use With Outlook and Outlook Express</h3></a>
|
||||
<p><a href=<?php echo BASE_URL?>help/usercert_install_ie.html><h3>Installing Your Personal E-mail Certificate For Use With Outlook and Outlook Express</h3></a>
|
||||
<p><a href=<?php echo BASE_URL?>help/glossary.html><h3>Glossary</h3></a>
|
||||
<center>
|
||||
<h1>PHPki HELP FILES</h1>
|
||||
<p><a href="<?php echo BASE_URL?>"help/PKI_basics.html><h3>PKI and E-mail Encryption - A Brief Explanation</h3></a></p>
|
||||
<p><a href="<?php echo BASE_URL?>"help/cacert_install_ie.html><h3>Installing Our Root Certificate For Use With Outlook and Outlook Express</h3></a></p>
|
||||
<p><a href="<?php echo BASE_URL?>"help/usercert_install_ie.html><h3>Installing Your Personal E-mail Certificate For Use With Outlook and Outlook Express</h3></a></p>
|
||||
<p><a href="<?php echo BASE_URL?>"help/glossary.html><h3>Glossary</h3></a></p>
|
||||
</center>
|
||||
<?php
|
||||
printFooter();
|
||||
|
@@ -1,64 +1,28 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel='stylesheet' type='text/css' href='../css/style.css'>
|
||||
<title>PKI and E-mail Encryption - A Brief Explanation</title>
|
||||
<link rel='stylesheet' type='text/css' href='../css/style.css'>
|
||||
|
||||
<title>PKI and E-mail Encryption - A Brief Explanation</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center><h1>PKI and E-mail Encryption - A Brief Explanation</h2></center>
|
||||
<center>
|
||||
<h1>PKI and E-mail Encryption - A Brief Explanation</h1>
|
||||
</center>
|
||||
|
||||
PKI stands for <cite>Public Key Infrastructure</cite>. PKI is Information
|
||||
Technology infrastructure that enables users of a basically unsecure public
|
||||
network (such as the Internet) to securely and privately exchange data through
|
||||
the use of a <a href=glossary.html#KEYS target=glossary>public and a private
|
||||
cryptographic key pair</a> that is obtained and shared through a
|
||||
<a href=glossary.html#CA target=glossary>trusted Authority</a>.
|
||||
<p>PKI stands for <cite>Public Key Infrastructure</cite>. PKI is Information Technology infrastructure that enables users of a basically unsecure public network (such as the Internet) to securely and privately exchange data through the use of a <a href="glossary.html#KEYS" target="glossary">public and a private cryptographic key pair</a> that is obtained and shared through a <a href="glossary.html#CA" target="glossary">trusted Authority</a>.</p>
|
||||
|
||||
<p>
|
||||
Public and private keys are like two halves of a single key. PKI encryption
|
||||
algorithms are designed such that a public key is used to encrypt or
|
||||
"lock" a message, and only the complementary private key can "unlock" that
|
||||
message.
|
||||
Think of a bank vault or safe that can only be unlocked by two individuals
|
||||
using two different but complementary keys. Neither of those keys can be used
|
||||
by itself to unlock the vault.
|
||||
<p>Public and private keys are like two halves of a single key. PKI encryption algorithms are designed such that a public key is used to encrypt or "lock" a message, and only the complementary private key can "unlock" that message. Think of a bank vault or safe that can only be unlocked by two individuals using two different but complementary keys. Neither of those keys can be used by itself to unlock the vault.</p>
|
||||
|
||||
<p>
|
||||
In practice, individuals wishing to exchange encrypted e-mail
|
||||
will agree to mutually trust one or more <a href=glossary.html#CA target=glossary>
|
||||
Certificate Authorities(CA)</a> by downloading and installing each trusted Authority's
|
||||
<a href=glossary.html#ROOT-CERT target=glossary>root certificate</a> on their computers.
|
||||
They will each obtain their own personal
|
||||
<a href=glossary.html#CERTIFICATE target=glossary>digital certificate</a>
|
||||
from a trusted Certificate Authority, and install them on their
|
||||
respective computers.
|
||||
Because they mutually trust the Certificate Authorities, they trust each other's
|
||||
digital certificates. More specifically, they trust the
|
||||
<a href=glossary.html#KEYS target=glossary>public keys</a> contained within
|
||||
their personal digital certificates which have been
|
||||
<a href=glossary.html#SIGNATURE target=glossary>digitally signed</a> by a
|
||||
trusted Certificate Authority.
|
||||
They will then exchange their trusted public keys by sending each other
|
||||
digitally signed e-mail messages. Once each party has the other's public key,
|
||||
they may exchange trusted and encrypted messsages.
|
||||
<p>In practice, individuals wishing to exchange encrypted e-mail will agree to mutually trust one or more <a href="glossary.html#CA" target="glossary">Certificate Authorities(CA)</a> by downloading and installing each trusted Authority's <a href="glossary.html#ROOT-CERT" target="glossary">root certificate</a> on their computers. They will each obtain their own personal <a href="glossary.html#CERTIFICATE" target="glossary">digital certificate</a> from a trusted Certificate Authority, and install them on their respective computers. Because they mutually trust the Certificate Authorities, they trust each other's digital certificates. More specifically, they trust the <a href="glossary.html#KEYS" target="glossary">public keys</a> contained within their personal digital certificates which have been <a href="glossary.html#SIGNATURE" target="glossary">digitally signed</a> by a trusted Certificate Authority. They will then exchange their trusted public keys by sending each other digitally
|
||||
signed e-mail messages. Once each party has the other's public key, they may exchange trusted and encrypted messsages.</p>
|
||||
|
||||
<p>
|
||||
Public key exchange and encryption is like exchanging notarized documents.
|
||||
One trusts a notarized document because a trusted third party, the Notary
|
||||
Public, has signed it. The Certificate Authority is the Notary Public, and
|
||||
the public keys are the documents.
|
||||
<p>Public key exchange and encryption is like exchanging notarized documents. One trusts a notarized document because a trusted third party, the Notary Public, has signed it. The Certificate Authority is the Notary Public, and the public keys are the documents.</p>
|
||||
|
||||
<p>
|
||||
Remember, having a personal digital certificate alone does <strong>not</strong>
|
||||
give one the ability to send encrypted e-mail to others, but only allows the
|
||||
<strong>receipt</strong> of encrypted e-mail. PKI is a cooperative encryption
|
||||
standard. Both parties who are exchanging encrypted messages must have
|
||||
personal digital certificates, they must trust the Certificate Authority
|
||||
which issued the other persons certificate, and they must exchange
|
||||
public keys with each other, as described above.
|
||||
|
||||
<p>
|
||||
The process of installing certificates and exchanging public keys is dependent
|
||||
upon the e-mail application one uses, and is beyond the scope of this document.
|
||||
<p>Remember, having a personal digital certificate alone does <strong>not</strong> give one the ability to send encrypted e-mail to others, but only allows the <strong>receipt</strong> of encrypted e-mail. PKI is a cooperative encryption standard. Both parties who are exchanging encrypted messages must have personal digital certificates, they must trust the Certificate Authority which issued the other persons certificate, and they must exchange public keys with each other, as described above.</p>
|
||||
|
||||
<p>The process of installing certificates and exchanging public keys is dependent upon the e-mail application one uses, and is beyond the scope of this document.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,29 +1,47 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Root Certificate Installation for Outlook & Outlook Express</title>
|
||||
<link rel='stylesheet' type='text/css' href='../css/style.css'>
|
||||
<title>Root Certificate Installation for Outlook & Outlook Express</title>
|
||||
<link rel='stylesheet' type='text/css' href='../css/style.css'>
|
||||
</head>
|
||||
<body>
|
||||
<center><h1>Root Certificate Installation for Outlook & Outlook Express</h1>
|
||||
<h2>A Step-by-Step Guide</h2></center><br>
|
||||
<h4>
|
||||
<p><img src=../images/right-click-install-cacert.jpg>
|
||||
<p>Open the folder which holds the certificates you have downloaded.<br>
|
||||
Right-click on the certificate you wish to install, and select
|
||||
<cite>Install Certificate</cite> from the context menu.
|
||||
<p><br><img src=../images/cert-wizard1-welcome.jpg >
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Certificate Wizard</cite>
|
||||
welcome window.
|
||||
<p><br><img src=../images/cert-wizard4-select-store.jpg>
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Select a Certificate Store</cite> window.
|
||||
<p><br><img src=../images/cert-wizard5-root-final.jpg>
|
||||
<p>Click the <cite>Finish</cite> button in the <cite>Complete the Certificate..</cite> window.
|
||||
<p><br><img src=../images/confirm-install-cacert.jpg>
|
||||
<p>You may be asked to confirm the root certificate installation. Click the <cite>Yes</cite> button if a window like this appears.
|
||||
<p><br><img src=../images/import-successful.jpg>
|
||||
<p>Windows confirms the root certificate was successfully imported.<br>
|
||||
You may now <a href=usercert_install_ie.html>install your personal e-mail certificate</a>.
|
||||
|
||||
</h4>
|
||||
<body>
|
||||
<center>
|
||||
<h1>Root Certificate Installation for Outlook & Outlook Express</h1>
|
||||
|
||||
<h2>A Step-by-Step Guide</h2>
|
||||
</center><br>
|
||||
|
||||
<p><img src="../images/right-click-install-cacert.jpg"></p>
|
||||
|
||||
<p>Open the folder which holds the certificates you have downloaded.<br>
|
||||
Right-click on the certificate you wish to install, and select <cite>Install Certificate</cite> from the context menu.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/cert-wizard1-welcome.jpg"></p>
|
||||
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Certificate Wizard</cite> welcome window.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/cert-wizard4-select-store.jpg"></p>
|
||||
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Select a Certificate Store</cite> window.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/cert-wizard5-root-final.jpg"></p>
|
||||
|
||||
<p>Click the <cite>Finish</cite> button in the <cite>Complete the Certificate..</cite> window.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/confirm-install-cacert.jpg"></p>
|
||||
|
||||
<p>You may be asked to confirm the root certificate installation. Click the <cite>Yes</cite> button if a window like this appears.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/import-successful.jpg"></p>
|
||||
|
||||
<p>Windows confirms the root certificate was successfully imported.<br>
|
||||
You may now <a href="usercert_install_ie.html">install your personal e-mail certificate</a>.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,144 +1,169 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>PHPki Glossary</title>
|
||||
<link rel='stylesheet' type='text/css' href='../css/style.css'>
|
||||
<title>PHPki Glossary</title>
|
||||
<link rel='stylesheet' type='text/css' href='../css/style.css'>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a name="TOP" id="TOP"></a> <a name="PKI" id="PKI"></a>
|
||||
|
||||
<a name=TOP></a>
|
||||
<a name=PKI></a><p>
|
||||
<table>
|
||||
<th><h2>PUBLIC KEY INFRASTRUCTURE</h2></th>
|
||||
<tr><td>
|
||||
PKI stands for <cite>Public Key Infrastructure</cite>. PKI is IT infrastructure that enables users of a basically unsecure public network (such as the Internet) to securely and privately exchange data through the use of a public and a private <a href=#KEYS>cryptographic key pair</a> that is obtained and shared through a trusted authority.
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>PUBLIC KEY INFRASTRUCTURE</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
PKI is not only software or hardware. It is an infrastructure. So, PKI is a combination of products, services, facilities, policies, procedures, agreements, and people. All of these elements work together to provide for secure interactions on the Internet and other open networks. PKI is not a single monolithic entity, but a distributed system. The component elements may include multiple organization-specific public key infrastructures that are interoperable and interconnected.
|
||||
</td></tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td>PKI stands for <cite>Public Key Infrastructure</cite>. PKI is IT infrastructure that enables users of a basically unsecure public network (such as the Internet) to securely and privately exchange data through the use of a public and a private <a href="#KEYS">cryptographic key pair</a> that is obtained and shared through a trusted authority. PKI is not only software or hardware. It is an infrastructure. So, PKI is a combination of products, services, facilities, policies, procedures, agreements, and people. All of these elements work together to provide for secure interactions on the Internet and other open networks. PKI is not a single monolithic entity, but a distributed system. The component elements may include multiple organization-specific public key infrastructures that are interoperable and interconnected.</td>
|
||||
</tr>
|
||||
</table><a name="CERTIFICATE" id="CERTIFICATE"></a>
|
||||
|
||||
<a name=CERTIFICATE></a><p>
|
||||
<table>
|
||||
<th><h2>DIGITAL CERTIFICATE</h2></th>
|
||||
<tr><td>
|
||||
<p>
|
||||
An attachment to an electronic message used for security purposes. The most common use of a digital certificate is to verify that a user sending a message is who he or she claims to be, and to provide the receiver with the means to encode a reply.
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>DIGITAL CERTIFICATE</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<p>An individual wishing to send an encrypted message applies for a digital certificate from a <a href=#CA>Certificate Authority (CA)</a>. The CA issues an encrypted digital certificate containing the applicant's <a href=#KEYS>public key</a> and a variety of other identification information. The CA makes its own public key readily available through print publicity or perhaps on the Internet.
|
||||
<tr>
|
||||
<td>
|
||||
<p>An attachment to an electronic message used for security purposes. The most common use of a digital certificate is to verify that a user sending a message is who he or she claims to be, and to provide the receiver with the means to encode a reply.</p>
|
||||
|
||||
<p>The recipient of an encrypted message uses the CA's public key to decode the digital certificate attached to the message, verifies it as issued by the CA and then obtains the sender's public key and identification information held within the certificate. With this information, the recipient can send an encrypted reply.
|
||||
<p>An individual wishing to send an encrypted message applies for a digital certificate from a <a href="#CA">Certificate Authority (CA)</a>. The CA issues an encrypted digital certificate containing the applicant's <a href="#KEYS">public key</a> and a variety of other identification information. The CA makes its own public key readily available through print publicity or perhaps on the Internet.</p>
|
||||
|
||||
<p>The most widely used standard for digital certificates is X.509.
|
||||
</td></tr>
|
||||
</table>
|
||||
<p>The recipient of an encrypted message uses the CA's public key to decode the digital certificate attached to the message, verifies it as issued by the CA and then obtains the sender's public key and identification information held within the certificate. With this information, the recipient can send an encrypted reply.</p>
|
||||
|
||||
<a name=CA></a><p>
|
||||
<table>
|
||||
<th><h2>CERTIFICATE AUTHORITY</h2></th>
|
||||
<tr><td>
|
||||
A trusted third-party organization or company that issues digital certificates used to create digital signatures and <a href=#KEYS>public-private key pairs</a>. The role of the CA in this process is to guarantee that the individual granted the unique certificate is, in fact, who he or she claims to be. Usually, this means that the CA has an arrangement with a financial institution, such as a credit card company, which provides it with information to confirm an individual's claimed identity. CAs are a critical component in data security and electronic commerce because they guarantee that the two parties exchanging information are really who they claim to be.
|
||||
</td></tr>
|
||||
</table>
|
||||
<p>The most widely used standard for digital certificates is X.509.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><a name="CA" id="CA"></a>
|
||||
|
||||
<a name=KEYS></a><p>
|
||||
<table>
|
||||
<th><h2>PUBLIC KEY ENCRYPTION</h2></th>
|
||||
<tr><td>
|
||||
A cryptographic system that uses two keys -- a public key known to everyone and a private or secret key known only to the recipient of the message. When John wants to send a secure message to Jane, he uses Jane's public key to encrypt the message. Jane then uses her private key to decrypt it.
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>CERTIFICATE AUTHORITY</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<p>An important element to the public key system is that the public and private keys are related in such a way that only the public key can be used to encrypt messages and only the corresponding private key can be used to decrypt them. Moreover, it is virtually impossible to deduce the private key if you know the public key.
|
||||
</td></tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td>A trusted third-party organization or company that issues digital certificates used to create digital signatures and <a href="#KEYS">public-private key pairs</a>. The role of the CA in this process is to guarantee that the individual granted the unique certificate is, in fact, who he or she claims to be. Usually, this means that the CA has an arrangement with a financial institution, such as a credit card company, which provides it with information to confirm an individual's claimed identity. CAs are a critical component in data security and electronic commerce because they guarantee that the two parties exchanging information are really who they claim to be.</td>
|
||||
</tr>
|
||||
</table><a name="KEYS" id="KEYS"></a>
|
||||
|
||||
<a name=SMIME></a><p>
|
||||
<table>
|
||||
<th><h2>S/MIME</h2></th>
|
||||
<tr><td>
|
||||
S/MIME (Secure Multi-Purpose Internet Mail Extensions) is a secure method of sending e-mail that uses the <a href=#RSA>RSA</a> encryption system. S/MIME is included in the latest versions of the Web browsers from Microsoft and Netscape and has also been endorsed by other vendors that make messaging products. RSA has proposed S/MIME as a standard to the Internet Engineering Task Force (IETF).
|
||||
</td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>PUBLIC KEY ENCRYPTION</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<a name=RSA></a><p>
|
||||
<table>
|
||||
<th><h2>RSA</h2></th>
|
||||
<tr><td>
|
||||
RSA is an Internet encryption and authentication system that uses an algorithm developed in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman. The RSA algorithm is the most commonly used encryption and authentication algorithm and is included as part of the Web browsers from Microsoft and Netscape. It's also part of Lotus Notes, Intuit's Quicken, and many other products. The encryption system was owned by RSA Security, but a recent patent expiration placed it into the public domain. The technologies are part of existing or proposed Web, Internet, and computing standards.
|
||||
</td></tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td>
|
||||
<p>A cryptographic system that uses two keys -- a public key known to everyone and a private or secret key known only to the recipient of the message. When John wants to send a secure message to Jane, he uses Jane's public key to encrypt the message. Jane then uses her private key to decrypt it.</p>
|
||||
|
||||
<a name=ROOT-CERT></a><p>
|
||||
<table>
|
||||
<th><h2>ROOT CERTIFICATE</h2></th>
|
||||
<tr><td>
|
||||
A root certificate is like a MASTER
|
||||
<a href=#CERTIFICATE>digital certificate</a>.
|
||||
You must install a <a href=#CA>certificate authority's</a> root certificate
|
||||
before you can trust other certificates issued by that same certificate
|
||||
authority. Root certificates are used to "sign" other certificates.
|
||||
A signature by a root certificate is somewhat analogous to "notarizing" a
|
||||
document in the physical world. When you install a root certificate on your
|
||||
computer, you are saying you "trust" that certification authority and all
|
||||
certificates it signs.
|
||||
</td></tr>
|
||||
</table>
|
||||
<p>An important element to the public key system is that the public and private keys are related in such a way that only the public key can be used to encrypt messages and only the corresponding private key can be used to decrypt them. Moreover, it is virtually impossible to deduce the private key if you know the public key.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table><a name="SMIME" id="SMIME"></a>
|
||||
|
||||
<a name=SIGNATURE></a><p>
|
||||
<table>
|
||||
<th><h2>DIGITAL SIGNATURE</h2></th>
|
||||
<tr><td>
|
||||
A digital code that can be attached to an electronically transmitted message
|
||||
that uniquely identifies the sender. Like a written signature, the purpose of
|
||||
a digital signature is to guarantee that the individual sending the message
|
||||
really is who he or she claims to be. Digital certificates inherently provide
|
||||
digital signature capability to most S/MIME enable e-mail clients. Digitally
|
||||
signing an e-mail usually provides the recipient the with the sender's public
|
||||
key, so the recipient may then send encrypted e-mail back to the sender.
|
||||
</td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>S/MIME</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<a name=X509></a><p>
|
||||
<table>
|
||||
<th><h2>X.509</h2></th>
|
||||
<tr><td>
|
||||
The most widely used standard for defining digital certificates. X.509 is
|
||||
actually an ITU Recommendation, which means that has not yet been officially
|
||||
defined or approved. As a result, companies have implemented the standard in
|
||||
different ways. For example, both Netscape and Microsoft use X.509 certificates
|
||||
to implement SSL in their web servers and browsers. But an X.509 certificate
|
||||
generated by Netscape may not be readable by Microsoft products, and vice
|
||||
versa.
|
||||
</td></tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td>S/MIME (Secure Multi-Purpose Internet Mail Extensions) is a secure method of sending e-mail that uses the <a href="#RSA">RSA</a> encryption system. S/MIME is included in the latest versions of the Web browsers from Microsoft and Netscape and has also been endorsed by other vendors that make messaging products. RSA has proposed S/MIME as a standard to the Internet Engineering Task Force (IETF).</td>
|
||||
</tr>
|
||||
</table><a name="RSA" id="RSA"></a>
|
||||
|
||||
<a name=PEM></a><p>
|
||||
<table>
|
||||
<th><h2>PEM</h2></th>
|
||||
<tr><td>
|
||||
PEM is a widely used standard for storing digital certificates.
|
||||
A PEM encoded file can contain all of private keys, public keys, and
|
||||
<a href=#X509>(x.509)</a> certificates. It is the default format for OpenSSL.
|
||||
It stores data in Base64 encoded format, surrounded by ascii headers, so it is
|
||||
suitable for text mode transfers between systems. PEM files usually end with
|
||||
a <cite>.PEM</cite> extension.
|
||||
</td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>RSA</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<a name=DER></a><p>
|
||||
<table>
|
||||
<th><h2>DER</h2></th>
|
||||
<tr><td>
|
||||
DER is a widely used standard for storing digital certificates. A DER encoded
|
||||
file can contain all of private keys, public keys, and <a href=#X509>(x.509)</a>
|
||||
certificates. DER is a binary encoded headerless format. DER files usually
|
||||
end with a <cite>.CRT</cite> or <cite>.CER</cite> extension.
|
||||
</td></tr>
|
||||
</table>
|
||||
<tr>
|
||||
<td>RSA is an Internet encryption and authentication system that uses an algorithm developed in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman. The RSA algorithm is the most commonly used encryption and authentication algorithm and is included as part of the Web browsers from Microsoft and Netscape. It's also part of Lotus Notes, Intuit's Quicken, and many other products. The encryption system was owned by RSA Security, but a recent patent expiration placed it into the public domain. The technologies are part of existing or proposed Web, Internet, and computing standards.</td>
|
||||
</tr>
|
||||
</table><a name="ROOT-CERT" id="ROOT-CERT"></a>
|
||||
|
||||
<a name=PKCS12></a><p>
|
||||
<table>
|
||||
<th><h2>PKCS #12</h2></th>
|
||||
<tr><td>
|
||||
PKCS #12 (a.k.a. Personal Information Exchange Standard) is a standard for storing private keys and certificates securely (well sort of). It is used in (among other things) Netscape and Microsoft Internet Explorer with their import and export options. PKCS12 files usually end with a <cite>.PFX</cite> extension.
|
||||
</td></tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>ROOT CERTIFICATE</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<br><br></body></html>
|
||||
<tr>
|
||||
<td>A root certificate is like a MASTER <a href="#CERTIFICATE">digital certificate</a>. You must install a <a href="#CA">certificate authority's</a> root certificate before you can trust other certificates issued by that same certificate authority. Root certificates are used to "sign" other certificates. A signature by a root certificate is somewhat analogous to "notarizing" a document in the physical world. When you install a root certificate on your computer, you are saying you "trust" that certification authority and all certificates it signs.</td>
|
||||
</tr>
|
||||
</table><a name="SIGNATURE" id="SIGNATURE"></a>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>DIGITAL SIGNATURE</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>A digital code that can be attached to an electronically transmitted message that uniquely identifies the sender. Like a written signature, the purpose of a digital signature is to guarantee that the individual sending the message really is who he or she claims to be. Digital certificates inherently provide digital signature capability to most S/MIME enable e-mail clients. Digitally signing an e-mail usually provides the recipient the with the sender's public key, so the recipient may then send encrypted e-mail back to the sender.</td>
|
||||
</tr>
|
||||
</table><a name="X509" id="X509"></a>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>X.509</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>The most widely used standard for defining digital certificates. X.509 is actually an ITU Recommendation, which means that has not yet been officially defined or approved. As a result, companies have implemented the standard in different ways. For example, both Netscape and Microsoft use X.509 certificates to implement SSL in their web servers and browsers. But an X.509 certificate generated by Netscape may not be readable by Microsoft products, and vice versa.</td>
|
||||
</tr>
|
||||
</table><a name="PEM" id="PEM"></a>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>PEM</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>PEM is a widely used standard for storing digital certificates. A PEM encoded file can contain all of private keys, public keys, and <a href="#X509">(x.509)</a> certificates. It is the default format for OpenSSL. It stores data in Base64 encoded format, surrounded by ascii headers, so it is suitable for text mode transfers between systems. PEM files usually end with a <cite>.PEM</cite> extension.</td>
|
||||
</tr>
|
||||
</table><a name="DER" id="DER"></a>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>DER</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>DER is a widely used standard for storing digital certificates. A DER encoded file can contain all of private keys, public keys, and <a href="#X509">(x.509)</a> certificates. DER is a binary encoded headerless format. DER files usually end with a <cite>.CRT</cite> or <cite>.CER</cite> extension.</td>
|
||||
</tr>
|
||||
</table><a name="PKCS12" id="PKCS12"></a>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
<h2>PKCS #12</h2>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>PKCS #12 (a.k.a. Personal Information Exchange Standard) is a standard for storing private keys and certificates securely (well sort of). It is used in (among other things) Netscape and Microsoft Internet Explorer with their import and export options. PKCS12 files usually end with a <cite>.PFX</cite> extension.</td>
|
||||
</tr>
|
||||
</table><br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -1,40 +1,51 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Personal E-mail Certificate Installation for Outlook & Outlook Express</title>
|
||||
<link rel='stylesheet' type='text/css' href='../css/style.css'>
|
||||
<title>Personal E-mail Certificate Installation for Outlook & Outlook Express</title>
|
||||
<link rel='stylesheet' type='text/css' href='../css/style.css'>
|
||||
</head>
|
||||
<body>
|
||||
<center><h1>Personal E-mail Certificate Installation for Outlook & Outlook Express</h1>
|
||||
<h2>A Step-by-Step Guide</h2></center><br>
|
||||
<h4>
|
||||
<p><img src=../images/right-click-install-usercert.jpg>
|
||||
<p>Open the folder which holds the certificates you have downloaded.<br>
|
||||
Right-click on the certificate you wish to install, and select
|
||||
<cite>Install PFX</cite> from the context menu.
|
||||
<p><br><img src=../images/cert-wizard1-welcome.jpg >
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Certificate Wizard</cite>
|
||||
welcome window.
|
||||
<p><br><img src=../images/cert-wizard2-select-file.jpg>
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Select File to Import</cite> window.
|
||||
<p><br><img src=../images/cert-wizard3-password.jpg>
|
||||
<p>The personal e-mail certificate files created by PHPki contain an encrypted
|
||||
copy of your private key. When your certficate was created, a password was
|
||||
given to PHPki to encrypt the private key. The same password is used to
|
||||
decrypt your private key and install the certificate. Do not forget or lose
|
||||
this password as it cannot be recovered under any circumstance.
|
||||
Select the <cite>Enable strong private key protection</cite> option if you
|
||||
would like Windows to add an additional layer of password protection to use
|
||||
your certificate. This is not necessary, and will not be covered further here.
|
||||
There is no need to select the <cite>Mark the private key as exportable</cite>
|
||||
option. Enter your certificate password and click the <cite>Next</cite> button
|
||||
in the <cite>Password Protection for Private Keys</cite> window.
|
||||
<p><br><img src=../images/cert-wizard4-select-store.jpg>
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Select a Certificate Store</cite> window.
|
||||
<p><br><img src=../images/cert-wizard5-user-final.jpg>
|
||||
<p>Click the <cite>Finish</cite> button in the <cite>Complete the Certificate..</cite> window.
|
||||
<p><br><img src=../images/import-successful.jpg>
|
||||
<p>Windows confirms the root certificate was successfully imported.<br>
|
||||
|
||||
</h4>
|
||||
<body>
|
||||
<center>
|
||||
<h1>Personal E-mail Certificate Installation for Outlook & Outlook Express</h1>
|
||||
|
||||
<h2>A Step-by-Step Guide</h2>
|
||||
</center><br>
|
||||
|
||||
<p><img src="../images/right-click-install-usercert.jpg"></p>
|
||||
|
||||
<p>Open the folder which holds the certificates you have downloaded.<br>
|
||||
Right-click on the certificate you wish to install, and select <cite>Install PFX</cite> from the context menu.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/cert-wizard1-welcome.jpg"></p>
|
||||
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Certificate Wizard</cite> welcome window.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/cert-wizard2-select-file.jpg"></p>
|
||||
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Select File to Import</cite> window.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/cert-wizard3-password.jpg"></p>
|
||||
|
||||
<p>The personal e-mail certificate files created by PHPki contain an encrypted copy of your private key. When your certficate was created, a password was given to PHPki to encrypt the private key. The same password is used to decrypt your private key and install the certificate. Do not forget or lose this password as it cannot be recovered under any circumstance. Select the <cite>Enable strong private key protection</cite> option if you would like Windows to add an additional layer of password protection to use your certificate. This is not necessary, and will not be covered further here. There is no need to select the <cite>Mark the private key as exportable</cite> option. Enter your certificate password and click the <cite>Next</cite> button in the <cite>Password Protection for Private Keys</cite> window.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/cert-wizard4-select-store.jpg"></p>
|
||||
|
||||
<p>Click the <cite>Next</cite> button in the <cite>Select a Certificate Store</cite> window.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/cert-wizard5-user-final.jpg"></p>
|
||||
|
||||
<p>Click the <cite>Finish</cite> button in the <cite>Complete the Certificate..</cite> window.</p>
|
||||
|
||||
<p><br>
|
||||
<img src="../images/import-successful.jpg"></p>
|
||||
|
||||
<p>Windows confirms the root certificate was successfully imported.<br></p>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -2,46 +2,48 @@
|
||||
|
||||
umask(0007);
|
||||
|
||||
if (isset($_SERVER['PHP_AUTH_USER']))
|
||||
$PHPki_user = md5($_SERVER['PHP_AUTH_USER']);
|
||||
else
|
||||
$PHPki_user = md5('default');
|
||||
if (isset($_SERVER['PHP_AUTH_USER'])) {
|
||||
$PHPki_user = md5($_SERVER['PHP_AUTH_USER']);
|
||||
} else {
|
||||
$PHPki_user = md5('default');
|
||||
}
|
||||
|
||||
$PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, "utf-8");
|
||||
|
||||
|
||||
function printHeader($withmenu="default") {
|
||||
global $config;
|
||||
$title = ($config['header_title']?$config['header_title']:'PHPki Certificate Authority');
|
||||
function printHeader($withmenu = "default")
|
||||
{
|
||||
global $config;
|
||||
$title = ($config['header_title']?$config['header_title']:'PHPki Certificate Authority');
|
||||
|
||||
switch ($withmenu) {
|
||||
case 'public':
|
||||
case 'about':
|
||||
case 'setup':
|
||||
$style_css = './css/style.css';
|
||||
break;
|
||||
case 'ca':
|
||||
case 'admin':
|
||||
default:
|
||||
$style_css = '../css/style.css';
|
||||
break;
|
||||
}
|
||||
switch ($withmenu) {
|
||||
case 'public':
|
||||
case 'about':
|
||||
case 'setup':
|
||||
$style_css = './css/style.css';
|
||||
break;
|
||||
case 'ca':
|
||||
case 'admin':
|
||||
default:
|
||||
$style_css = '../css/style.css';
|
||||
break;
|
||||
}
|
||||
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Expires: -1");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Expires: -1");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PHPki: <?php echo $title?> </title>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $style_css?>">
|
||||
<script type="text/javascript" language="javascript">
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PHPki: <?php echo $title?> </title>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $style_css?>">
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
function setVisibility(rowName, show) {
|
||||
function setVisibility(rowName, show) {
|
||||
// Tabellenzelle ermitteln
|
||||
|
||||
var actualVisibility=document.getElementById(rowName).style.visibility;
|
||||
@@ -53,96 +55,94 @@ function printHeader($withmenu="default") {
|
||||
document.getElementById(rowName).style.visibility = "visible";
|
||||
document.getElementById(rowName).style.display = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
if (isKonq()) {
|
||||
$logoclass = 'logo-konq';
|
||||
$titleclass = 'title-konq';
|
||||
$menuclass = 'headermenu-konq';
|
||||
}
|
||||
else {
|
||||
$logoclass = 'logo-ie';
|
||||
$titleclass = 'title-ie';
|
||||
$menuclass = 'headermenu-ie';
|
||||
}
|
||||
if (isKonq()) {
|
||||
$logoclass = 'logo-konq';
|
||||
$titleclass = 'title-konq';
|
||||
$menuclass = 'headermenu-konq';
|
||||
} else {
|
||||
$logoclass = 'logo-ie';
|
||||
$titleclass = 'title-ie';
|
||||
$menuclass = 'headermenu-ie';
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="<?php echo $logoclass?>">PHPki</div>
|
||||
<div class="<?php echo $titleclass?>"><?php echo $title?></div>
|
||||
<?php
|
||||
?>
|
||||
<div class="<?php echo $logoclass?>">PHPki</div>
|
||||
<div class="<?php echo $titleclass?>"><?php echo $title?></div>
|
||||
<?php
|
||||
|
||||
switch ($withmenu) {
|
||||
case false:
|
||||
case 'about':
|
||||
break;
|
||||
case 'setup':
|
||||
?>
|
||||
<div class="<?php echo $menuclass?>">
|
||||
<a class="<?php echo $menuclass?>" href="readme.php">ReadMe</a>
|
||||
<a class="<?php echo $menuclass?>" href="setup.php">Setup</a>
|
||||
<a class="<?php echo $menuclass?>" href="about.php" target="_about">About</a>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
case 'public':
|
||||
print "<div class=$menuclass>";
|
||||
switch ($withmenu) {
|
||||
case false:
|
||||
case 'about':
|
||||
break;
|
||||
case 'setup':
|
||||
?>
|
||||
<div class="<?php echo $menuclass?>">
|
||||
<a class="<?php echo $menuclass?>" href="readme.php">ReadMe</a>
|
||||
<a class="<?php echo $menuclass?>" href="setup.php">Setup</a>
|
||||
<a class="<?php echo $menuclass?>" href="about.php" target="_about">About</a>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
case 'public':
|
||||
print "<div class=$menuclass>";
|
||||
|
||||
if (DEMO) {
|
||||
print "<a class=$menuclass href=\"index.php\">Public</a>";
|
||||
print "<a class=$menuclass href=\"ca/\">Manage</a>";
|
||||
}
|
||||
else {
|
||||
print "<a class=$menuclass href=\"index.php\">Menu</a>";
|
||||
}
|
||||
if (DEMO) {
|
||||
print "<a class=$menuclass href=\"index.php\">Public</a>";
|
||||
print "<a class=$menuclass href=\"ca/\">Manage</a>";
|
||||
} else {
|
||||
print "<a class=$menuclass href=\"index.php\">Menu</a>";
|
||||
}
|
||||
|
||||
if (file_exists('policy.html')) {
|
||||
print '<a class='.$menuclass.' style="color: red;" href="policy.html" target="help">Policy</a>';
|
||||
}
|
||||
?>
|
||||
<a class="<?php echo $menuclass?>" href="help.php" target="_help">Help</a>
|
||||
<a class="<?php echo $menuclass?>" href="about.php" target="_about">About</a>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
case 'ca':
|
||||
default:
|
||||
print "<div class=$menuclass>";
|
||||
if (file_exists('policy.html')) {
|
||||
print '<a class='.$menuclass.' style="color: red;" href="policy.html" target="help">Policy</a>';
|
||||
}
|
||||
?>
|
||||
<a class="<?php echo $menuclass?>" href="help.php" target="_help">Help</a>
|
||||
<a class="<?php echo $menuclass?>" href="about.php" target="_about">About</a>
|
||||
</div>
|
||||
<?php
|
||||
break;
|
||||
case 'ca':
|
||||
default:
|
||||
print "<div class=$menuclass>";
|
||||
|
||||
if (DEMO) {
|
||||
print "<a class=$menuclass href=\"../index.php\">Public</a>";
|
||||
print "<a class=$menuclass href=\"../ca/index.php\">Manage</a>";
|
||||
}
|
||||
else {
|
||||
print "<a class=$menuclass href=\"index.php\">Menu</a>";
|
||||
}
|
||||
if (DEMO) {
|
||||
print "<a class=$menuclass href=\"../index.php\">Public</a>";
|
||||
print "<a class=$menuclass href=\"../ca/index.php\">Manage</a>";
|
||||
} else {
|
||||
print "<a class=$menuclass href=\"index.php\">Menu</a>";
|
||||
}
|
||||
|
||||
if (file_exists('../policy.html')) {
|
||||
print '<a class='.$menuclass.' style="color: red;" href="../policy.html" target="help">Policy</a>';
|
||||
}
|
||||
?>
|
||||
<a class="<?php echo $menuclass?>" href="../help.php" target="_help">Help</a>
|
||||
<a class="<?php echo $menuclass?>" href="../about.php" target="_about">About</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if (file_exists('../policy.html')) {
|
||||
print '<a class='.$menuclass.' style="color: red;" href="../policy.html" target="help">Policy</a>';
|
||||
}
|
||||
?>
|
||||
<a class="<?php echo $menuclass?>" href="../help.php" target="_help">Help</a>
|
||||
<a class="<?php echo $menuclass?>" href="../about.php" target="_about">About</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
?><hr style="width:99%; align:left; color:#99caff;" /><?php
|
||||
?><hr style="width:99%; align:left; color:#99caff;" /><?php
|
||||
}
|
||||
|
||||
|
||||
function printFooter() {
|
||||
?>
|
||||
<br />
|
||||
<hr style="width:99%; color:#99caff;" />
|
||||
<p style="margin-top: -5px; font-size: 8pt; text-align:center;">PHPki v<?php echo PHPKI_VERSION?> - Copyright 2003 - William E. Roadcap</p>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
function printFooter()
|
||||
{
|
||||
?>
|
||||
<br />
|
||||
<hr style="width:99%; color:#99caff;" />
|
||||
<p style="margin-top: -5px; font-size: 8pt; text-align:center;">PHPki v<?php echo PHPKI_VERSION?> - Copyright 2003 - William E. Roadcap</p>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -5,49 +5,57 @@ $PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, "utf-8");
|
||||
#
|
||||
# Returns TRUE if browser is Internet Explorer.
|
||||
#
|
||||
function isIE() {
|
||||
global $_SERVER;
|
||||
return strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE');
|
||||
function isIE()
|
||||
{
|
||||
global $_SERVER;
|
||||
return strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE');
|
||||
}
|
||||
|
||||
function isKonq() {
|
||||
global $_SERVER;
|
||||
return strstr($_SERVER['HTTP_USER_AGENT'], 'Konqueror');
|
||||
function isKonq()
|
||||
{
|
||||
global $_SERVER;
|
||||
return strstr($_SERVER['HTTP_USER_AGENT'], 'Konqueror');
|
||||
}
|
||||
|
||||
function isMoz() {
|
||||
global $_SERVER;
|
||||
return strstr($_SERVER['HTTP_USER_AGENT'], 'Gecko');
|
||||
function isMoz()
|
||||
{
|
||||
global $_SERVER;
|
||||
return strstr($_SERVER['HTTP_USER_AGENT'], 'Gecko');
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Force upload of specified file to browser.
|
||||
#
|
||||
function upload($source, $destination, $content_type="application/octet-stream") {
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Expires: -1");
|
||||
# header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
# header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
# header("Pragma: no-cache");
|
||||
function upload($source, $destination, $content_type = "application/octet-stream")
|
||||
{
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Expires: -1");
|
||||
# header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
# header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
# header("Pragma: no-cache");
|
||||
header("Content-Type: $content_type");
|
||||
|
||||
if (is_array($source)) {
|
||||
$fsize = 0;
|
||||
foreach($source as $f) $fsize += filesize($f);
|
||||
}
|
||||
else {
|
||||
$fsize = filesize($source);
|
||||
}
|
||||
if (is_array($source)) {
|
||||
$fsize = 0;
|
||||
foreach ($source as $f) {
|
||||
$fsize += filesize($f);
|
||||
}
|
||||
} else {
|
||||
$fsize = filesize($source);
|
||||
}
|
||||
|
||||
header("Content-length: " . $fsize);
|
||||
header("Content-length: " . $fsize);
|
||||
# header("Content-Disposition: attachment; filename=\"" . $destination ."\"");
|
||||
header("Content-Disposition: filename=\"" . $destination ."\"");
|
||||
|
||||
if (is_array($source))
|
||||
foreach($source as $f) $ret = readfile($f);
|
||||
else
|
||||
$ret=readfile($source);
|
||||
if (is_array($source)) {
|
||||
foreach ($source as $f) {
|
||||
$ret = readfile($f);
|
||||
}
|
||||
} else {
|
||||
$ret=readfile($source);
|
||||
}
|
||||
|
||||
# $fd=fopen($source,'r');
|
||||
# fpassthru($fd);
|
||||
@@ -60,35 +68,51 @@ function upload($source, $destination, $content_type="application/octet-stream")
|
||||
# by field name. POST fields have precedence over GET fields.
|
||||
# Quoting/Slashes are stripped if magic quotes gpc is on.
|
||||
#
|
||||
function gpvar($v) {
|
||||
global $_GET, $_POST;
|
||||
function gpvar($v)
|
||||
{
|
||||
global $_GET, $_POST;
|
||||
$x = "";
|
||||
if (isset($_GET[$v])) $x = $_GET[$v];
|
||||
if (isset($_POST[$v])) $x = $_POST[$v];
|
||||
if (get_magic_quotes_gpc()) $x = stripslashes($x);
|
||||
return $x;
|
||||
if (isset($_GET[$v])) {
|
||||
$x = $_GET[$v];
|
||||
}
|
||||
if (isset($_POST[$v])) {
|
||||
$x = $_POST[$v];
|
||||
}
|
||||
if (get_magic_quotes_gpc()) {
|
||||
$x = stripslashes($x);
|
||||
}
|
||||
return $x;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Sort a two multidimensional array by one of it's columns
|
||||
#
|
||||
function csort($array, $column, $ascdec=SORT_ASC){
|
||||
function csort($array, $column, $ascdec = SORT_ASC)
|
||||
{
|
||||
|
||||
if (sizeof($array) == 0) return $array;
|
||||
if (sizeof($array) == 0) {
|
||||
return $array;
|
||||
}
|
||||
|
||||
// Sort by digital date rather than text date
|
||||
if ($column == 'issued') $column = "issuedSort";
|
||||
if ($column == 'expires') $column = 'expiresSort';
|
||||
if ($column == 'issued') {
|
||||
$column = "issuedSort";
|
||||
}
|
||||
if ($column == 'expires') {
|
||||
$column = 'expiresSort';
|
||||
}
|
||||
|
||||
if ($column == 'status') {
|
||||
foreach($array as $x) {
|
||||
$sortarr[]=$x[$column];
|
||||
$sortdate[] = $x['expiresSort'];
|
||||
}
|
||||
foreach ($array as $x) {
|
||||
$sortarr[]=$x[$column];
|
||||
$sortdate[] = $x['expiresSort'];
|
||||
}
|
||||
array_multisort($sortarr, $ascdec, $sortdate, SORT_ASC, $array);
|
||||
} else {
|
||||
foreach($array as $x) $sortarr[]=$x[$column];
|
||||
foreach ($array as $x) {
|
||||
$sortarr[]=$x[$column];
|
||||
}
|
||||
array_multisort($sortarr, $ascdec, $array);
|
||||
}
|
||||
return $array;
|
||||
@@ -99,11 +123,13 @@ function csort($array, $column, $ascdec=SORT_ASC){
|
||||
# Returns a value suitable for display in the browser.
|
||||
# Strips slashes if second argument is true.
|
||||
#
|
||||
function htvar($v, $strip=false) {
|
||||
if ($strip)
|
||||
return htmlentities(stripslashes($v), 0, "UTF-8");
|
||||
else
|
||||
return htmlentities($v, 0, "UTF-8");
|
||||
function htvar($v, $strip = false)
|
||||
{
|
||||
if ($strip) {
|
||||
return htmlentities(stripslashes($v), 0, "UTF-8");
|
||||
} else {
|
||||
return htmlentities($v, 0, "UTF-8");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,11 +139,13 @@ function htvar($v, $strip=false) {
|
||||
# provided strings with single-quotes and quotes any
|
||||
# other dangerous characters.
|
||||
#
|
||||
function escshellarg($v, $strip=false) {
|
||||
if ($strip)
|
||||
return escapeshellarg(stripslashes($v));
|
||||
else
|
||||
return escapeshellarg($v);
|
||||
function escshellarg($v, $strip = false)
|
||||
{
|
||||
if ($strip) {
|
||||
return escapeshellarg(stripslashes($v));
|
||||
} else {
|
||||
return escapeshellarg($v);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,93 +153,103 @@ function escshellarg($v, $strip=false) {
|
||||
# Similar to escshellarg(), but doesn't surround provided
|
||||
# string with single-quotes.
|
||||
#
|
||||
function escshellcmd($v, $strip=false) {
|
||||
if ($strip)
|
||||
return escapeshellcmd(stripslashes($v));
|
||||
else
|
||||
return escapeshellarg($v);
|
||||
function escshellcmd($v, $strip = false)
|
||||
{
|
||||
if ($strip) {
|
||||
return escapeshellcmd(stripslashes($v));
|
||||
} else {
|
||||
return escapeshellarg($v);
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Recursively strips slashes from a string or array.
|
||||
#
|
||||
function stripslashes_array(&$a) {
|
||||
if (is_array($a)) {
|
||||
foreach($a as $k => $v) {
|
||||
my_stripslashes($a[$k]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$a = stripslashes($a);
|
||||
}
|
||||
function stripslashes_array(&$a)
|
||||
{
|
||||
if (is_array($a)) {
|
||||
foreach ($a as $k => $v) {
|
||||
my_stripslashes($a[$k]);
|
||||
}
|
||||
} else {
|
||||
$a = stripslashes($a);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Don't use this.
|
||||
#
|
||||
function undo_magic_quotes(&$a) {
|
||||
if(get_magic_quotes_gpc()) {
|
||||
global $HTTP_POST_VARS, $HTTP_GET_VARS;
|
||||
function undo_magic_quotes(&$a)
|
||||
{
|
||||
if (get_magic_quotes_gpc()) {
|
||||
global $HTTP_POST_VARS, $HTTP_GET_VARS;
|
||||
|
||||
foreach($HTTP_POST_VARS as $k => $v) {
|
||||
stripslashes_array($HTTP_POST_VARS[$k]);
|
||||
global $$k;
|
||||
stripslashes_array($$k);
|
||||
}
|
||||
foreach($HTTP_GET_VARS as $k => $v) {
|
||||
stripslashes_array($HTTP_GET_VARS[$k]);
|
||||
global $$k;
|
||||
stripslashes_array($$k);
|
||||
}
|
||||
}
|
||||
foreach ($HTTP_POST_VARS as $k => $v) {
|
||||
stripslashes_array($HTTP_POST_VARS[$k]);
|
||||
global $$k;
|
||||
stripslashes_array($$k);
|
||||
}
|
||||
foreach ($HTTP_GET_VARS as $k => $v) {
|
||||
stripslashes_array($HTTP_GET_VARS[$k]);
|
||||
global $$k;
|
||||
stripslashes_array($$k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Returns TRUE if argument contains only alphabetic characters.
|
||||
#
|
||||
function is_alpha($v) {
|
||||
#return (eregi('[^A-Z]',$v) ? false : true) ;
|
||||
#return (preg_match('/[^A-Z]'.'/i',$v,PCRE_CASELESS) ? false : true) ; # Replaced eregi() with preg_match()
|
||||
return (preg_match('/[^A-Z]/i',$v) ? false : true) ;
|
||||
function is_alpha($v)
|
||||
{
|
||||
#return (eregi('[^A-Z]',$v) ? false : true) ;
|
||||
#return (preg_match('/[^A-Z]'.'/i',$v,PCRE_CASELESS) ? false : true) ; # Replaced eregi() with preg_match()
|
||||
return (preg_match('/[^A-Z]/i', $v) ? false : true) ;
|
||||
}
|
||||
|
||||
#
|
||||
# Returns TRUE if argument contains only numeric characters.
|
||||
#
|
||||
function is_num($v) {
|
||||
#return (eregi('[^0-9]',$v) ? false : true) ;
|
||||
return (preg_match('/[^0-9]/',$v) ? false : true) ; # Replaced eregi() with preg_match()
|
||||
function is_num($v)
|
||||
{
|
||||
#return (eregi('[^0-9]',$v) ? false : true) ;
|
||||
return (preg_match('/[^0-9]/', $v) ? false : true) ; # Replaced eregi() with preg_match()
|
||||
}
|
||||
|
||||
#
|
||||
# Returns TRUE if argument contains only alphanumeric characters.
|
||||
#
|
||||
function is_alnum($v) {
|
||||
#return (eregi('[^A-Z0-9]',$v) ? false : true) ;
|
||||
return (preg_match('/[^A-Z0-9]/i',$v) ? false : true) ; # Replaced eregi() with preg_match()
|
||||
function is_alnum($v)
|
||||
{
|
||||
#return (eregi('[^A-Z0-9]',$v) ? false : true) ;
|
||||
return (preg_match('/[^A-Z0-9]/i', $v) ? false : true) ; # Replaced eregi() with preg_match()
|
||||
}
|
||||
|
||||
#
|
||||
# Returns TRUE if argument is in proper e-mail address format.
|
||||
#
|
||||
function is_email($v) {
|
||||
#return (eregi('^[^@ ]+\@[^@ ]+\.[A-Z]{2,4}$',$v) ? true : false);
|
||||
return (preg_match('/^[^@ ]+\@[^@ ]+\.[A-Z]{2,4}$'.'/i',$v) ? true : false); # Replaced eregi() with preg_match()
|
||||
function is_email($v)
|
||||
{
|
||||
#return (eregi('^[^@ ]+\@[^@ ]+\.[A-Z]{2,4}$',$v) ? true : false);
|
||||
return (preg_match('/^[^@ ]+\@[^@ ]+\.[A-Z]{2,4}$'.'/i', $v) ? true : false); # Replaced eregi() with preg_match()
|
||||
}
|
||||
|
||||
#
|
||||
# Returns True if the given string is a IP address
|
||||
#
|
||||
function is_ip( $ip = null ) {
|
||||
if( !$ip or strlen(trim($ip)) == 0){
|
||||
function is_ip($ip = null)
|
||||
{
|
||||
if (!$ip or strlen(trim($ip)) == 0) {
|
||||
return false;
|
||||
}
|
||||
$ip=trim($ip);
|
||||
if(preg_match("/^[0-9]{1,3}(.[0-9]{1,3}){3}$/",$ip)) {
|
||||
foreach(explode(".", $ip) as $block)
|
||||
if($block<0 || $block>255 )
|
||||
if (preg_match("/^[0-9]{1,3}(.[0-9]{1,3}){3}$/", $ip)) {
|
||||
foreach (explode(".", $ip) as $block) {
|
||||
if ($block<0 || $block>255) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -220,9 +258,10 @@ function is_ip( $ip = null ) {
|
||||
#
|
||||
# Returns True if the given string is a valid FQDN
|
||||
#
|
||||
function is_fqdn($FQDN) {
|
||||
function is_fqdn($FQDN)
|
||||
{
|
||||
// remove leading wildcard characters if exist
|
||||
$FQDN = preg_replace('/^\*\./','', $FQDN, 1);
|
||||
$FQDN = preg_replace('/^\*\./', '', $FQDN, 1);
|
||||
return (!empty($FQDN) && preg_match('/^(?=.{1,254}$)((?=[a-z0-9-]{1,63}\.)(xn--+)?[a-z0-9]+(-[a-z0-9]+)*\.)+(xn--+)?[a-z0-9]{2,63}$/i', $FQDN) > 0);
|
||||
}
|
||||
|
||||
@@ -231,26 +270,31 @@ function is_fqdn($FQDN) {
|
||||
# as a match is found.
|
||||
#
|
||||
|
||||
function eregi_array($regexp, $arr) {
|
||||
function eregi_array($regexp, $arr)
|
||||
{
|
||||
|
||||
foreach ($arr as $elem) {
|
||||
#if (eregi($regexp,$elem))
|
||||
if (! preg_match('/^\/.*\/$/', $regexp)) # if it doesn't begin and end with '/'
|
||||
$regexp = '/'.$regexp.'/'; # pad the $regexp with '/' to prepare for preg_match()
|
||||
if (preg_match($regexp.'i',$elem)) # Replaced eregi() with preg_match()
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
foreach ($arr as $elem) {
|
||||
#if (eregi($regexp,$elem))
|
||||
if (! preg_match('/^\/.*\/$/', $regexp)) { # if it doesn't begin and end with '/'
|
||||
$regexp = '/'.$regexp.'/'; # pad the $regexp with '/' to prepare for preg_match()
|
||||
}
|
||||
if (preg_match($regexp.'i', $elem)) { # Replaced eregi() with preg_match()
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#
|
||||
# Reads entire file into a string
|
||||
# Same as file_get_contents in php >= 4.3.0
|
||||
#
|
||||
function my_file_get_contents($f) {
|
||||
return implode('', file($f));
|
||||
function my_file_get_contents($f)
|
||||
{
|
||||
return implode('', file($f));
|
||||
}
|
||||
|
||||
function getOSInformation() {
|
||||
function getOSInformation()
|
||||
{
|
||||
if (false == function_exists("shell_exec")) {
|
||||
return null;
|
||||
}
|
||||
@@ -261,4 +305,3 @@ function getOSInformation() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
104
main.php
104
main.php
@@ -8,72 +8,66 @@ include('./include/openssl_functions.php');
|
||||
|
||||
$stage = gpvar('stage');
|
||||
|
||||
switch($stage) {
|
||||
switch ($stage) {
|
||||
case 'dl_root':
|
||||
upload($config['cacert_pem'], $config['ca_prefix'] . "cacert.crt", 'application/x-x509-ca-cert');
|
||||
break;
|
||||
|
||||
case 'dl_root':
|
||||
upload($config['cacert_pem'], $config['ca_prefix'] . "cacert.crt", 'application/x-x509-ca-cert');
|
||||
break;
|
||||
case 'display_root':
|
||||
printHeader('public');
|
||||
|
||||
case 'display_root':
|
||||
printHeader('public');
|
||||
?>
|
||||
<center><h2>Root Certificate (PEM Encoded)</h2></center>
|
||||
<p><pre><?php echo CA_get_root_pem() ?></pre></p>
|
||||
<p>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
|
||||
?>
|
||||
<center><h2>Root Certificate (PEM Encoded)</h2></center>
|
||||
<p>
|
||||
<pre><?php echo CA_get_root_pem() ?></pre>
|
||||
<p>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post">
|
||||
<input type=submit name=submit value="Back to Menu">
|
||||
</form>
|
||||
<?php
|
||||
break;
|
||||
case 'dl_crl':
|
||||
upload($config['cacrl_der'], $config['ca_prefix'] . "cacrl.crl", 'application/pkix-crl');
|
||||
break;
|
||||
|
||||
case 'dl_crl':
|
||||
upload($config['cacrl_der'], $config['ca_prefix'] . "cacrl.crl", 'application/pkix-crl');
|
||||
break;
|
||||
case 'dl_crl_pem':
|
||||
upload($config['cacrl_pem'], $config['ca_prefix'] . "cacrl.crl", 'application/octet-stream');
|
||||
break;
|
||||
|
||||
case 'dl_crl_pem':
|
||||
upload($config['cacrl_pem'], $config['ca_prefix'] . "cacrl.crl", 'application/octet-stream');
|
||||
break;
|
||||
default:
|
||||
printHeader('public');
|
||||
|
||||
default:
|
||||
printHeader('public');
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<table class=menu width=500><th class=menu colspan=2><big>PUBLIC CONTENT MENU<big></th>
|
||||
<tr>
|
||||
<td style="text-align: center; vertical-align: middle; font-weight: bold;" width=35%> <a href=search.php>Search for a Certificate</a></td>
|
||||
<td>Find a digital certificate to download and install in your e-mail or browser application.</td>
|
||||
</tr>
|
||||
|
||||
?>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<table class=menu width=500><th class=menu colspan=2><big>PUBLIC CONTENT MENU<big></th>
|
||||
<tr>
|
||||
<td style="text-align: center; vertical-align: middle; font-weight: bold;"> <a href=<?php echo $PHP_SELF?>?stage=dl_root>Download Our Root Certificate</a> </td>
|
||||
<td>You must install our "Root" certificate before you can use any of the certificates issued here. <a href=help.php target=_help>Read the online help</a> to learn more about this.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;" width=35%>
|
||||
<a href=search.php>Search for a Certificate</a></td>
|
||||
<td>Find a digital certificate to download and install in your e-mail or browser application.</td></tr>
|
||||
<tr>
|
||||
<td style="text-align: center; vertical-align: middle; font-weight: bold;"> <a href=<?php echo $PHP_SELF?>?stage=display_root>Display Our Root Certificate (PEM Encoded)</a></td>
|
||||
<td>This option provides the "Root" certificate PEM encoded text for advanced users to manually install via copy and paste. <a href=help.php target=_help>Read the online help</a> to learn more about this.</td>
|
||||
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href=<?php echo $PHP_SELF?>?stage=dl_root>Download Our Root Certificate</a></td>
|
||||
<td>You must install our "Root" certificate before you can use any of the
|
||||
certificates issued here. <a href=help.php target=_help>Read the online help</a>
|
||||
to learn more about this.</td></tr>
|
||||
<tr>
|
||||
<td style="text-align: center; vertical-align: middle; font-weight: bold;"> <a href=<?php echo $PHP_SELF?>?stage=dl_crl>Download Our Certificate Revocation List</a></td>
|
||||
<td>The official list of certificates revoked by this site. Installation and use of this list is optional. Some e-mail programs will reference this list automagically. (<a href="<?php echo $PHP_SELF?>?stage=dl_crl_pem">Some will need it in PEM format.</a>)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
<a href=<?php echo $PHP_SELF?>?stage=display_root>Display Our Root Certificate (PEM Encoded)</a></td>
|
||||
<td>This option provides the "Root" certificate PEM encoded text for advanced users
|
||||
to manually install via copy and paste. <a href=help.php target=_help>Read the online help</a>
|
||||
to learn more about this.</td>
|
||||
<?php
|
||||
|
||||
<tr><td style="text-align: center; vertical-align: middle; font-weight: bold;">
|
||||
|
||||
<a href=<?php echo $PHP_SELF?>?stage=dl_crl>Download Our Certificate Revocation List</a></td>
|
||||
<td>The official list of certificates revoked by this site. Installation and use of
|
||||
this list is optional. Some e-mail programs will reference this list automagically.
|
||||
(<a href="<?php echo $PHP_SELF?>?stage=dl_crl_pem">Some will need it in PEM format.</a>)</td></tr>
|
||||
|
||||
</table>
|
||||
</center>
|
||||
<br><br>
|
||||
<?php
|
||||
|
||||
printFooter();
|
||||
printFooter();
|
||||
}
|
||||
|
||||
?>
|
||||
|
@@ -25,8 +25,8 @@ $serial = escapeshellcmd(trim($_SERVER['QUERY_STRING']));
|
||||
$regexp = "^R.*$serial.*$";
|
||||
$configIndex = $config['index'];
|
||||
|
||||
if (exec("egrep '$regexp' '$configIndex'"))
|
||||
print '1';
|
||||
else
|
||||
print '0';
|
||||
?>
|
||||
if (exec("egrep '$regexp' '$configIndex'")) {
|
||||
print '1';
|
||||
} else {
|
||||
print '0';
|
||||
}
|
||||
|
17
policy.html
17
policy.html
@@ -1,14 +1,15 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Certificate Authority Issuer's Statement</title>
|
||||
<title>Certificate Authority Issuer's Statement</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 align=center>Certificate Authority Issuer's Statement</h2>
|
||||
<p>
|
||||
This is a private Limited Liability certificate authority for use by member
|
||||
non-profit agencies.
|
||||
<p>
|
||||
Certificate non-repudiation is achieved via identity verification by password
|
||||
authorized certificate managers from each member agency.
|
||||
<h1 align="center">Certificate Authority Issuer's Statement</h1>
|
||||
|
||||
<p>This is a private Limited Liability certificate authority for use by member non-profit agencies.</p>
|
||||
|
||||
<p>Certificate non-repudiation is achieved via identity verification by password authorized certificate managers from each member agency.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -10,4 +10,3 @@ print '<pre>';
|
||||
readfile('./README.md');
|
||||
print '</pre>';
|
||||
printFooter();
|
||||
?>
|
||||
|
199
search.php
199
search.php
@@ -15,132 +15,137 @@ $show_revoked = gpvar('show_revoked');
|
||||
$show_expired = gpvar('show_expired');
|
||||
|
||||
# Force stage back to search form if search string is empty.
|
||||
if ($stage == "search" && ! $search) $stage = "";
|
||||
if ($stage == "search" && ! $search) {
|
||||
$stage = "";
|
||||
}
|
||||
|
||||
# Force filter to (V)alid certs if no search status is selected.
|
||||
if ( !($show_valid.$show_revoked.$show_expired) ) $show_valid = 'V';
|
||||
if (!($show_valid.$show_revoked.$show_expired)) {
|
||||
$show_valid = 'V';
|
||||
}
|
||||
|
||||
switch ($stage) {
|
||||
case 'display':
|
||||
printHeader('about');
|
||||
case 'display':
|
||||
printHeader('about');
|
||||
|
||||
print '
|
||||
<center><h2>Certificate Details</h2></center>
|
||||
<center><font color=#0000AA><h3>(#'.htvar($serial).')<br>'.htvar(CA_cert_cname($serial).' <'.CA_cert_email($serial).'>').'</h3></font></center>';
|
||||
print '
|
||||
<center><h2>Certificate Details</h2></center>
|
||||
<center><font color=#0000AA><h3>(#'.htvar($serial).')<br>'.htvar(CA_cert_cname($serial).' <'.CA_cert_email($serial).'>').'</h3></font></center>';
|
||||
|
||||
if ($revoke_date = CAdb_is_revoked($serial))
|
||||
print '<center><font color=red><h2>REVOKED '.htvar($revoke_date).'</h2></font></center>';
|
||||
if ($revoke_date = CAdb_is_revoked($serial)) {
|
||||
print '<center><font color=red><h2>REVOKED '.htvar($revoke_date).'</h2></font></center>';
|
||||
}
|
||||
|
||||
print '<pre>'.htvar(CA_cert_text($serial)).'</pre>';
|
||||
break;
|
||||
|
||||
case 'download':
|
||||
$rec = CAdb_get_entry($serial);
|
||||
upload($config['cert_dir'] . "/$serial.der", $rec['common_name'] . ".cer", 'application/pkix-cert');
|
||||
print '<pre>'.htvar(CA_cert_text($serial)).'</pre>';
|
||||
break;
|
||||
|
||||
case 'download_pem':
|
||||
$rec = CAdb_get_entry($serial);
|
||||
upload($config['new_certs_dir'] . "/$serial.pem", $rec['common_name'] . ".pem", 'application/pkix-cert');
|
||||
break;
|
||||
case 'download':
|
||||
$rec = CAdb_get_entry($serial);
|
||||
upload($config['cert_dir'] . "/$serial.der", $rec['common_name'] . ".cer", 'application/pkix-cert');
|
||||
break;
|
||||
|
||||
case 'search':
|
||||
printHeader('public');
|
||||
case 'download_pem':
|
||||
$rec = CAdb_get_entry($serial);
|
||||
upload($config['new_certs_dir'] . "/$serial.pem", $rec['common_name'] . ".pem", 'application/pkix-cert');
|
||||
break;
|
||||
|
||||
$db = CAdb_to_array("^[${show_valid}${show_revoked}${show_expired}].*$search");
|
||||
case 'search':
|
||||
printHeader('public');
|
||||
|
||||
print '<body onLoad="self.focus();document.form.submit.focus()">';
|
||||
if (sizeof($db) == 0) {
|
||||
?>
|
||||
<center>
|
||||
<h2>Nothing Found</h2>
|
||||
<form action="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?>" method="post" name="form">
|
||||
<input type=hidden name=search value="<?php echo htvar($search)?>">
|
||||
<input type=hidden name=show_valid value="<?php echo htvar($show_valid)?>">
|
||||
<input type=hidden name=show_revoked value="<?php echo htvar($show_revoked)?>">
|
||||
<input type=hidden name=show_expired value="<?php echo htvar($show_expired)?>">
|
||||
<input type=submit name=submit value="Go Back">
|
||||
</form>
|
||||
</center>
|
||||
<?php
|
||||
printFooter();
|
||||
break;
|
||||
}
|
||||
$db = CAdb_to_array("^[${show_valid}${show_revoked}${show_expired}].*$search");
|
||||
|
||||
print '<table>';
|
||||
print '<th colspan=9><big>CERTIFICATE SEARCH RESULTS</big></th>';
|
||||
print '<body onLoad="self.focus();document.form.submit.focus()">';
|
||||
if (sizeof($db) == 0) {
|
||||
?>
|
||||
<center>
|
||||
<h2>Nothing Found</h2>
|
||||
<form action="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?>" method="post" name="form">
|
||||
<input type=hidden name=search value="<?php echo htvar($search)?>">
|
||||
<input type=hidden name=show_valid value="<?php echo htvar($show_valid)?>">
|
||||
<input type=hidden name=show_revoked value="<?php echo htvar($show_revoked)?>">
|
||||
<input type=hidden name=show_expired value="<?php echo htvar($show_expired)?>">
|
||||
<input type=submit name=submit value="Go Back">
|
||||
</form>
|
||||
</center>
|
||||
<?php
|
||||
printFooter();
|
||||
break;
|
||||
}
|
||||
|
||||
print '<table>';
|
||||
print '<th colspan=9><big>CERTIFICATE SEARCH RESULTS</big></th>';
|
||||
|
||||
$headings = array(
|
||||
status=>"Status", issued=>"Issued", expires=>"Expires",
|
||||
common_name=>"User's Name", email=>"E-mail",
|
||||
organization=>"Organization", unit=>"Department",
|
||||
locality=>"Locality", province=>"State"
|
||||
);
|
||||
);
|
||||
|
||||
print '<tr>';
|
||||
foreach($headings as $field=>$head) {
|
||||
print '<th>'.htvar($head). '</th>';
|
||||
print '<tr>';
|
||||
foreach ($headings as $field => $head) {
|
||||
print '<th>'.htvar($head). '</th>';
|
||||
}
|
||||
print '</tr>';
|
||||
print '</tr>';
|
||||
|
||||
foreach($db as $rec) {
|
||||
$stcolor = array(Valid=>'green',Revoked=>'red',Expired=>'orange');
|
||||
foreach ($db as $rec) {
|
||||
$stcolor = array(Valid=>'green',Revoked=>'red',Expired=>'orange');
|
||||
|
||||
?>
|
||||
<tr style="font-size: 11px;">
|
||||
<td style="color: <?php echo $stcolor[$rec['status']]?>; font-weight: bold"><?php echo htvar($rec['status'])?></td>
|
||||
<td style="white-space: nowrap"><?php echo htvar($rec['issued'])?></td>
|
||||
<td style="white-space: nowrap"><?php echo htvar($rec['expires'])?></td>
|
||||
<td><?php echo htvar($rec['common_name'])?></td>
|
||||
<td style="white-space: nowrap"><a href="mailto: <?php echo htvar($rec['common_name']).'<'.htvar($rec['email']).'>' ?> "> <?php echo htvar($rec['email'])?></a></td>
|
||||
<td><?php echo htvar($rec['organization'])?></td>
|
||||
<td><?php echo htvar($rec['unit'])?></td>
|
||||
<td><?php echo htvar($rec['locality'])?></td>
|
||||
<td><?php echo htvar($rec['province'])?></td>
|
||||
<td><a href="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?> ?stage=display&serial=<?php echo htvar($rec['serial'])?>" target=_certdisp><img src=images/display.png alt="Display" title="Display the certificate in excruciating detail"></a>
|
||||
<?php
|
||||
if ($rec['status'] != 'Revoked') {
|
||||
?>
|
||||
<a href="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?>?stage=download&serial=<?php echo htvar($rec['serial'])?>"><img src=images/download.png alt="Download" title="Download the certificate so that you may send encrypted e-mail"></a>
|
||||
<a href="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?>?stage=download_pem&serial=<?=htvar($rec['serial'])?>"><img src=images/download.png alt="Download (in PEM format)" title="Download in PEM format"></a>
|
||||
<?php
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
?>
|
||||
<tr style="font-size: 11px;">
|
||||
<td style="color: <?php echo $stcolor[$rec['status']]?>; font-weight: bold"><?php echo htvar($rec['status'])?></td>
|
||||
<td style="white-space: nowrap"><?php echo htvar($rec['issued'])?></td>
|
||||
<td style="white-space: nowrap"><?php echo htvar($rec['expires'])?></td>
|
||||
<td><?php echo htvar($rec['common_name'])?></td>
|
||||
<td style="white-space: nowrap"><a href="mailto: <?php echo htvar($rec['common_name']).'<'.htvar($rec['email']).'>' ?> "> <?php echo htvar($rec['email'])?></a></td>
|
||||
<td><?php echo htvar($rec['organization'])?></td>
|
||||
<td><?php echo htvar($rec['unit'])?></td>
|
||||
<td><?php echo htvar($rec['locality'])?></td>
|
||||
<td><?php echo htvar($rec['province'])?></td>
|
||||
<td><a href="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?> ?stage=display&serial=<?php echo htvar($rec['serial'])?>" target=_certdisp><img src=images/display.png alt="Display" title="Display the certificate in excruciating detail"></a>
|
||||
<?php
|
||||
if ($rec['status'] != 'Revoked') {
|
||||
?>
|
||||
<a href="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?>?stage=download&serial=<?php echo htvar($rec['serial'])?>"><img src=images/download.png alt="Download" title="Download the certificate so that you may send encrypted e-mail"></a>
|
||||
<a href="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?>?stage=download_pem&serial=<?=htvar($rec['serial'])?>"><img src=images/download.png alt="Download (in PEM format)" title="Download in PEM format"></a>
|
||||
<?php
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
</table>
|
||||
?>
|
||||
</table>
|
||||
|
||||
<form action="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?>" method="post" name="form">
|
||||
<input type=submit name=submit value="Another Search">
|
||||
<input type=hidden name=search value="<?php echo htvar($search)?>">
|
||||
<input type=hidden name=show_valid value="<?php echo htvar($show_valid)?>">
|
||||
<input type=hidden name=show_revoked value="<?php echo htvar($show_revoked)?>">
|
||||
<input type=hidden name=show_expired value="<?php echo htvar($show_expired)?>">
|
||||
</form>
|
||||
<?php
|
||||
<form action="<?php echo htmlentities($_SERVER['SCRIPT_NAME'])?>" method="post" name="form">
|
||||
<input type=submit name=submit value="Another Search">
|
||||
<input type=hidden name=search value="<?php echo htvar($search)?>">
|
||||
<input type=hidden name=show_valid value="<?php echo htvar($show_valid)?>">
|
||||
<input type=hidden name=show_revoked value="<?php echo htvar($show_revoked)?>">
|
||||
<input type=hidden name=show_expired value="<?php echo htvar($show_expired)?>">
|
||||
</form>
|
||||
<?php
|
||||
|
||||
printFooter();
|
||||
break;
|
||||
printFooter();
|
||||
break;
|
||||
|
||||
default:
|
||||
printHeader('public');
|
||||
default:
|
||||
printHeader('public');
|
||||
|
||||
?>
|
||||
<body onLoad="self.focus();document.search.search.focus();">
|
||||
<center><h2>Certificate Search</h2>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post" name="search">
|
||||
<input type=text name=search value="<?php echo htvar($search)?>" maxlength=60 size=40>
|
||||
<input type=submit name=submit value="Find It!"><br>
|
||||
<input type=checkbox name=show_valid value="V" <?php echo ($show_valid?'checked':'')?>>Valid
|
||||
<input type=checkbox name=show_revoked value="R" <?php echo ($show_revoked?'checked':'')?>>Revoked
|
||||
<input type=checkbox name=show_expired value="E" <?php echo ($show_expired?'checked':'')?>>Expired
|
||||
<input type=hidden name=stage value=search>
|
||||
</form></center>
|
||||
?>
|
||||
<body onLoad="self.focus();document.search.search.focus();">
|
||||
<center><h2>Certificate Search</h2>
|
||||
<form action="<?php echo $PHP_SELF?>" method="post" name="search">
|
||||
<input type=text name=search value="<?php echo htvar($search)?>" maxlength=60 size=40>
|
||||
<input type=submit name=submit value="Find It!"><br>
|
||||
<input type=checkbox name=show_valid value="V" <?php echo ($show_valid?'checked':'')?>>Valid
|
||||
<input type=checkbox name=show_revoked value="R" <?php echo ($show_revoked?'checked':'')?>>Revoked
|
||||
<input type=checkbox name=show_expired value="E" <?php echo ($show_expired?'checked':'')?>>Expired
|
||||
<input type=hidden name=stage value=search>
|
||||
</form></center>
|
||||
|
||||
<br><br>
|
||||
<?php
|
||||
printFooter();
|
||||
<br><br>
|
||||
<?php
|
||||
printFooter();
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user