From c7d819f1414ebd32977010993420cfbb2ca8cdbd Mon Sep 17 00:00:00 2001 From: Kevin Jones Date: Mon, 6 May 2024 13:03:09 -0400 Subject: [PATCH] Minor cleanup --- src/AzureSignTool/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AzureSignTool/Program.cs b/src/AzureSignTool/Program.cs index 3456f2e..66fb833 100644 --- a/src/AzureSignTool/Program.cs +++ b/src/AzureSignTool/Program.cs @@ -238,7 +238,7 @@ private async ValueTask RunSign() } logger.LogTrace("Creating context"); - using (var keyVault = RSAFactory.Create(materialized.TokenCredential, materialized.KeyId, materialized.PublicCertificate)) + using (var keyVault = RSAFactory.Create(materialized.TokenCredential, materialized.KeyId, materialized.PublicCertificate)) using (var signer = new AuthenticodeKeyVaultSigner(keyVault, materialized.PublicCertificate, ParseHashAlgorithm(FileDigestAlgorithm), timeStampConfiguration, certificates)) { Parallel.ForEach(AllFiles, options, () => (succeeded: 0, failed: 0), (filePath, pls, state) => @@ -558,9 +558,9 @@ private static bool OneTrue(params bool[] values) { int count = 0; - foreach (bool v in values) + for (int i = 0; i < values.Length && count < 2; i++) { - if (v) + if (values[i]) { count++; }