public string EncodeCrlNumberExtensionData(string[] crlNumber)
        {
            //var urisStr = D.CrlLocations;
            var uris   = crlNumber.Select(u => Encoding.UTF8.GetBytes(u));
            var zero   = new byte[] { 48 };  //"0", delimiter ?
            var nbsp   = new byte[] { 160 }; //" ", separator ?
            var dagger = new byte[] { 134 }; //"dagger", separator ?

            var zeroSize   = zero.Length + 1;
            var nbspSize   = nbsp.Length + 1;
            var daggerSize = dagger.Length + 1;

            var col = new List <byte>();

            col.AddRange(zero); //delimiter
            int totalBytes = uris.Sum(u => u.Length);

            totalBytes += (zeroSize + (nbspSize * 2) + daggerSize) * uris.Count();
            col.Add((byte)totalBytes); //size of everything it contains

            foreach (var uri in uris)
            {
                var uriSize = uri.Length;
                col.AddRange(zero);                                          //delimiter
                col.Add((byte)(nbspSize + nbspSize + uriSize + daggerSize)); //size of everything it contains
                col.AddRange(nbsp);
                col.Add((byte)(nbspSize + uriSize + daggerSize));            //size of everything it contains
                col.AddRange(nbsp);
                col.Add((byte)(uriSize + daggerSize));                       //size of everything it contains
                col.AddRange(dagger);                                        //separator ?
                col.Add((byte)uriSize);
                col.AddRange(uri);
            }
            var bytes  = col.ToArray();
            var base64 = Convert.ToBase64String(bytes);

            var oidCDP = new CERTENROLLLib.CObjectId();

            //oidCDP.InitializeFromName(CERTENROLLLib.CERTENROLL_OBJECTID.XCN_OID_CRL_DIST_POINTS);
            oidCDP.InitializeFromName(CERTENROLLLib.CERTENROLL_OBJECTID.XCN_OID_CRL_NUMBER);
            // There is no specific class to CDPs, so we use the CX509Extension
            var crlList = new CERTENROLLLib.CX509Extension();

            crlList.Initialize(oidCDP, CERTENROLLLib.EncodingType.XCN_CRYPT_STRING_BASE64, base64);
            //certRequest.X509Extensions.Add(crlList);

            return(crlList.RawData[CERTENROLLLib.EncodingType.XCN_CRYPT_STRING_BASE64]);
        }