aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'Sources/Shared')
-rw-r--r--Sources/Shared/FileManager+Extension.swift2
-rw-r--r--Sources/Shared/Keychain.swift2
-rw-r--r--Sources/Shared/Logging/Logger.swift2
-rw-r--r--Sources/Shared/Logging/ringlogger.c2
-rw-r--r--Sources/Shared/Logging/ringlogger.h2
-rw-r--r--Sources/Shared/Model/NETunnelProviderProtocol+Extension.swift36
-rw-r--r--Sources/Shared/Model/String+ArrayConversion.swift2
-rw-r--r--Sources/Shared/Model/TunnelConfiguration+WgQuickConfig.swift2
-rw-r--r--Sources/Shared/NotificationToken.swift2
9 files changed, 25 insertions, 27 deletions
diff --git a/Sources/Shared/FileManager+Extension.swift b/Sources/Shared/FileManager+Extension.swift
index a865b81..48fa33f 100644
--- a/Sources/Shared/FileManager+Extension.swift
+++ b/Sources/Shared/FileManager+Extension.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
import os.log
diff --git a/Sources/Shared/Keychain.swift b/Sources/Shared/Keychain.swift
index fb00062..2e0e7f0 100644
--- a/Sources/Shared/Keychain.swift
+++ b/Sources/Shared/Keychain.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
import Security
diff --git a/Sources/Shared/Logging/Logger.swift b/Sources/Shared/Logging/Logger.swift
index 089fd10..f3ee2b7 100644
--- a/Sources/Shared/Logging/Logger.swift
+++ b/Sources/Shared/Logging/Logger.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
import os.log
diff --git a/Sources/Shared/Logging/ringlogger.c b/Sources/Shared/Logging/ringlogger.c
index 0c16cd6..9bb0d13 100644
--- a/Sources/Shared/Logging/ringlogger.c
+++ b/Sources/Shared/Logging/ringlogger.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
- * Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+ * Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
*/
#include <string.h>
diff --git a/Sources/Shared/Logging/ringlogger.h b/Sources/Shared/Logging/ringlogger.h
index 4211e9f..0e28c93 100644
--- a/Sources/Shared/Logging/ringlogger.h
+++ b/Sources/Shared/Logging/ringlogger.h
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
- * Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+ * Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
*/
#ifndef RINGLOGGER_H
diff --git a/Sources/Shared/Model/NETunnelProviderProtocol+Extension.swift b/Sources/Shared/Model/NETunnelProviderProtocol+Extension.swift
index ecb6e1f..0a303f4 100644
--- a/Sources/Shared/Model/NETunnelProviderProtocol+Extension.swift
+++ b/Sources/Shared/Model/NETunnelProviderProtocol+Extension.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import NetworkExtension
@@ -82,24 +82,22 @@ extension NETunnelProviderProtocol {
return true
}
#elseif os(iOS)
- if #available(iOS 15, *) {
- /* Update the stored reference from the old iOS 14 one to the canonical iOS 15 one.
- * The iOS 14 ones are 96 bits, while the iOS 15 ones are 160 bits. We do this so
- * that we can have fast set exclusion in deleteReferences safely. */
- if passwordReference != nil && passwordReference!.count == 12 {
- var result: CFTypeRef?
- let ret = SecItemCopyMatching([kSecValuePersistentRef: passwordReference!,
- kSecReturnPersistentRef: true] as CFDictionary,
- &result)
- if ret != errSecSuccess || result == nil {
- return false
- }
- guard let newReference = result as? Data else { return false }
- if !newReference.elementsEqual(passwordReference!) {
- wg_log(.info, message: "Migrating iOS 14-style keychain reference to iOS 15-style keychain reference for '\(name)'")
- passwordReference = newReference
- return true
- }
+ /* Update the stored reference from the old iOS 14 one to the canonical iOS 15 one.
+ * The iOS 14 ones are 96 bits, while the iOS 15 ones are 160 bits. We do this so
+ * that we can have fast set exclusion in deleteReferences safely. */
+ if passwordReference != nil && passwordReference!.count == 12 {
+ var result: CFTypeRef?
+ let ret = SecItemCopyMatching([kSecValuePersistentRef: passwordReference!,
+ kSecReturnPersistentRef: true] as CFDictionary,
+ &result)
+ if ret != errSecSuccess || result == nil {
+ return false
+ }
+ guard let newReference = result as? Data else { return false }
+ if !newReference.elementsEqual(passwordReference!) {
+ wg_log(.info, message: "Migrating iOS 14-style keychain reference to iOS 15-style keychain reference for '\(name)'")
+ passwordReference = newReference
+ return true
}
}
#endif
diff --git a/Sources/Shared/Model/String+ArrayConversion.swift b/Sources/Shared/Model/String+ArrayConversion.swift
index adb959f..97984f8 100644
--- a/Sources/Shared/Model/String+ArrayConversion.swift
+++ b/Sources/Shared/Model/String+ArrayConversion.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/Shared/Model/TunnelConfiguration+WgQuickConfig.swift b/Sources/Shared/Model/TunnelConfiguration+WgQuickConfig.swift
index 5d5216c..86af010 100644
--- a/Sources/Shared/Model/TunnelConfiguration+WgQuickConfig.swift
+++ b/Sources/Shared/Model/TunnelConfiguration+WgQuickConfig.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation
diff --git a/Sources/Shared/NotificationToken.swift b/Sources/Shared/NotificationToken.swift
index 9eb94ef..78d36ba 100644
--- a/Sources/Shared/NotificationToken.swift
+++ b/Sources/Shared/NotificationToken.swift
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.
+// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.
import Foundation