/** * Initialize from ASN.1. * * @param UnspecifiedType $el CHOICE * @throws \UnexpectedValueException * @return self */ public static function fromASN1(UnspecifiedType $el) { if (!$el->isTagged()) { throw new \UnexpectedValueException("v1Form issuer not supported."); } $tagged = $el->asTagged(); switch ($tagged->tag()) { case 0: return V2Form::fromV2ASN1($tagged->asImplicit(Element::TYPE_SEQUENCE)->asSequence()); } throw new \UnexpectedValueException("Unsupported issuer type."); }