diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-11-03 00:19:05 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-03-14 13:58:44 +0100 |
| commit | b43833503ba221d775e2f6196ad6e0dec0929756 (patch) | |
| tree | de0c68c2b049a0ea3f659aa73f10869ebd7e8230 /gui/src/shared | |
| parent | 6459ae7beefcc5f13eb54254dfe402dd807c62fe (diff) | |
| download | mullvadvpn-b43833503ba221d775e2f6196ad6e0dec0929756.tar.xz mullvadvpn-b43833503ba221d775e2f6196ad6e0dec0929756.zip | |
Remove everything related to WireGuard key handling
Diffstat (limited to 'gui/src/shared')
| -rw-r--r-- | gui/src/shared/daemon-rpc-types.ts | 13 | ||||
| -rw-r--r-- | gui/src/shared/ipc-schema.ts | 9 | ||||
| -rw-r--r-- | gui/src/shared/localization-contexts.ts | 2 | ||||
| -rw-r--r-- | gui/src/shared/notifications/no-valid-key.ts | 38 | ||||
| -rw-r--r-- | gui/src/shared/notifications/notification.ts | 1 |
5 files changed, 0 insertions, 63 deletions
diff --git a/gui/src/shared/daemon-rpc-types.ts b/gui/src/shared/daemon-rpc-types.ts index eec1e1f2a4..a45bdada4d 100644 --- a/gui/src/shared/daemon-rpc-types.ts +++ b/gui/src/shared/daemon-rpc-types.ts @@ -104,7 +104,6 @@ export type DaemonEvent = | { tunnelState: TunnelState } | { settings: ISettings } | { relayList: IRelayList } - | { wireguardKey: KeygenEvent } | { appVersionInfo: IAppVersionInfo }; export interface ITunnelStateRelayInfo { @@ -334,18 +333,6 @@ export interface ISettings { splitTunnel: SplitTunnelSettings; } -export type KeygenEvent = INewWireguardKey | KeygenFailure; -export type KeygenFailure = 'too_many_keys' | 'generation_failure'; - -export interface INewWireguardKey { - newKey: IWireguardPublicKey; -} - -export interface IWireguardPublicKey { - key: string; - created: string; -} - export type BridgeState = 'auto' | 'on' | 'off'; export type SplitTunnelSettings = { diff --git a/gui/src/shared/ipc-schema.ts b/gui/src/shared/ipc-schema.ts index 0ed0985bf1..a6d41298ce 100644 --- a/gui/src/shared/ipc-schema.ts +++ b/gui/src/shared/ipc-schema.ts @@ -10,8 +10,6 @@ import { ILocation, IRelayList, ISettings, - IWireguardPublicKey, - KeygenEvent, RelaySettingsUpdate, TunnelState, VoucherResponse, @@ -56,7 +54,6 @@ export interface IAppStateSnapshot { currentVersion: ICurrentAppVersionInfo; upgradeVersion: IAppVersionInfo; guiSettings: IGuiSettingsState; - wireguardPublicKey?: IWireguardPublicKey; translations: ITranslations; windowsSplitTunnelingApplications?: IApplication[]; macOsScrollbarVisibility?: MacOsScrollbarVisibility; @@ -181,12 +178,6 @@ export const ipcSchema = { '': notifyRenderer<boolean>(), set: invoke<boolean, void>(), }, - wireguardKeys: { - publicKey: notifyRenderer<IWireguardPublicKey | undefined>(), - keygenEvent: notifyRenderer<KeygenEvent>(), - generateKey: invoke<void, KeygenEvent>(), - verifyKey: invoke<void, boolean>(), - }, problemReport: { collectLogs: invoke<string | undefined, string>(), sendReport: invoke<{ email: string; message: string; savedReportId: string }, void>(), diff --git a/gui/src/shared/localization-contexts.ts b/gui/src/shared/localization-contexts.ts index b402278571..5523951d9c 100644 --- a/gui/src/shared/localization-contexts.ts +++ b/gui/src/shared/localization-contexts.ts @@ -29,8 +29,6 @@ export type LocalizationContexts = | 'wireguard-settings-nav' | 'openvpn-settings-view' | 'openvpn-settings-nav' - | 'wireguard-key-view' - | 'wireguard-keys-nav' | 'split-tunneling-view' | 'split-tunneling-nav' | 'support-view' diff --git a/gui/src/shared/notifications/no-valid-key.ts b/gui/src/shared/notifications/no-valid-key.ts deleted file mode 100644 index 6de28ab8df..0000000000 --- a/gui/src/shared/notifications/no-valid-key.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { WgKeyState } from '../../renderer/redux/settings/reducers'; -import { messages } from '../../shared/gettext'; -import { LiftedConstraint, TunnelProtocol } from '../daemon-rpc-types'; -import { InAppNotification, InAppNotificationProvider } from './notification'; - -interface NoValidKeyNotificationContext { - tunnelProtocol?: LiftedConstraint<TunnelProtocol>; - wireGuardKey: WgKeyState; -} - -export class NoValidKeyNotificationProvider implements InAppNotificationProvider { - public constructor(private context: NoValidKeyNotificationContext) {} - - public mayDisplay() { - const usingWireGuard = - this.context.tunnelProtocol === 'wireguard' || - (this.context.tunnelProtocol === 'any' && - (process.platform ?? window.env.platform) !== 'win32'); - const keyInvalid = - this.context.wireGuardKey.type === 'key-not-set' || - this.context.wireGuardKey.type === 'too-many-keys' || - this.context.wireGuardKey.type === 'generation-failure' || - (this.context.wireGuardKey.type === 'key-set' && - this.context.wireGuardKey.key.valid === false) || - (this.context.wireGuardKey.type === 'key-set' && - this.context.wireGuardKey.key.replacementFailure === 'too_many_keys'); - - return usingWireGuard && keyInvalid; - } - - public getInAppNotification(): InAppNotification { - return { - indicator: 'warning', - title: messages.pgettext('in-app-notifications', 'VALID WIREGUARD KEY IS MISSING'), - subtitle: messages.pgettext('in-app-notifications', 'Manage keys under Advanced settings.'), - }; - } -} diff --git a/gui/src/shared/notifications/notification.ts b/gui/src/shared/notifications/notification.ts index 570bf2f12b..2152da0e79 100644 --- a/gui/src/shared/notifications/notification.ts +++ b/gui/src/shared/notifications/notification.ts @@ -41,7 +41,6 @@ export * from './connected'; export * from './connecting'; export * from './disconnected'; export * from './error'; -export * from './no-valid-key'; export * from './inconsistent-version'; export * from './reconnecting'; export * from './unsupported-version'; |
