コード例 #1
0
ファイル: CertificateList.cs プロジェクト: Arsslensoft/ALFX
        private CertificateList(
            Asn1Sequence seq)
        {
            if (seq.Count != 3)
            {
                throw new ArgumentException("sequence wrong size for CertificateList", "seq");
            }

            tbsCertList = TbsCertificateList.GetInstance(seq[0]);
            sigAlgID    = AlgorithmIdentifier.GetInstance(seq[1]);
            sig         = DerBitString.GetInstance(seq[2]);
        }
コード例 #2
0
ファイル: TBSCertList.cs プロジェクト: Arsslensoft/ALFX
        public static TbsCertificateList GetInstance(
            object obj)
        {
            TbsCertificateList list = obj as TbsCertificateList;

            if (obj == null || list != null)
            {
                return(list);
            }

            if (obj is Asn1Sequence)
            {
                return(new TbsCertificateList((Asn1Sequence)obj));
            }

            throw new ArgumentException("unknown object in factory: " + obj.GetType().Name, "obj");
        }