//submit the request  that created in the createCertifcate to the CA
        public int submitRequest(string certrequest, string hostname)
        {
            CCertConfig  objCertConfig  = new CCertConfig();
            CCertRequest objCertRequest = new CCertRequest();
            CCertAdmin   objCertAdmin   = new CCertAdmin();
            string       strCAConfig;
            int          iDisposition;
            int          requestID;
            string       errorStatus;

            try
            {
                strCAConfig  = objCertConfig.GetConfig(CC_DEFAULTCONFIG);                           //connect to the ca
                iDisposition = objCertRequest.Submit(CR_IN_BASE64, certrequest, null, strCAConfig); //submit the certiface request to the ca
                requestID    = objCertRequest.GetRequestId();                                       //get the requestid that was created -the certifacte is in pending status
                SqlLite sql = new SqlLite();
                sql.insertTable(hostname, iDisposition, requestID);                                 //insert first certificate information
                //   objCertAdmin.ResubmitRequest(strCAConfig, requestID);
                return(requestID);                                                                  //return the reqid that was created for the certificate request in the pending queue
            }

            catch (Exception ex)
            {
                errorStatus = ex.Message;
                return(0);
            }
        }