From 27a587f04c7b813db68f144624e4cdcf557083d5 Mon Sep 17 00:00:00 2001 From: Michael Avoyan <64565419+michaelavoyan@users.noreply.github.com> Date: Sun, 6 Oct 2024 17:59:46 +0300 Subject: [PATCH] sendable fixes --- VCL/VCL/api/keys/VCLKeyService.swift | 4 ++-- VCL/VCL/impl/keys/VCLKeyServiceLocalImpl.swift | 3 ++- .../infrastructure/resources/valid/VCLKeyServiceMock.swift | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VCL/VCL/api/keys/VCLKeyService.swift b/VCL/VCL/api/keys/VCLKeyService.swift index b0b9e24..d9eeda0 100644 --- a/VCL/VCL/api/keys/VCLKeyService.swift +++ b/VCL/VCL/api/keys/VCLKeyService.swift @@ -18,11 +18,11 @@ public protocol VCLKeyService: Sendable { ) func generateSecret( signatureAlgorithm: VCLSignatureAlgorithm, - completionBlock: @escaping @Sendable (VCLResult) -> Void + completionBlock: @escaping @Sendable (VCLResult) -> Void ) func retrieveSecretReference( keyId: String, - completionBlock: @escaping @Sendable (VCLResult) -> Void + completionBlock: @escaping @Sendable (VCLResult) -> Void ) func retrievePublicJwk( secret: VCCrypto.VCCryptoSecret, diff --git a/VCL/VCL/impl/keys/VCLKeyServiceLocalImpl.swift b/VCL/VCL/impl/keys/VCLKeyServiceLocalImpl.swift index 14ec792..9aad680 100644 --- a/VCL/VCL/impl/keys/VCLKeyServiceLocalImpl.swift +++ b/VCL/VCL/impl/keys/VCLKeyServiceLocalImpl.swift @@ -52,7 +52,8 @@ final class VCLKeyServiceLocalImpl: VCLKeyService { } func generateSecret( - completionBlock: @escaping @Sendable (VCLResult) -> Void + signatureAlgorithm: VCLSignatureAlgorithm = VCLSignatureAlgorithm.SECP256k1, // ignored + completionBlock: @escaping @Sendable (VCLResult) -> Void ) { do { completionBlock(.success(try keyManagementOperations.generateKey())) diff --git a/VCL/VCLTests/infrastructure/resources/valid/VCLKeyServiceMock.swift b/VCL/VCLTests/infrastructure/resources/valid/VCLKeyServiceMock.swift index 1b9791e..e758923 100644 --- a/VCL/VCLTests/infrastructure/resources/valid/VCLKeyServiceMock.swift +++ b/VCL/VCLTests/infrastructure/resources/valid/VCLKeyServiceMock.swift @@ -12,7 +12,7 @@ import VCToken import VCCrypto @testable import VCL -class VCLKeyServiceMock: VCLKeyService { +final class VCLKeyServiceMock: VCLKeyService { func generateDidJwk( didJwkDescriptor: VCLDidJwkDescriptor, completionBlock: @escaping @Sendable (VCLResult) -> Void