From 56cbb3544d0f8ce52fba5c89d5ba15219d0e2f43 Mon Sep 17 00:00:00 2001 From: Rick Newton-Rogers Date: Wed, 11 Dec 2024 14:09:12 +0000 Subject: [PATCH] add missing imports --- .../Operations/AcceptsUserAuthMessages.swift | 2 ++ Sources/NIOSSH/Key Exchange/EllipticCurveKeyExchange.swift | 5 +++++ .../Keys And Signatures/NIOSSHCertifiedPublicKey.swift | 7 +++++++ Sources/NIOSSH/Keys And Signatures/NIOSSHPrivateKey.swift | 5 +++++ Sources/NIOSSH/Keys And Signatures/NIOSSHPublicKey.swift | 1 + Sources/NIOSSHPerformanceTester/BenchmarkHandshake.swift | 1 + .../BenchmarkLinearThroughput.swift | 1 + Tests/NIOSSHTests/HostKeyTests.swift | 1 + 8 files changed, 23 insertions(+) diff --git a/Sources/NIOSSH/Connection State Machine/Operations/AcceptsUserAuthMessages.swift b/Sources/NIOSSH/Connection State Machine/Operations/AcceptsUserAuthMessages.swift index 4e68bcc..13746f3 100644 --- a/Sources/NIOSSH/Connection State Machine/Operations/AcceptsUserAuthMessages.swift +++ b/Sources/NIOSSH/Connection State Machine/Operations/AcceptsUserAuthMessages.swift @@ -12,6 +12,8 @@ // //===----------------------------------------------------------------------===// +import NIOCore + protocol AcceptsUserAuthMessages { var userAuthStateMachine: UserAuthenticationStateMachine { get set } diff --git a/Sources/NIOSSH/Key Exchange/EllipticCurveKeyExchange.swift b/Sources/NIOSSH/Key Exchange/EllipticCurveKeyExchange.swift index 642a097..e70b804 100644 --- a/Sources/NIOSSH/Key Exchange/EllipticCurveKeyExchange.swift +++ b/Sources/NIOSSH/Key Exchange/EllipticCurveKeyExchange.swift @@ -15,6 +15,11 @@ import Crypto import NIOCore import NIOFoundationCompat +#if canImport(FoundationEssentials) +import FoundationEssentials +#else +import Foundation +#endif /// This protocol defines a container used by the key exchange state machine to manage key exchange. /// This type erases the specific key exchanger. diff --git a/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift b/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift index e725ff7..60c6c42 100644 --- a/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift +++ b/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift @@ -12,9 +12,16 @@ // //===----------------------------------------------------------------------===// +import CDispatch import Crypto import Dispatch import NIOCore +#if canImport(FoundationEssentials) +import FoundationEssentials +#else +import Foundation +#endif + #if canImport(Darwin) import Darwin diff --git a/Sources/NIOSSH/Keys And Signatures/NIOSSHPrivateKey.swift b/Sources/NIOSSH/Keys And Signatures/NIOSSHPrivateKey.swift index 6618d27..454e199 100644 --- a/Sources/NIOSSH/Keys And Signatures/NIOSSHPrivateKey.swift +++ b/Sources/NIOSSH/Keys And Signatures/NIOSSHPrivateKey.swift @@ -14,6 +14,11 @@ @preconcurrency import Crypto import NIOCore +#if canImport(FoundationEssentials) +import FoundationEssentials +#else +import Foundation +#endif /// An SSH private key. /// diff --git a/Sources/NIOSSH/Keys And Signatures/NIOSSHPublicKey.swift b/Sources/NIOSSH/Keys And Signatures/NIOSSHPublicKey.swift index 9261b89..20fa63e 100644 --- a/Sources/NIOSSH/Keys And Signatures/NIOSSHPublicKey.swift +++ b/Sources/NIOSSH/Keys And Signatures/NIOSSHPublicKey.swift @@ -15,6 +15,7 @@ @preconcurrency import Crypto import Foundation import NIOCore +import NIOFoundationCompat /// An SSH public key. /// diff --git a/Sources/NIOSSHPerformanceTester/BenchmarkHandshake.swift b/Sources/NIOSSHPerformanceTester/BenchmarkHandshake.swift index 96f9874..8af98c5 100644 --- a/Sources/NIOSSHPerformanceTester/BenchmarkHandshake.swift +++ b/Sources/NIOSSHPerformanceTester/BenchmarkHandshake.swift @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// import Crypto import NIOCore +import NIOEmbedded import NIOSSH final class BenchmarkHandshake: Benchmark { diff --git a/Sources/NIOSSHPerformanceTester/BenchmarkLinearThroughput.swift b/Sources/NIOSSHPerformanceTester/BenchmarkLinearThroughput.swift index 347ba8d..e00e851 100644 --- a/Sources/NIOSSHPerformanceTester/BenchmarkLinearThroughput.swift +++ b/Sources/NIOSSHPerformanceTester/BenchmarkLinearThroughput.swift @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// import Crypto import NIOCore +import NIOEmbedded import NIOSSH final class BenchmarkLinearThroughput: Benchmark { diff --git a/Tests/NIOSSHTests/HostKeyTests.swift b/Tests/NIOSSHTests/HostKeyTests.swift index 90e8cec..15260a8 100644 --- a/Tests/NIOSSHTests/HostKeyTests.swift +++ b/Tests/NIOSSHTests/HostKeyTests.swift @@ -14,6 +14,7 @@ import Crypto import NIOCore +import NIOFoundationCompat import XCTest @testable import NIOSSH