using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using CryptoCMP.CAInteraction;
using CryptoCMP.Utils;

namespace CRLRequestCMP
{
    class Program
    {
        static void Main(string[] args)
        {

            CRLRequest crl_req = new CRLRequest();
            int err = 0;
            byte[] crl_req_byte = crl_req.FormCurrentCRLRequest("profile://OCSP_TEST");
            SendRequest send = new SendRequest();
            byte[] resp3 = send.SendMessage(1, "192.168.10.30", "62295", crl_req_byte, ref err);

            byte[] crl = crl_req.VerifyCRLResponce("profile://OCSP_TEST", resp3);
            FileStream f_c = new FileStream("c:\\1\\crl.crl", FileMode.OpenOrCreate);
            f_c.Write(crl, 0, crl.Length);
            f_c.Close();
        }
    }
}
