Exemplo n.º 1
0
        private void DecodeExtension()
        {
            _OrganizationIdentifier = new CABForumOrganizationIdentifier();
            var root = DerConvert.Decode(RawData) as DerAsnSequence;

            _OrganizationIdentifier.SchemeIdentifier = ((DerAsnPrintableString)root.Value[0]).Value;
            _OrganizationIdentifier.Country          = ((DerAsnPrintableString)root.Value[1]).Value;
            _OrganizationIdentifier.Reference        = ((DerAsnUtf8String)root.Value[2]).Value;
            _decoded = true;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Used to create the extension from typed model
        /// </summary>
        /// <param name="organizationIdentifier"></param>
        /// <param name="critical"></param>
        public CABForumOrganizationIdentifierExtension(CABForumOrganizationIdentifier organizationIdentifier, bool critical)
        {
            Oid      = new Oid(Oid_CabForumOrganizationIdentifier, "CRL Distribution Points");
            Critical = critical;
            var container = new DerAsnSequence(new DerAsnType[] {
                new DerAsnPrintableString(organizationIdentifier.SchemeIdentifier),
                new DerAsnPrintableString(organizationIdentifier.Country),
                new DerAsnUtf8String(organizationIdentifier.Reference),
            });

            RawData = DerConvert.Encode(container).ToArray();
            _OrganizationIdentifier = organizationIdentifier;
            _decoded = true;
        }