public function firstDNS(): string
    {
        $gn = $this->firstOf(GeneralName::TAG_DNS_NAME);
        if (!$gn instanceof DNSName) {
            throw new \RuntimeException(
                DNSName::class . " expected, got " . get_class($gn));
        }
        return $gn->name();
    }