Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
9 changes: 2 additions & 7 deletions Sources/JWTKit/ECDSA/P256+CurveType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import FoundationEssentials
import Foundation
#endif

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension P256: ECDSACurveType {
public typealias Signature = P256.Signing.ECDSASignature
public typealias PrivateKey = P256.Signing.PrivateKey
Expand All @@ -28,7 +27,6 @@ extension P256: ECDSACurveType {
}
}

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension P256.Signing.PublicKey: ECDSAPublicKey {
/// Verifies that the P256 key signature is valid for the given digest.
///
Expand All @@ -43,11 +41,8 @@ extension P256.Signing.PublicKey: ECDSAPublicKey {
}
}

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension P256.Signing.PrivateKey: ECDSAPrivateKey, @unchecked @retroactive Sendable {}
extension P256.Signing.ECDSASignature: ECDSASignature, @unchecked @retroactive Sendable {}
extension P256.Signing.PublicKey: @unchecked @retroactive Sendable {}
extension P256: @unchecked @retroactive Sendable {}
extension P256.Signing.PrivateKey: ECDSAPrivateKey {}
extension P256.Signing.ECDSASignature: ECDSASignature {}

public typealias ES256PublicKey = ECDSA.PublicKey<P256>
public typealias ES256PrivateKey = ECDSA.PrivateKey<P256>
9 changes: 2 additions & 7 deletions Sources/JWTKit/ECDSA/P384+CurveType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import FoundationEssentials
import Foundation
#endif

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension P384: ECDSACurveType {
public typealias Signature = P384.Signing.ECDSASignature
public typealias PrivateKey = P384.Signing.PrivateKey
Expand All @@ -28,7 +27,6 @@ extension P384: ECDSACurveType {
}
}

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension P384.Signing.PublicKey: ECDSAPublicKey {
/// Verifies that the P384 key signature is valid for the given digest.
///
Expand All @@ -43,11 +41,8 @@ extension P384.Signing.PublicKey: ECDSAPublicKey {
}
}

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension P384.Signing.PrivateKey: ECDSAPrivateKey, @unchecked @retroactive Sendable {}
extension P384.Signing.ECDSASignature: ECDSASignature, @unchecked @retroactive Sendable {}
extension P384.Signing.PublicKey: @unchecked @retroactive Sendable {}
extension P384: @unchecked @retroactive Sendable {}
extension P384.Signing.PrivateKey: ECDSAPrivateKey {}
extension P384.Signing.ECDSASignature: ECDSASignature {}

public typealias ES384PublicKey = ECDSA.PublicKey<P384>
public typealias ES384PrivateKey = ECDSA.PrivateKey<P384>
8 changes: 2 additions & 6 deletions Sources/JWTKit/ECDSA/P521+CurveType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import FoundationEssentials
import Foundation
#endif

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension P521: ECDSACurveType {
public typealias Signature = P521.Signing.ECDSASignature
public typealias PrivateKey = P521.Signing.PrivateKey
Expand All @@ -29,7 +28,6 @@ extension P521: ECDSACurveType {
}
}

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension P521.Signing.PublicKey: ECDSAPublicKey {
/// Verifies that the P256 key signature is valid for the given digest.
///
Expand All @@ -44,10 +42,8 @@ extension P521.Signing.PublicKey: ECDSAPublicKey {
}
}

extension P521.Signing.PrivateKey: ECDSAPrivateKey, @unchecked @retroactive Sendable {}
extension P521.Signing.ECDSASignature: ECDSASignature, @unchecked @retroactive Sendable {}
extension P521.Signing.PublicKey: @unchecked @retroactive Sendable {}
extension P521: @unchecked @retroactive Sendable {}
extension P521.Signing.PrivateKey: ECDSAPrivateKey {}
extension P521.Signing.ECDSASignature: ECDSASignature {}

public typealias ES512PublicKey = ECDSA.PublicKey<P521>
public typealias ES512PrivateKey = ECDSA.PrivateKey<P521>
4 changes: 0 additions & 4 deletions Sources/JWTKit/EdDSA/EdDSA.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,3 @@ extension EdDSA {
}
}
}

// TODO: Remove @unchecked Sendable when Crypto is updated to use Sendable
extension Curve25519.Signing.PublicKey: @unchecked @retroactive Sendable {}
extension Curve25519.Signing.PrivateKey: @unchecked @retroactive Sendable {}
Loading