Skip to content

Commit

Permalink
Key Type Bug Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
consuelita committed Feb 7, 2024
1 parent 9cc530a commit f9615c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Sources/ShadowSwift/Async/AsyncDarkstar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public struct AsyncDarkstar
{
throw AsyncDarkstarError.keyAgreementFailed
}
let serverPersistentPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(rawRepresentation: serverPersistentPublicKeyKeychainData)
let serverPersistentPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(x963Representation: serverPersistentPublicKeyKeychainData)
guard let serverPersistentPublicKeyDarkstarData = serverPersistentPublicKeyCryptoKit.compactRepresentation else
{
throw AsyncDarkstarError.keyAgreementFailed
Expand All @@ -70,7 +70,7 @@ public struct AsyncDarkstar
{
throw AsyncDarkstarError.keyAgreementFailed
}
let clientEphemeralPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(rawRepresentation: clientEphemeralPublicKeyKeychainData)
let clientEphemeralPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(x963Representation: clientEphemeralPublicKeyKeychainData)
guard let clientEphemeralPublicKeyDarkstarData = clientEphemeralPublicKeyCryptoKit.compactRepresentation else
{
throw AsyncDarkstarError.keyAgreementFailed
Expand Down Expand Up @@ -184,7 +184,7 @@ public struct AsyncDarkstar
{
throw AsyncDarkstarError.keyAgreementFailed
}
let serverPersistentPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(rawRepresentation: serverPersistentPublicKeyKeychainData)
let serverPersistentPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(x963Representation: serverPersistentPublicKeyKeychainData)
guard let serverPersistentPublicKeyDarkstarData = serverPersistentPublicKeyCryptoKit.compactRepresentation else
{
throw AsyncDarkstarError.keyAgreementFailed
Expand All @@ -194,7 +194,7 @@ public struct AsyncDarkstar
{
throw AsyncDarkstarError.keyAgreementFailed
}
let clientEphemeralPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(rawRepresentation: clientEphemeralPublicKeyKeychainData)
let clientEphemeralPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(x963Representation: clientEphemeralPublicKeyKeychainData)
guard let clientEphemeralPublicKeyDarkstarData = clientEphemeralPublicKeyCryptoKit.compactRepresentation else
{
throw AsyncDarkstarError.keyAgreementFailed
Expand Down
4 changes: 2 additions & 2 deletions Sources/ShadowSwift/Async/AsyncDarkstarClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class AsyncDarkstarClient
{
throw AsyncDarkstarError.keyAgreementFailed
}
let serverEphemeralPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(rawRepresentation: serverEphemeralPublicKeyKeychainData)
let serverEphemeralPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(x963Representation: serverEphemeralPublicKeyKeychainData)
guard let serverEphemeralPublicKeyDarkstarData = serverEphemeralPublicKeyCryptoKit.compactRepresentation else
{
throw AsyncDarkstarError.keyAgreementFailed
Expand All @@ -91,7 +91,7 @@ public class AsyncDarkstarClient
{
throw AsyncDarkstarError.keyAgreementFailed
}
let clientEphemeralPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(rawRepresentation: clientEphemeralPublicKeyKeychainData)
let clientEphemeralPublicKeyCryptoKit = try P256.KeyAgreement.PublicKey(x963Representation: clientEphemeralPublicKeyKeychainData)
guard let clientEphemeralPublicKeyDarkstarData = clientEphemeralPublicKeyCryptoKit.compactRepresentation else
{
throw AsyncDarkstarError.keyAgreementFailed
Expand Down

0 comments on commit f9615c0

Please sign in to comment.