Sign the asc file
MODIFY
WalletWasabi.Packager/Program.cs
WalletWasabi.Packager/Program.cs
@@ -175,6 +175,10 @@ public static class Program
StartProcessAndWaitForExit("cmd", BinDistDirectory, $"gpg --sign --digest-algo sha256 -a --clearsign --armor --output SHA256SUMS.asc SHA256SUMS && exit");
+ using var key = await WasabiSignerHelpers.GetPrivateKeyFromFileAsync().ConfigureAwait(false);
+
+ await WasabiSignerHelpers.SignSha256SumsFileAsync(Path.Combine(BinDistDirectory, "SHA256SUMS.asc"), key).ConfigureAwait(false);
+
IoHelpers.OpenFolderInFileExplorer(BinDistDirectory);
}

MODIFY
WalletWasabi/Helpers/WasabiSignerHelpers.cs
WalletWasabi/Helpers/WasabiSignerHelpers.cs
using NBitcoin.Crypto;
using NBitcoin;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Security.Cryptography;
-using System.Diagnostics.CodeAnalysis;
namespace WalletWasabi.Helpers;
@@ -46,9 +41,10 @@ public class WasabiSignerHelpers
await streamWriter.WriteLineAsync($"-----END {WasabiKeyHeadline}-----").ConfigureAwait(false);
}
- public static Key GetPrivateKeyFromFile(string fileName)
+ public static async Task<Key> GetPrivateKeyFromFileAsync()
{
- string[] keyFileContent = File.ReadAllLines(fileName);
+ string fileName = WasabiPrivateKeyFilePath;
+ string[] keyFileContent = await File.ReadAllLinesAsync(fileName).ConfigureAwait(false);
bool isHeadlineBeginValid = keyFileContent[0] == $"-----BEGIN {WasabiKeyHeadline}-----";
bool isHeadlineEndValid = keyFileContent[2] == $"-----END {WasabiKeyHeadline}-----";

Sign the asc file