예제 #1
0
        public byte[] FirmaFileCADES(byte[] fileDafirmare, string aliasCertificato, string dominioCertificato, string pinCertificato, string otpFirma, bool marcaTemporale, bool cofirma)
        {
            OpenWsChannel();
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.FirmaFileCADES(fileDafirmare, aliasCertificato, dominioCertificato, pinCertificato, otpFirma, marcaTemporale, cofirma, client));
        }
예제 #2
0
        public bool RichiediOTP(string aliasCertificato, string dominioCertificato)
        {
            OpenWsChannel();
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.richiediOTP(aliasCertificato, dominioCertificato, client));
        }
예제 #3
0
        public string GetCertificatoHSM(string aliasCertificato, string dominioCertificato)
        {
            OpenWsChannel();
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.VisualizzaCertificatoHSM(aliasCertificato, dominioCertificato, client));
        }
예제 #4
0
        public bool Session_RemoteSign(string SessionToken, string aliasCertificato, string dominioCertificato, string pinCertificato, string otpFirma)
        {
            OpenWsChannel();
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.Session_RemoteSign(SessionToken, aliasCertificato, dominioCertificato, pinCertificato, otpFirma, client));
        }
예제 #5
0
        private void OpenWsChannel()
        {
            string serviceUrl = ConfigurationManager.AppSettings["HSMSERVICE_URL"];

            if (client == null)
            {
                logger.Debug("Il canale è null, apro un nuovo canale di comunicazione");
                I_HSMConnector h = new HsmConnectorFactory();
                client = h.createClient(serviceUrl);
            }
        }
예제 #6
0
        public byte[] Session_GetSignedFile(string SessionToken, string hashFileDaFirmare)
        {
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.Session_GetSignedFile(SessionToken, hashFileDaFirmare));
        }
예제 #7
0
        public string Session_PutFileToSign(string SessionToken, byte[] FileDafirmare, string FileName)
        {
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.Session_PutFileToSign(SessionToken, FileDafirmare, FileName));
        }
예제 #8
0
        public bool Session_RemoteSignDummy(string SessionToken, string aliasCertificato, string dominioCertificato, string pinCertificato, string otpFirma)
        {
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.Session_RemoteSign(SessionToken, aliasCertificato, dominioCertificato, pinCertificato, otpFirma, null));
        }
예제 #9
0
        public string Session_GetManifest(string SessionToken)
        {
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.Session_GetManifest(SessionToken));
        }
예제 #10
0
        public string Session_GetSessions()
        {
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.Session_GetSessions());
        }
예제 #11
0
        public bool Session_CloseMultiSign(string SessionToken)
        {
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.Session_CloseMultiSign(SessionToken));
        }
예제 #12
0
        public string Session_OpenMultiSign(bool cosign, bool timestamp, SignType Type)
        {
            I_HSMConnector h = new HsmConnectorFactory();

            return(h.OpenMultiSignSession(cosign, timestamp, (int)Type));
        }