feat: track and display issuer_serial for absolute CA chain clarity

This commit is contained in:
dyzulk
2026-01-07 09:49:51 +07:00
parent f147faaf1b
commit c47e91db81
3 changed files with 8 additions and 1 deletions

View File

@@ -416,7 +416,8 @@ class OpenSslService
'serial_number' => $newSerialHex,
'valid_from' => date('Y-m-d H:i:s', $newInfo['validFrom_time_t']),
'valid_to' => date('Y-m-d H:i:s', $newInfo['validTo_time_t']),
'issuer_name' => $cert->ca_type === 'root' ? 'Self-Signed' : ($root ? $root->common_name : 'Unknown Root'),
'issuer_name' => $cert->ca_type === 'root' ? $cert->common_name : ($root ? $root->common_name : 'Unknown Root'),
'issuer_serial' => $cert->ca_type === 'root' ? $newSerialHex : ($root ? $root->serial_number : null),
];
} finally {
@@ -475,6 +476,7 @@ class OpenSslService
'valid_from' => $newData['valid_from'],
'valid_to' => $newData['valid_to'],
'issuer_name' => $newData['issuer_name'],
'issuer_serial' => $newData['issuer_serial'],
'is_latest' => true,
]);