diff options
author | Remy <relst@relst.nl> | 2015-05-24 09:35:28 +0200 |
---|---|---|
committer | Remy <relst@relst.nl> | 2015-05-24 09:35:28 +0200 |
commit | 988f08b9eb952404b94817a973d1a19ff7c6524b (patch) | |
tree | b23c940603507f240f377ba9278b49ae97dc6190 /functions/crl.php | |
parent | 5e7e74fe94062683cce82c189cd43dd18c3aff9b (diff) | |
download | ssl-decoder-988f08b9eb952404b94817a973d1a19ff7c6524b.zip ssl-decoder-988f08b9eb952404b94817a973d1a19ff7c6524b.tar.gz ssl-decoder-988f08b9eb952404b94817a973d1a19ff7c6524b.tar.bz2 |
Add support for specific endpoints
Diffstat (limited to 'functions/crl.php')
-rw-r--r-- | functions/crl.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/functions/crl.php b/functions/crl.php index 34cc794..35e57a5 100644 --- a/functions/crl.php +++ b/functions/crl.php @@ -15,7 +15,7 @@ // along with this program. If not, see <http://www.gnu.org/licenses/>. function crl_verify($raw_cert_data, $verbose=true) { - global $random_blurp; + global $random_blurp, $timeout; $cert_data = openssl_x509_parse($raw_cert_data); $cert_serial_nm = strtoupper(bcdechex($cert_data['serialNumber'])); $crl_uris = []; @@ -35,7 +35,7 @@ function crl_verify($raw_cert_data, $verbose=true) { if (0 === strpos($uri, 'http')) { $fp = fopen ("/tmp/" . $random_blurp . "." . $key . ".crl", 'w+'); $ch = curl_init(($uri)); - curl_setopt($ch, CURLOPT_TIMEOUT, 2); + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); @@ -100,7 +100,7 @@ function crl_verify($raw_cert_data, $verbose=true) { function crl_verify_json($raw_cert_data) { - global $random_blurp; + global $random_blurp, $timeout; $result = []; $cert_data = openssl_x509_parse($raw_cert_data); $cert_serial_nm = strtoupper(bcdechex($cert_data['serialNumber'])); @@ -121,7 +121,7 @@ function crl_verify_json($raw_cert_data) { $result[$crl_no]["crl_uri"] = $uri; $fp = fopen ("/tmp/" . $random_blurp . "." . $key . ".crl", 'w+'); $ch = curl_init(($uri)); - curl_setopt($ch, CURLOPT_TIMEOUT, 2); + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); |