Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2020-04-27 14:21:08 +02:00
Родитель be2bee27c9
Коммит 9a4307a2b6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: FE03C3A163FEDE68
2 изменённых файлов: 28 добавлений и 8 удалений

20
a.php Normal file
Просмотреть файл

@ -0,0 +1,20 @@
<?php
$files = glob("*/*.crt");
$ids = [];
foreach($files as $file) {
$text = shell_exec("openssl x509 -in $file -noout -text | head -n 4 | tail -n 1");
preg_match('!: (\d+)!', $text, $match);
$serialNumber = $match[1];
list($name, ) = explode('/', $file);
#echo "$name $serialNumber\n";
if (isset($ids[$serialNumber])) {
echo "DUPLICATE: $serialNumber {$ids[$serialNumber]} $name\n";
} else {
$ids[$serialNumber] = $name;
}
}

Просмотреть файл

@ -1,8 +1,8 @@
-----BEGIN CERTIFICATE-----
MIIEBjCCAu4CAhD9MA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD
MIIEBjCCAu4CAhEQMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNVBAYTAkRFMRswGQYD
VQQIDBJCYWRlbi1XdWVydHRlbWJlcmcxFzAVBgNVBAoMDk5leHRjbG91ZCBHbWJI
MTYwNAYDVQQDDC1OZXh0Y2xvdWQgQ29kZSBTaWduaW5nIEludGVybWVkaWF0ZSBB
dXRob3JpdHkwHhcNMTkxMDAyMTA1NDQ2WhcNMzAwMTA3MTA1NDQ2WjAWMRQwEgYD
dXRob3JpdHkwHhcNMjAwNDI3MTIyMDM0WhcNMzAwODAzMTIyMDM0WjAWMRQwEgYD
VQQDDAttaW5kbWFwX2FwcDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIB
ALnu86E2M5IKeQ8GNPrOuNDGHbE4vZg+P7zlsy613NC++IYC4FjzbaDLCWWMXahV
AM4nvCegbrXhgjS0a7hP8LmZ9I4sapNwpz/3NPgz65GDvB8cehCfA0eoZ31z5amZ
@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