示例#1
0
        public byte[] ControFirmaFileCADES(byte[] fileDafirmare, string aliasCertificatoDaControfirmare, string aliasCertificato, string dominioCertificato, string pinCertificato, string otpFirma, bool marcaTemporale)
        {
            OpenWcfChannel();
            HSMConnector h = new HSMConnector();

            return(h.ControFirmaFileCADES(fileDafirmare, aliasCertificatoDaControfirmare, aliasCertificato, dominioCertificato, pinCertificato, otpFirma, marcaTemporale, client));
        }
示例#2
0
        public bool RichiediOTP(string aliasCertificato, string dominioCertificato)
        {
            OpenWcfChannel();
            HSMConnector h = new HSMConnector();

            return(h.richiediOTP(aliasCertificato, dominioCertificato, client));
        }
示例#3
0
        public string GetCertificatoHSM(string aliasCertificato, string dominioCertificato)
        {
            OpenWcfChannel();
            HSMConnector h = new HSMConnector();

            return(h.VisualizzaCertificatoHSM(aliasCertificato, dominioCertificato, client));
        }
示例#4
0
        private void OpenWcfChannel()
        {
            string serviceUrl = ConfigurationManager.AppSettings["HSMSERVICE_URL"];

            if (client == null)
            {
                logger.Debug("Il canale è null, apro un nuovo canale di comunicazione");
                client = HSMConnector.createClient(serviceUrl);
            }

            if (client.State != System.ServiceModel.CommunicationState.Opened)
            {
                logger.Debug("Il canale è chiuso, lo apro nuovamente");
                client = HSMConnector.createClient(serviceUrl);
            }
        }
示例#5
0
 public byte[] Session_GetSignedFile(string SessionToken, string hashFileDaFirmare)
 {
     return(HSMConnector.Session_GetSignedFile(SessionToken, hashFileDaFirmare));
 }
示例#6
0
 public bool Session_RemoteSignDummy(string SessionToken, string aliasCertificato, string dominioCertificato, string pinCertificato, string otpFirma)
 {
     return(HSMConnector.Session_RemoteSign(SessionToken, aliasCertificato, dominioCertificato, pinCertificato, otpFirma, null));
 }
示例#7
0
 public string Session_PutFileToSign(string SessionToken, byte[] FileDafirmare, string FileName)
 {
     return(HSMConnector.Session_PutFileToSign(SessionToken, FileDafirmare, FileName));
 }
示例#8
0
 public bool Session_RemoteSign(string SessionToken, string aliasCertificato, string dominioCertificato, string pinCertificato, string otpFirma)
 {
     OpenWcfChannel();
     return(HSMConnector.Session_RemoteSign(SessionToken, aliasCertificato, dominioCertificato, pinCertificato, otpFirma, client));
 }
示例#9
0
 public string Session_GetManifest(string SessionToken)
 {
     return(HSMConnector.Session_GetManifest(SessionToken));
 }
示例#10
0
 public string Session_GetSessions()
 {
     return(HSMConnector.Session_GetSessions());
 }
示例#11
0
 public bool Session_CloseMultiSign(string SessionToken)
 {
     return(HSMConnector.Session_CloseMultiSign(SessionToken));
 }
示例#12
0
 public string Session_OpenMultiSign(bool cosign, bool timestamp, SignType Type)
 {
     return(HSMConnector.OpenMultiSignSession(cosign, timestamp, (int)Type));
 }