From 1904ccb37cf7ae61e4f154c30dc928c451128d3c Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Thu, 31 Jul 2025 18:47:06 -0700 Subject: [PATCH] Fix broken RSA --- src/Server/Program.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Server/Program.cs b/src/Server/Program.cs index e4748e6..89b7ca9 100755 --- a/src/Server/Program.cs +++ b/src/Server/Program.cs @@ -93,10 +93,9 @@ using (HttpClient client = new HttpClient()) { HttpResponseMessage PublicKeyResponse = await client.GetAsync("https://auth.mistox.com/api/auth/publickey"); if (PublicKeyResponse.IsSuccessStatusCode) { string publicKey = await PublicKeyResponse.Content.ReadAsStringAsync(); - using (RSA rsa = RSA.Create()) { - rsa.ImportFromPem(publicKey); - PublicKey = new RsaSecurityKey(rsa); - } + RSA rsa = RSA.Create(); + rsa.ImportFromPem(publicKey); + PublicKey = new RsaSecurityKey(rsa); } else { await Task.Delay(2000); // sleep the main thread for 2 seconds before sending another request. Prevent DDOS of my own equiptment }