Esempio n. 1
0
 /// <summary>
 /// Uninstalls the installed WLAN profile
 /// </summary>
 /// <param name="omitRootCa">Keep the installed root certificate</param>
 /// <remarks>
 /// On one hand, keeping the root is a security risk,
 /// on the other, it's a hassle for the user to get too many prompts
 /// while reinstalling a profile.
 /// </remarks>
 public static void RemoveSettings(bool omitRootCa = false)
 {
     LetsWifi.WipeTokens();
     ConnectToEduroam.RemoveAllWLANProfiles();
     CertificateStore.UninstallAllInstalledCertificates(omitRootCa: omitRootCa);
     PersistingStore.IdentityProvider = null;
 }
Esempio n. 2
0
        private static async void RefreshInstalledProfile(bool force)
#endif
        {
            _ = await LetsWifi.RefreshAndInstallEapConfig(force) switch
            {
                LetsWifi.RefreshResponse.UpdatedEapXml => true,           // fine

                LetsWifi.RefreshResponse.Success => true,                 // nice!
                LetsWifi.RefreshResponse.StillValid => true,              // no work needed
                LetsWifi.RefreshResponse.NotRefreshable => false,         // ignore, since we currently always schedule the task in windows

#if RUN_PERSISTENT
                // TODO: show tray icon when not running persistent, but one of these three happens?
                // TODO: reword these into something better
                LetsWifi.RefreshResponse.NewRootCaRequired => f("Your geteduroam setup should be reconfigured"),
                LetsWifi.RefreshResponse.AccessDenied => f("Your geteduroam setup should be reconfigured"),
                LetsWifi.RefreshResponse.Failed => f("Your geteduroam setup should be reconfigured"),
#endif

#if DEBUG
                _ => throw new NotImplementedException(nameof(RefreshInstalledProfile))
#else
                _ => false
#endif
            };
        }