summaryrefslogtreecommitdiffstats
path: root/functions/json.php
diff options
context:
space:
mode:
authorRemy <relst@relst.nl>2015-10-24 21:10:26 +0200
committerRemy <relst@relst.nl>2015-10-24 21:10:26 +0200
commit20303ba5c649c814eeff3d98bb8262072acb6dd2 (patch)
tree0c8b6ff8b18bf47b9ae168f70f5b1db20fa98dc1 /functions/json.php
parent3e0a1dfae5ec9211cecc0f532de6cea2be9256fd (diff)
downloadssl-decoder-20303ba5c649c814eeff3d98bb8262072acb6dd2.zip
ssl-decoder-20303ba5c649c814eeff3d98bb8262072acb6dd2.tar.gz
ssl-decoder-20303ba5c649c814eeff3d98bb8262072acb6dd2.tar.bz2
version 3.0
Diffstat (limited to 'functions/json.php')
-rw-r--r--functions/json.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/functions/json.php b/functions/json.php
index 3fae962..e25b885 100644
--- a/functions/json.php
+++ b/functions/json.php
@@ -18,6 +18,8 @@ function check_json($host,$ip,$port,$fastcheck=0) {
global $timeout;
global $max_chain_length;
global $ct_urls;
+ $old_error_reporting = error_reporting();
+ error_reporting(0);
$data = [];
$stream = stream_context_create (array("ssl" =>
array("capture_peer_cert" => true,
@@ -51,11 +53,12 @@ function check_json($host,$ip,$port,$fastcheck=0) {
$next = $chain_data[$key+1];
$prev = $chain_data[$key-1];
$chain_key = (string)$key+1;
+ $include_chain = false;
if ($key == 0) {
$data["connection"] = ssl_conn_metadata_json($host, $ip, $port, $read_stream, $chain_data, $fastcheck);
- $data["chain"][$chain_key] = cert_parse_json($curr, $next, $host, true, $port);
+ $data["chain"][$chain_key] = cert_parse_json($curr, $next, $host, true, $port, $include_chain);
} else {
- $data["chain"][$chain_key] = cert_parse_json($curr, $next, null, false, $port);
+ $data["chain"][$chain_key] = cert_parse_json($curr, $next, null, false, $port, $include_chain);
}
// certificate transparency
$data["certificate_transparency"] = [];
@@ -78,6 +81,7 @@ function check_json($host,$ip,$port,$fastcheck=0) {
return $data;
}
}
+ error_reporting($old_error_reporting);
return $data;
}