certInfo === null && $this->pem) { $this->certInfo = openssl_x509_parse($this->pem) ?: false; } return $this->certInfo ?: null; } protected function issuer(): Attribute { return Attribute::make( get: function () { $certInfo = $this->getCertInfo(); return $certInfo ? ($certInfo['issuer']['O'] ?? null) : null; } ); } protected function from(): Attribute { return Attribute::make( get: function () { $certInfo = $this->getCertInfo(); if ($certInfo && isset($certInfo['validFrom_time_t'])) { return date('Y-m-d', $certInfo['validFrom_time_t']); } return null; } ); } protected function to(): Attribute { return Attribute::make( get: function () { $certInfo = $this->getCertInfo(); if ($certInfo && isset($certInfo['validTo_time_t'])) { return date('Y-m-d', $certInfo['validTo_time_t']); } return null; } ); } }