Fix broken RSA #16

Merged
derek merged 1 commits from working into main 2025-07-31 18:47:20 -07:00
Showing only changes of commit 1904ccb37c - Show all commits
+3 -4
View File
@@ -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
}