//get the certifacte status from the ca
        public int retrieveStatus(int requestID, string hostname)
        {
            int          iDisposition;
            string       strCAConfig;
            CCertConfig  objCertConfig  = new CCertConfig();
            CCertRequest objCertRequest = new CCertRequest();

            try
            {
                SqlLite sql = new SqlLite();
                /*Cheking if host name and req is belong to each other*/
                if (sql.checkHostnameWithreqID(requestID, hostname))
                {
                    return(-6);
                }
                if (sql.checkcertFlag(requestID)) //checking if the client allreay consumed the certificate
                {
                    return(-3);
                }



                strCAConfig  = objCertConfig.GetConfig(CC_DEFAULTCONFIG);              //connect to the ca
                iDisposition = objCertRequest.RetrievePending(requestID, strCAConfig); //retrive the certifcate status  from the ca
                sql.updateTable(iDisposition, requestID);                              //updat certificate table with more information about the cert
                return(iDisposition);                                                  //return cert status
            }

            catch (Exception ex)
            {
                Console.Write(ex.Message);
                return(-2);
            }
        }