Ejemplo n.º 1
0
        internal static bool IsSignedContainer(string fullPath)
        {
            if (FileSignInfo.IsZipContainer(fullPath))
            {
                bool signedContainer = false;

                using (var archive = new ZipArchive(File.OpenRead(fullPath), ZipArchiveMode.Read))
                {
                    foreach (ZipArchiveEntry entry in archive.Entries)
                    {
                        if (FileSignInfo.IsNupkg(fullPath) && VerifySignatures.VerifySignedNupkgByFileMarker(entry.FullName))
                        {
                            signedContainer = true;
                            break;
                        }
                        else if (FileSignInfo.IsVsix(fullPath) && VerifySignatures.VerifySignedVSIXByFileMarker(entry.FullName))
                        {
                            signedContainer = true;
                            break;
                        }
                    }
                }

                if (!signedContainer)
                {
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
 public override bool VerifySignedNugetFileMarker(string filePath)
 {
     return(VerifySignatures.VerifySignedNupkgByFileMarker(filePath));
 }