19 references to Utils
Microsoft.DotNet.SignCheckLibrary (19)
Verification\ArchiveVerifier.cs (3)
167
string hashedPath = String.IsNullOrEmpty(directoryName) ?
Utils
.GetHash(@".\", HashAlgorithmName.SHA256.Name) :
168
Utils
.GetHash(directoryName, HashAlgorithmName.SHA256.Name);
173
Utils
.GetHash(archiveEntry.RelativePath, HashAlgorithmName.SHA256.Name) + Path.GetExtension(archiveEntry.RelativePath); // lgtm [cs/zipslip] Archive from trusted source
Verification\DebVerifier.cs (1)
31
Utils
.RunBashCommand($"cat {debianBinary} {controlTar} {dataTar} > {signableContent}");
Verification\Exclusions.cs (1)
210
string regexPattern =
Utils
.ConvertToRegexPattern(pattern);
Verification\Jar\JarManifestFile.cs (2)
51
HashAlgorithm ha =
Utils
.CreateHashAlgorithm(entry.HashAlgorithmName);
68
using (HashAlgorithm hashAlgorithm =
Utils
.CreateHashAlgorithm(algorithmName))
Verification\Jar\JarManifestFileBase.cs (1)
133
using (HashAlgorithm hashAlgorithm =
Utils
.CreateHashAlgorithm(algorithmName))
Verification\Jar\JarUtils.cs (1)
51
using (HashAlgorithm hashAlgorithm =
Utils
.CreateHashAlgorithm(algorithmName))
Verification\LinuxPackageVerifier.cs (3)
42
Utils
.DownloadAndConfigurePublicKeys(tempDir);
51
(int exitCode, string output, string error) =
Utils
.RunBashCommand($"gpg --verify --status-fd 1 {signatureDocument} {signableContent}");
87
(_, string keyInfo, _) =
Utils
.RunBashCommand($"gpg --list-keys --with-colons {keyId} | grep '^pub:'");
Verification\MachOVerifier.cs (6)
63
(int signExitCode, string signOutput, string signError) =
Utils
.RunBashCommand($"codesign --verify --verbose {svr.FullPath}");
74
(int authExitCode, string authOutput, string authError) =
Utils
.RunBashCommand($"codesign -dvvv {svr.FullPath}");
137
(_, string output, string error) =
Utils
.RunBashCommand($"codesign -dvv --verbose=4 {svr.FullPath}");
154
Utils
.RunBashCommand($"codesign -d --extract-certificates {svr.FullPath}", tempDir);
161
Utils
.RunBashCommand($"openssl x509 -inform DER -in \"{cert}\" -out \"{pemFileName}\"", tempDir);
164
(_, string output, string error) =
Utils
.RunBashCommand($"openssl x509 -in \"{pemFileName}\" -noout -text", tempDir);
Verification\PkgVerifier.cs (1)
74
(bool result, string output, string error) =
Utils
.CaptureConsoleOutput(() =>