@@ -148,7 +148,7 @@ struct PIVFullStackTests {
148
148
)
149
149
150
150
// Convert YubiKit public key to CryptoKit for verification
151
- let cryptoKitPublicKey = try Signing . PublicKey ( rawRepresentation: ed25519PublicKey. keyData)
151
+ let cryptoKitPublicKey = try Curve25519 . Signing. PublicKey ( rawRepresentation: ed25519PublicKey. keyData)
152
152
#expect( cryptoKitPublicKey. isValidSignature ( signature, for: testMessage) )
153
153
}
154
154
}
@@ -211,7 +211,7 @@ struct PIVFullStackTests {
211
211
}
212
212
213
213
// Generate X25519 key using CryptoKit
214
- let cryptoKitPrivateKey = KeyAgreement . PrivateKey ( )
214
+ let cryptoKitPrivateKey = Curve25519 . KeyAgreement. PrivateKey ( )
215
215
let cryptoKitPublicKey = cryptoKitPrivateKey. publicKey
216
216
217
217
// Convert to YubiKit format
@@ -226,7 +226,7 @@ struct PIVFullStackTests {
226
226
227
227
// Calculate shared secret using CryptoKit
228
228
let softwareSecret = try cryptoKitPrivateKey. sharedSecretFromKeyAgreement (
229
- with: KeyAgreement . PublicKey ( rawRepresentation: yubiKeyPublicKey. keyData)
229
+ with: Curve25519 . KeyAgreement. PublicKey ( rawRepresentation: yubiKeyPublicKey. keyData)
230
230
)
231
231
let softwareSecretData = softwareSecret. withUnsafeBytes { Data ( $0) }
232
232
@@ -313,7 +313,7 @@ struct PIVFullStackTests {
313
313
try requireFeatureSupport ( PIVSessionFeature . ed25519, in: session)
314
314
315
315
// Generate Ed25519 key using CryptoKit
316
- let cryptoKitPrivateKey = Signing . PrivateKey ( )
316
+ let cryptoKitPrivateKey = Curve25519 . Signing. PrivateKey ( )
317
317
let cryptoKitPublicKey = cryptoKitPrivateKey. publicKey
318
318
319
319
// Convert to YubiKit format
@@ -355,7 +355,7 @@ struct PIVFullStackTests {
355
355
try requireFeatureSupport ( PIVSessionFeature . x25519, in: session)
356
356
357
357
// Generate X25519 key using CryptoKit
358
- let cryptoKitPrivateKey = KeyAgreement . PrivateKey ( )
358
+ let cryptoKitPrivateKey = Curve25519 . KeyAgreement. PrivateKey ( )
359
359
let cryptoKitPublicKey = cryptoKitPrivateKey. publicKey
360
360
361
361
// Convert to YubiKit format
@@ -379,7 +379,7 @@ struct PIVFullStackTests {
379
379
#expect( keyType == PIV . X25519Key. x25519)
380
380
381
381
// Test key agreement with the imported key
382
- let otherCryptoKitPrivateKey = KeyAgreement . PrivateKey ( )
382
+ let otherCryptoKitPrivateKey = Curve25519 . KeyAgreement. PrivateKey ( )
383
383
let otherCryptoKitPublicKey = otherCryptoKitPrivateKey. publicKey
384
384
let otherPublicKeyData = otherCryptoKitPublicKey. rawRepresentation
385
385
@@ -535,7 +535,6 @@ struct PIVFullStackTests {
535
535
#expect( attestKey == publicKey)
536
536
} else {
537
537
// Just verify that the certificate was generated successfully
538
- #expect( cert. der != nil )
539
538
#expect( cert. der. count > 0 )
540
539
}
541
540
}
0 commit comments