示例#1
0
 public byte[] FirmaFileCADES(byte[] fileDafirmare, string aliasCertificato, string dominioCertificato, string pinCertificato, string otpFirma, bool marcaTemporale, bool cofirma)
 {
     externalSign.HSMService hsm = new externalSign.HSMService();
     hsm.Url     = Config.HSMServiceUrl();
     hsm.Timeout = 100000;
     return(hsm.FirmaFileCADES(fileDafirmare, aliasCertificato, dominioCertificato, pinCertificato, otpFirma, marcaTemporale, cofirma));
 }
示例#2
0
 public static void KillSession(string sessiontoken)
 {
     externalSign.HSMService hsmSvcPrivate = new externalSign.HSMService();
     hsmSvcPrivate.Url     = Config.HSMServiceUrl();
     hsmSvcPrivate.Timeout = 100000;
     hsmSvcPrivate.Session_CloseMultiSign(sessiontoken);
 }
示例#3
0
 public MultiSign(bool cosign, bool timestamp, SignType type)
 {
     hsmSvc         = new externalSign.HSMService();
     hsmSvc.Url     = Config.HSMServiceUrl();
     hsmSvc.Timeout = 100000;
     tipoFirma      = type;
     _cofirma       = cosign;
     _SessionToken  = hsmSvc.Session_OpenMultiSign(cosign, timestamp, (externalSign.SignType)type);
 }
示例#4
0
        public static string GetHSMCertificateList(string aliasCertificato, string dominioCertificato)
        {
            externalSign.HSMService hsm = new externalSign.HSMService();
            hsm.Url     = Config.HSMServiceUrl();
            hsm.Timeout = 100000;
            string certJson = hsm.GetCertificatoHSM(aliasCertificato, dominioCertificato);

            return(certJson);
        }
示例#5
0
 public static bool RichiediOTP(string aliasCertificato, string dominioCertificato)
 {
     ////////////////////////////////////
     logger.Debug("Inizio");
     externalSign.HSMService hsm = new externalSign.HSMService();
     hsm.Url     = Config.HSMServiceUrl();
     hsm.Timeout = 100000;
     logger.DebugFormat("Chiamo RichiediOTP su {0} ", hsm.Url);
     return(hsm.RichiediOTP(aliasCertificato, dominioCertificato));
 }
示例#6
0
            public MultiSign(string AliasCertificato, string DominioCertificato, string SessionToken, bool cofirma)
            {
                hsmSvc              = new externalSign.HSMService();
                hsmSvc.Url          = Config.HSMServiceUrl();
                hsmSvc.Timeout      = 100000;
                _aliasCertificato   = AliasCertificato;
                _dominioCertificato = DominioCertificato;
                _SessionToken       = SessionToken;
                _cofirma            = cofirma;
                string manifest = GetSessionManifest();

                SetSessionVariablesFromManifest(manifest);
            }