Skip to content

Commit 7c4936e

Browse files
committed
Merge branch 'joao/all-public-types-sendable'
2 parents 8b85211 + 4166d29 commit 7c4936e

20 files changed

+24
-24
lines changed

YubiKit/YubiKit/Connection.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public protocol SmartCardConnection: Sendable {
6767
}
6868

6969
/// SmartCardConnection Errors.
70-
public enum ConnectionError: Error {
70+
public enum ConnectionError: Error, Sendable {
7171
/// No current connection.
7272
case noConnection
7373
/// Unexpected result returned from YubiKey.
@@ -81,7 +81,7 @@ public enum ConnectionError: Error {
8181
}
8282

8383
/// A ResponseError containing the status code.
84-
public struct ResponseError: Error {
84+
public struct ResponseError: Error, Sendable {
8585
/// Status code of the response.
8686
public let responseStatus: ResponseStatus
8787
}

YubiKit/YubiKit/Keys/Curve25519Keys.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import CryptoKit
1616
import Foundation
1717

1818
/// Ed25519
19-
public enum Ed25519 {
19+
public enum Ed25519: Sendable {
2020
/// An Ed25519 public key for signature verification
2121
public struct PublicKey: Sendable, Equatable {
2222
/// The 32-byte public key data
@@ -80,7 +80,7 @@ public enum Ed25519 {
8080
}
8181

8282
/// X25519 key agreement algorithm keys
83-
public enum X25519 {
83+
public enum X25519: Sendable {
8484
/// An X25519 public key for key agreement
8585
public struct PublicKey: Sendable, Equatable {
8686
/// The 32-byte public key data

YubiKit/YubiKit/Keys/ECKeys.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import Foundation
1919

20-
public enum EC {
20+
public enum EC: Sendable {
2121
/// Supported elliptic curve types (currently P-256 and P-384) using uncompressed point representation.
2222
public enum Curve: Sendable, Equatable {
2323
case p384

YubiKit/YubiKit/Keys/RSAKeys.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import CryptoTokenKit
1919
import Foundation
2020

21-
public enum RSA {
21+
public enum RSA: Sendable {
2222

2323
/// Supported RSA key sizes (in bits).
2424
public enum KeySize: Int, Sendable, CaseIterable {

YubiKit/YubiKit/Management/Capability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
/// Identifies a feature (typically an application) on a YubiKey which may or may not be supported, and which can be enabled or disabled.
11-
public enum Capability: UInt {
11+
public enum Capability: UInt, Sendable {
1212
/// Identifies the YubiOTP application.
1313
case OTP = 0x0001
1414
/// Identifies the U2F (CTAP1) portion of the FIDO application.

YubiKit/YubiKit/Management/ManagementFeature.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import Foundation
1616

1717
/// Management session features.
18-
public enum ManagementFeature: SessionFeature {
18+
public enum ManagementFeature: SessionFeature, Sendable {
1919

2020
/// Support for reading the DeviceInfo data from the YubiKey.
2121
case deviceInfo

YubiKit/YubiKit/Management/ManagementSession.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import CryptoTokenKit
1616
import Foundation
1717
import OSLog
1818

19-
public enum ManagementSessionError: Error {
19+
public enum ManagementSessionError: Error, Sendable {
2020
/// Application is not supported on this YubiKey.
2121
case applicationNotSupported
2222
/// Unexpected configuration state.

YubiKit/YubiKit/NFCSmartCardConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public struct NFCSmartCardConnection: SmartCardConnection, Sendable {
119119
}
120120

121121
// NFCSmartCardConnection specific errors
122-
public enum NFCConnectionError: Error {
122+
public enum NFCConnectionError: Error, Sendable {
123123
case failedToPoll
124124
case unsupported
125125
case malformedAPDU

YubiKit/YubiKit/OATH/OATHSession.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private let tagResponse: TKTLVTag = 0x75
2828

2929
let oathDefaultPeriod = 30.0
3030

31-
public enum OATHSessionError: Error {
31+
public enum OATHSessionError: Error, Sendable {
3232
case wrongPassword
3333
case responseDataNotTLVFormatted
3434
case missingVersionInfo
@@ -454,7 +454,7 @@ public final actor OATHSession: Session {
454454
}
455455
}
456456

457-
public struct DeriveAccessKeyError: Error {
457+
public struct DeriveAccessKeyError: Error, Sendable {
458458
let cryptorStatus: CCCryptorStatus
459459
}
460460

YubiKit/YubiKit/OATH/OATHSessionFeature.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import Foundation
1616

17-
public enum OATHSessionFeature: SessionFeature {
17+
public enum OATHSessionFeature: SessionFeature, Sendable {
1818

1919
case rename, touch, sha512
2020

0 commit comments

Comments
 (0)