Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Support CNAME TLSA records #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion functions/parse_certificate.php
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ function cert_parse_json($raw_cert_data, $raw_next_cert_data=null, $host=null, $
//TLSA check
if (!empty($cert_data['subject']['CN']) && !empty($host)) {
if ($validate_hostname == true) {
$tlsa_record = shell_exec("timeout " . $timeout . " dig +short +dnssec +time=" . $timeout . " TLSA _" . escapeshellcmd($port) . "._tcp." . escapeshellcmd($host) . " 2>&1 | head -n 1");
$tlsa_record = shell_exec("timeout " . $timeout . " dig +short +dnssec +time=" . $timeout . " TLSA _" . escapeshellcmd($port) . "._tcp." . escapeshellcmd($host) . " 2>&1 | grep -e '^[[:digit:]]' | head -n 1");
if (!empty($tlsa_record)) {
$tlsa = explode(" ", $tlsa_record, 4);
$pattern = '/ /';
Expand Down