From 3bd538b2367ea88880ba22757682efde357da007 Mon Sep 17 00:00:00 2001 From: Qiwei Yang Date: Thu, 17 Oct 2024 14:37:11 +0800 Subject: [PATCH] fix --- Utils/Sources/Utils/Crypto/BLS.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Utils/Sources/Utils/Crypto/BLS.swift b/Utils/Sources/Utils/Crypto/BLS.swift index 422dc0c3..893636d7 100644 --- a/Utils/Sources/Utils/Crypto/BLS.swift +++ b/Utils/Sources/Utils/Crypto/BLS.swift @@ -115,7 +115,7 @@ public enum BLS: KeyType { public func verify(signature: Data, message: Data) throws(Error) -> Bool { var output = false - FFIUtils.call(signature, message) { ptrs in + try FFIUtils.call(signature, message) { ptrs in public_verify( ptr.value, ptrs[0].ptr, @@ -124,6 +124,9 @@ public enum BLS: KeyType { ptrs[1].count, &output ) + } onErr: { err throws(Error) in + // no need to throw here, but still need to catch errors + logger.debug("PublicKey.verify failed: \(err)") } return output