Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix build on all platforms
Motivation:

It turns out that PR 183 broke the build on a number of
platforms, including Linux 6.1+, Android 6.1+, and
on 6.0 macOS. We need to keep things building.

Modifications:

Guard the import of CDispatch
Remove the use of replacingOccurrences

Result:

Better builds.
  • Loading branch information
Lukasa committed Dec 16, 2024
commit 966458bb20233f03e04cc04bd25e3a2a52ed897a
35 changes: 19 additions & 16 deletions Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
//
//===----------------------------------------------------------------------===//

#if canImport(CDispatch)
import CDispatch
#endif

import Crypto
import Dispatch
import NIOCore
Expand Down Expand Up @@ -393,22 +396,22 @@ extension NIOSSHCertifiedPublicKey: Hashable {}

extension NIOSSHCertifiedPublicKey: CustomDebugStringConvertible {
public var debugDescription: String {
"""
NIOSSHCertifiedPublicKey(
nonce: \(self.nonce),
serial: \(self.serial),
type: \(self.type),
key: \(self.key),
keyID: \(self.keyID),
validPrincipals: \(self.validPrincipals),
validAfter: \(self.validAfter),
validBefore: \(self.validBefore),
criticalOptions: \(self.criticalOptions),
extensions: \(self.extensions),
signatureKey: \(self.signatureKey),
signature: \(self.signature)
)
""".replacingOccurrences(of: "\n", with: "")
// Slightly hacky multiline string to try to keep things
// clear.
"NIOSSHCertifiedPublicKey(" +
"nonce: \(self.nonce), " +
"serial: \(self.serial), " +
"type: \(self.type), " +
"key: \(self.key), " +
"keyID: \(self.keyID), " +
"validPrincipals: \(self.validPrincipals), " +
"validAfter: \(self.validAfter), " +
"validBefore: \(self.validBefore), " +
"criticalOptions: \(self.criticalOptions), " +
"extensions: \(self.extensions), " +
"signatureKey: \(self.signatureKey), " +
"signature: \(self.signature)" +
")"
}
}

Expand Down
Loading