summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorRaymii <RaymiiOrg@users.noreply.github.com>2016-04-12 06:11:00 +0200
committerRaymii <RaymiiOrg@users.noreply.github.com>2016-04-12 06:11:00 +0200
commitcabd443e2cc678f01f99e6a1b6482dee7ebff7e1 (patch)
tree3ee077e80759cfa383376c2cc0945f8ef6e056d9 /functions
parentad47580237957bc1a32f2859028aa0b58d0117cb (diff)
parente783f132e629e467ff831b0b974efa8542273d46 (diff)
downloadssl-decoder-cabd443e2cc678f01f99e6a1b6482dee7ebff7e1.zip
ssl-decoder-cabd443e2cc678f01f99e6a1b6482dee7ebff7e1.tar.gz
ssl-decoder-cabd443e2cc678f01f99e6a1b6482dee7ebff7e1.tar.bz2
Merge pull request #56 from djlarsu/verifycert
Typo in verify certificate, and lack of space in shell command causes…
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
+?>