public function getIssuedDetails()
{
$cert = file_get_contents($this->getPath() . "/cert.pem");
$details = openssl_x509_parse($cert);
// filter only active purposes and show names only
$details['purposes'] = array_map(function ($item) {
return $item[2];
}, array_filter($details['purposes'], function ($item) {
return $item[0] == 1;
}));
return json_encode($details, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
}