diff options
| author | Andrew Bulhak <andrew.bulhak@mullvad.net> | 2024-03-18 11:26:51 +0100 |
|---|---|---|
| committer | Bug Magnet <marco.nikic@mullvad.net> | 2024-03-18 15:58:28 +0100 |
| commit | 80aa18714a065735eb3ea00e11be0eaeb2c0fb12 (patch) | |
| tree | c733cacb95d7a21110376a7e7fb3c3e15621efae /ios/PacketTunnelCore | |
| parent | 9b9d36a3f912773f2dcc4ba7adf51b03ee5afde4 (diff) | |
| download | mullvadvpn-80aa18714a065735eb3ea00e11be0eaeb2c0fb12.tar.xz mullvadvpn-80aa18714a065735eb3ea00e11be0eaeb2c0fb12.zip | |
Move PacketTunnelProvider extension pass the key to the Actor
Diffstat (limited to 'ios/PacketTunnelCore')
| -rw-r--r-- | ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift b/ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift index b54d397ca4..0d80fb6d58 100644 --- a/ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift +++ b/ios/PacketTunnelCore/Actor/PacketTunnelActor+Public.swift @@ -7,6 +7,7 @@ // import Foundation +import WireGuardKitTypes /** Public methods for dispatching commands to Actor. @@ -51,6 +52,15 @@ extension PacketTunnelActor { } /** + Issue a new preshared key to the Actor. + - Parameter key: the new key + */ + + nonisolated public func replacePreSharedKey(_ key: PreSharedKey) { + commandChannel.send(.replaceDevicePrivateKey(key)) + } + + /** Tell actor to enter error state. */ nonisolated public func setErrorState(reason: BlockedStateReason) { |
