summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorRyanne Fox <rfox@godaddy.com>2016-04-11 12:43:34 -0700
committerRyanne Fox <rfox@godaddy.com>2016-04-11 12:51:31 -0700
commite783f132e629e467ff831b0b974efa8542273d46 (patch)
tree3ee077e80759cfa383376c2cc0945f8ef6e056d9 /functions
parentad47580237957bc1a32f2859028aa0b58d0117cb (diff)
downloadssl-decoder-e783f132e629e467ff831b0b974efa8542273d46.zip
ssl-decoder-e783f132e629e467ff831b0b974efa8542273d46.tar.gz
ssl-decoder-e783f132e629e467ff831b0b974efa8542273d46.tar.bz2
Typo in verify certificate, and lack of space in shell command causes failure
Diffstat (limited to 'functions')
-rw-r--r--functions/verify_certificate.php (renamed from functions/verify_certifitcate.php)4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/verify_certifitcate.php b/functions/verify_certificate.php
index 4e23fc0..eb35ad1 100644
--- a/functions/verify_certifitcate.php
+++ b/functions/verify_certificate.php
@@ -94,11 +94,11 @@ function spki_hash($raw_cert_data) {
$tmp_dir = '/tmp/';
//below command returns the SPKI hash of a public key.
openssl_x509_export_to_file($raw_cert_data, $tmp_dir.$random_blurp.'.cert_client.pem');
- $output = shell_exec('timeout ' . $timeout . 'openssl x509 -noout -in '.$tmp_dir.$random_blurp.'.cert_client.pem -pubkey | openssl asn1parse -noout -inform pem -out '.$tmp_dir.$random_blurp.'.public.key; openssl dgst -sha256 -binary '. $tmp_dir . $random_blurp . '.public.key | openssl enc -base64 2>&1');
+ $output = shell_exec('timeout ' . $timeout . ' openssl x509 -noout -in '.$tmp_dir.$random_blurp.'.cert_client.pem -pubkey | openssl asn1parse -noout -inform pem -out '.$tmp_dir.$random_blurp.'.public.key; openssl dgst -sha256 -binary '. $tmp_dir . $random_blurp . '.public.key | openssl enc -base64 2>&1');
//remove those files again.
unlink($tmp_dir.$random_blurp.'.cert_client.pem');
unlink($tmp_dir.$random_blurp.'.public.key');
return(trim(htmlspecialchars($output)));
}
-?> \ No newline at end of file
+?>