public static function fromASN1(TaggedType $el): self
    {
        switch ($el->tag()) {
            case self::TYPE_NAME:
                return TargetName::fromChosenASN1($el->asExplicit()->asTagged());
            case self::TYPE_GROUP:
                return TargetGroup::fromChosenASN1(
                    $el->asExplicit()->asTagged());
            case self::TYPE_CERT:
                throw new \RuntimeException("targetCert not supported.");
        }
        throw new \UnexpectedValueException(
            "Target type " . $el->tag() . " not supported.");
    }