Esempio n. 1
0
		public Pfx(
            ContentInfo	contentInfo,
            MacData		macData)
        {
            this.contentInfo = contentInfo;
            this.macData = macData;
        }
Esempio n. 2
0
 public SignedData(
     DerInteger        _version,
     Asn1Set           _digestAlgorithms,
     ContentInfo       _contentInfo,
     Asn1Set           _certificates,
     Asn1Set           _crls,
     Asn1Set           _signerInfos)
 {
     version          = _version;
     digestAlgorithms = _digestAlgorithms;
     contentInfo      = _contentInfo;
     certificates     = _certificates;
     crls             = _crls;
     signerInfos      = _signerInfos;
 }
Esempio n. 3
0
		public Pfx(
            Asn1Sequence seq)
        {
            BigInteger version = ((DerInteger) seq[0]).Value;
            if (version.IntValue != 3)
            {
                throw new ArgumentException("wrong version for PFX PDU");
            }

			contentInfo = ContentInfo.GetInstance(seq[1]);

			if (seq.Count == 3)
            {
                macData = MacData.GetInstance(seq[2]);
            }
        }
Esempio n. 4
0
        private SignedData(
            Asn1Sequence seq)
        {
            IEnumerator e = seq.GetEnumerator();

            e.MoveNext();
            version = (DerInteger) e.Current;

            e.MoveNext();
            digestAlgorithms = (Asn1Set) e.Current;

            e.MoveNext();
            contentInfo = ContentInfo.GetInstance(e.Current);

            while (e.MoveNext())
            {
                Asn1Object o = (Asn1Object) e.Current;

                //
                // an interesting feature of SignedData is that there appear to be varying implementations...
                // for the moment we ignore anything which doesn't fit.
                //
                if (o is DerTaggedObject)
                {
                    DerTaggedObject tagged = (DerTaggedObject) o;

                    switch (tagged.TagNo)
                    {
                        case 0:
                            certificates = Asn1Set.GetInstance(tagged, false);
                            break;
                        case 1:
                            crls = Asn1Set.GetInstance(tagged, false);
                            break;
                        default:
                            throw new ArgumentException("unknown tag value " + tagged.TagNo);
                    }
                }
                else
                {
                    signerInfos = (Asn1Set) o;
                }
            }
        }
Esempio n. 5
0
		public AuthenticatedSafe(
            ContentInfo[] info)
        {
            this.info = (ContentInfo[]) info.Clone();
        }