This commit is contained in:
Marcus Hill
2023-01-25 23:14:13 +00:00
parent cffde0fbbd
commit 503b10d38c
5 changed files with 21 additions and 23 deletions

View File

@@ -34,7 +34,7 @@ if (isset($_GET['certificate_fetch_parse_json_details'])) {
// Get certificate (using verify peer false to allow for self-signed certs)
$socket = "ssl://$url:$port";
$get = stream_context_create(array("ssl" => array("capture_peer_cert" => TRUE, "verify_peer" => FALSE,)));
$get = stream_context_create(array("ssl" => array("capture_peer_cert" => true, "verify_peer" => false,)));
$read = stream_socket_client($socket, $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $get);
$cert = stream_context_get_params($read);
$cert_public_key_obj = openssl_x509_parse($cert['options']['ssl']['peer_certificate']);
@@ -121,7 +121,7 @@ if (isset($_GET['merge_ticket_get_json_details'])) {
//Return ticket, client and contact details for the given ticket number
$response = mysqli_fetch_array($sql);
$response = array_map('htmlentities', $response);
echo json_encode( $response);
echo json_encode($response);
}
}
@@ -308,4 +308,4 @@ if (isset($_GET['get_totp_token'])) {
$otp = TokenAuth6238::getTokenCode($_GET['totp_secret']);
echo json_encode($otp);
}
}