mirror of
https://github.com/dyzulk/trustlab-api.git
synced 2026-01-26 05:15:35 +07:00
feat: implement Family SSL grouping and refined issuer tracking
This commit is contained in:
@@ -26,6 +26,7 @@ class CaCertificate extends Model
|
||||
'is_latest',
|
||||
'issuer_name',
|
||||
'issuer_serial',
|
||||
'family_id',
|
||||
'cert_path',
|
||||
'der_path',
|
||||
'bat_path',
|
||||
|
||||
@@ -418,6 +418,7 @@ class OpenSslService
|
||||
'valid_to' => date('Y-m-d H:i:s', $newInfo['validTo_time_t']),
|
||||
'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),
|
||||
'family_id' => $cert->ca_type === 'root' ? (string) \Illuminate\Support\Str::uuid() : ($root ? $root->family_id : $cert->family_id),
|
||||
];
|
||||
|
||||
} finally {
|
||||
@@ -477,6 +478,7 @@ class OpenSslService
|
||||
'valid_to' => $newData['valid_to'],
|
||||
'issuer_name' => $newData['issuer_name'],
|
||||
'issuer_serial' => $newData['issuer_serial'],
|
||||
'family_id' => $newData['family_id'],
|
||||
'is_latest' => true,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user