diff options
author | Raymii <RaymiiOrg@users.noreply.github.com> | 2016-04-12 06:11:00 +0200 |
---|---|---|
committer | Raymii <RaymiiOrg@users.noreply.github.com> | 2016-04-12 06:11:00 +0200 |
commit | cabd443e2cc678f01f99e6a1b6482dee7ebff7e1 (patch) | |
tree | 3ee077e80759cfa383376c2cc0945f8ef6e056d9 | |
parent | ad47580237957bc1a32f2859028aa0b58d0117cb (diff) | |
parent | e783f132e629e467ff831b0b974efa8542273d46 (diff) | |
download | ssl-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…
-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 +?> |