From 15ceb346c3577ca2c10957e3d93070a1bb09e489 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 24 Jun 2014 12:40:43 +0000 Subject: [PATCH] Modulo speciale autonomo per firma digitale git-svn-id: svn://10.65.10.50/branches/R_10_00@22958 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- fd/fd0.cpp | 9 +++++++-- fd/gtDialog.cpp | 2 +- fd/gtSSA.cpp | 13 +++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/fd/fd0.cpp b/fd/fd0.cpp index 92fb4468b..6a6ad403a 100644 --- a/fd/fd0.cpp +++ b/fd/fd0.cpp @@ -3,6 +3,7 @@ #include "esigner.h" #include "gtDialog.h" #include "gtSSA.h" +#include "MD5Checksum.h" #include #include @@ -655,11 +656,15 @@ IMPLEMENT_APP(TESigner_app) bool TESigner_app::OnInit() { - SetAppName("Firma digitale v11.4"); + SetAppName("Firma digitale v11.7"); gtInitArtProvider(); if (SSA_Login() != 0) - /* return */ gtError("Postazione non abilitata al modulo Firma Digitale"); + return gtError("Postazione non abilitata al modulo Firma Digitale"); + + const wxString strLogoMD5 = wxMD5Checksum::GetMD5(wxT("fd0logo.png")); + if (strLogoMD5 != "7f4c28a0ef5f575e0e13b32ab137e43c") + return gtError("Impossibile trovare un logo valido"); const bool done = __TheSigner.Init(true); diff --git a/fd/gtDialog.cpp b/fd/gtDialog.cpp index eaa81a6fd..338d1f501 100644 --- a/fd/gtDialog.cpp +++ b/fd/gtDialog.cpp @@ -318,7 +318,7 @@ bool gtBaseDlg::Init() pMainSizer->Add(pSplitBox, 1, wxGROW); m_rgbTheme = *wxLIGHT_GREY; - const wxString strLogo = wxT("logo.png"); + const wxString strLogo = wxT("fd0logo.png"); if (wxFileName::FileExists(strLogo)) { wxImage img(strLogo, wxBITMAP_TYPE_PNG); diff --git a/fd/gtSSA.cpp b/fd/gtSSA.cpp index 0cc79ed6b..49df1829f 100644 --- a/fd/gtSSA.cpp +++ b/fd/gtSSA.cpp @@ -45,10 +45,7 @@ int SSA_dongle::Login(const char* product, const char* module) { m_strProduct = product; m_nSerial = SSA_NumeroSerie(product); - } - if (err == 0) - { wxString m = module; m.MakeLower(); err = SSA_ApriModulo(UserID(), m); if (err == SSA_MOD_NOTFOUND) @@ -57,7 +54,7 @@ int SSA_dongle::Login(const char* product, const char* module) err = SSA_ApriModulo(UserID(), m); } -#ifndef _NDEBUG +#ifndef NDEBUG if (err != 0) { gtWarning("Versione DEMO"); @@ -74,9 +71,13 @@ int SSA_dongle::Login(const char* product, const char* module) int SSA_dongle::Login() { - int err = Login("FIRMA DIGITALE", "fd"); + int err = Login("FATTPA", "fi"); if (err != 0 && wxFileName::FileExists("campo.ini")) - err = Login("CAMPO", "pa") || Login("CAMPO", "fd"); + { + err = Login("CAMPO", "fd"); + if (err != 0) + err = Login("CAMPO", "pa"); + } return err; }