public bool CheckAndGetMessageLogTimeStamp(string tokenTimestamp)
        {
            var oWS = new wsTSATest();

            oWS.Url = "https://wstsatest.kibs.mk/wsTSATest.asmx";
            var kibsCertificationPath     = WebConfigurationManager.AppSettings["KIBSCertificationPath"];
            var kibsCertificationPassword = WebConfigurationManager.AppSettings["KIBSCertificationPassword"];
            var cer = new X509Certificate2(kibsCertificationPath, kibsCertificationPassword);

            oWS.ClientCertificates.Add(cer);
            byte[] temp_backToBytes = Convert.FromBase64String(tokenTimestamp);
            var    response         = oWS.funCheckTS_Bytes(temp_backToBytes);

            oWS.Dispose();
            if (response.strFailureInfo == "")
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        public string GetMessageLogCheckTimeStamp(TokenTimestampModel tokenTimestamp)
        {
            var oWS = new wsTSATest();

            oWS.Url = "https://wstsatest.kibs.mk/wsTSATest.asmx";
            var kibsCertificationPath     = WebConfigurationManager.AppSettings["KIBSCertificationPath"];
            var kibsCertificationPassword = WebConfigurationManager.AppSettings["KIBSCertificationPassword"];
            var cer = new X509Certificate2(kibsCertificationPath, kibsCertificationPassword);

            oWS.ClientCertificates.Add(cer);
            byte[] temp_backToBytes = Convert.FromBase64String(tokenTimestamp.TokenTimestamp);
            var    response         = oWS.funCheckTS_Bytes(temp_backToBytes);

            oWS.Dispose();
            if (response.strFailureInfo == "")
            {
                return("Проверката е успешна.");
            }
            else
            {
                return(response.strFailureInfo);
            }
        }