* Thu Sep 30 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.84-12.sme

- Attempt to fix the final reload after CA creation [SME: 11192]
This commit is contained in:
2025-09-11 00:03:08 -04:00
parent 245e1bcd0b
commit a747530268
35 changed files with 3917 additions and 2796 deletions

View File

@@ -7,21 +7,26 @@
#
# PROTOCOL:
# The client should issue an HTTP GET request using a URL that is
# the concatenation of the revocation url and certificate serial
# the concatenation of the revocation url and certificate serial
# number. (i.e. http://www.host.dom/phpki/ns_revoke_query.php?10A5F2)
#
# The server should return a document of type
# The server should return a document of type
# application/x-netscape-revocation containing a single character
# '1' if the certificate is revoked, '0' if it is valid.
#
include('./config.in.php');
include('./config.php');
include(STORE_DIR.'/config/config.php');
$serial = escapeshellcmd(trim($HTTP_SERVER_VARS['QUERY_STRING']));
header("Content-type: application/x-netscape-revocation");
$regexp = "^R\t.*\t.*\t$serial\t.*\t.*$";
if (exec("egrep '$regexp' ca/$config[index]"))
print '1';
else
print '0';
?>
$serial = escapeshellcmd(trim($_SERVER['QUERY_STRING']));
#header("Content-type: application/x-netscape-revocation");
# old Reg Ex doesnt work, new should do the work
#$regexp = "^R\t.*\t.*\t$serial\t.*\t.*$";
$regexp = "^R.*$serial.*$";
$configIndex = $config['index'];
if (exec("egrep '$regexp' '$configIndex'")) {
print '1';
} else {
print '0';
}