Ejemplo n.º 1
0
 private static IEnumerable <string> GetSignatureFileError(string signatureFilePath)
 {
     if (string.IsNullOrEmpty(signatureFilePath))
     {
         yield return("Please specify a signature file.");
     }
     else
     {
         bool?validMagicBytes = FileHandling.IsSignatureFile(signatureFilePath);
         if (validMagicBytes == null)
         {
             yield return("Unable to access signature file.");
         }
         if (validMagicBytes == false)
         {
             yield return(_invalidSignatureFile);
         }
     }
 }
Ejemplo n.º 2
0
 private static IEnumerable <string> GetSignatureFileError(string signatureFilePath, string[] filePaths)
 {
     if (string.IsNullOrEmpty(signatureFilePath) || filePaths.Length == 0)
     {
         yield return("Please specify a signature file and file to verify.");
     }
     else
     {
         bool?validMagicBytes = FileHandling.IsSignatureFile(signatureFilePath);
         if (validMagicBytes == null)
         {
             yield return("Unable to access signature file.");
         }
         if (validMagicBytes == false)
         {
             yield return("Please specify a valid signature file.");
         }
     }
     if (filePaths.Length > 1)
     {
         yield return("Please specify one file to verify.");
     }
 }