Skip to content

Instantly share code, notes, and snippets.

@johnou
Created February 18, 2021 16:31
Show Gist options
  • Save johnou/e4f9f149bd68677f9ce6a10997ab6403 to your computer and use it in GitHub Desktop.
Save johnou/e4f9f149bd68677f9ce6a10997ab6403 to your computer and use it in GitHub Desktop.
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\", true);
RegistryKey subkey = key.CreateSubKey("Internet Settings");
int val = (int)subkey.GetValue("SecureProtocols");
WarningBox warningBox = new WarningBox();
if (val < 2048)
{
void AddKey()
{
val += 2048;
subkey.SetValue("SecureProtocols", val, RegistryValueKind.DWord);
subkey.Close();
warningBox.Close();
onAccept?.Invoke();
}
warningBox.Show($"TLS 1.2 must be enabled in order for the Habbo application to run.", 28, AddKey, () => warningBox.Close());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment