Пример #1
0
 private void Sign(string container, string path, bool strongName)
 {
     try
     {
         var tempPath = _azureClient.CopyFileToTemp(container, path);
         var cert     = _certs.Get();
         if (FileSensing.IsItAZipFile(tempPath))
         {
             AttemptToSignOPC(tempPath, cert);
             _log.Debug("OPC Signing is done");
         }
         else
         {
             AttemptToSignAuthenticode(tempPath, strongName, cert);
             _log.Debug("Authenticode is done");
         }
         _log.Debug(@"let's copy the file from {0} to {1}\{2}".format(tempPath, container, path));
         _azureClient.CopyFileToAzure(container, path, tempPath);
         _log.Debug(@"finished {0} to {1}\{2}".format(tempPath, container, path));
     }
     catch (Exception e)
     {
         _log.Fatal("error", e);
         throw;
     }
 }