Skip to content

Commit a44c780

Browse files
fix: presentation definition broken
there was as well a fix for the current CI that was not failing on test fails Signed-off-by: goncalo-frade-iohk <[email protected]>
1 parent e8a4973 commit a44c780

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

EdgeAgentSDK/EdgeAgent/Tests/PresentationExchangeTests.swift

+5-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ final class PresentationExchangeFlowTests: XCTestCase {
109109

110110
logger.info("Creating presentation request")
111111
let message = try edgeAgent.initiatePresentationRequest(
112-
type: .jwt,
112+
type: .sdjwt,
113113
fromDID: DID(method: "test", methodId: "alice"),
114114
toDID: DID(method: "test", methodId: "bob"),
115115
claimFilters: [
@@ -152,7 +152,8 @@ final class PresentationExchangeFlowTests: XCTestCase {
152152
)
153153

154154
guard
155-
let key = try await edgeAgent.pluto.getDIDPrivateKeys(did: issuerDID).first().await()?.first,
155+
let key = try await edgeAgent.pluto.getDIDPrivateKeys(did: issuerDID).first().await()?.first(where: { $0.identifier.contains("authentication0")
156+
}),
156157
let jwkD = try await edgeAgent.apollo.restorePrivateKey(key).exporting?.jwk
157158
else {
158159
XCTFail()
@@ -167,7 +168,8 @@ final class PresentationExchangeFlowTests: XCTestCase {
167168

168169
private func makeCredentialSDJWT(issuerDID: DID, subjectDID: DID) async throws -> String {
169170
guard
170-
let key = try await edgeAgent.pluto.getDIDPrivateKeys(did: issuerDID).first().await()?.first,
171+
let key = try await edgeAgent.pluto.getDIDPrivateKeys(did: issuerDID).first().await()?.first(where: { $0.identifier.contains("authentication0")
172+
}),
171173
let jwkD = try await edgeAgent.apollo.restorePrivateKey(key).exporting?.jwk
172174
else {
173175
XCTFail()

EdgeAgentSDK/Pollux/Sources/PolluxImpl+Presentation.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ extension PolluxImpl {
114114
)
115115
}
116116
let presentationDefinition = PresentationDefinition(
117-
format: .init(sdJwt: .init(alg: [.ES256K])),
117+
format: .init(sdJwt: .init(alg: [.EdDSA, .ES256K])),
118118
inputDescriptors: descriptors
119119
)
120120

build_test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ echo "Cleaning lcov partials directory"
2020
rm -rf "$LCOV_DIR"
2121
mkdir "$LCOV_DIR"
2222

23+
set -euo pipefail
24+
2325
# Run build and test
2426
echo "Running build and test"
2527
xcodebuild -scheme "EdgeAgentSDK-Package" \

0 commit comments

Comments
 (0)