From 9b865c5f5e03b0abfdad7c06b3ec1c56805d0ced Mon Sep 17 00:00:00 2001 From: Amir Abbas Mousavian Date: Mon, 6 May 2024 08:04:02 +0330 Subject: [PATCH] fix: Build issue --- Sources/JWSETKit/Cryptography/EC/P256.swift | 3 ++- Sources/JWSETKit/Cryptography/EC/P384.swift | 3 ++- Sources/JWSETKit/Cryptography/EC/P521.swift | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Sources/JWSETKit/Cryptography/EC/P256.swift b/Sources/JWSETKit/Cryptography/EC/P256.swift index 4f60024..4811df5 100644 --- a/Sources/JWSETKit/Cryptography/EC/P256.swift +++ b/Sources/JWSETKit/Cryptography/EC/P256.swift @@ -23,7 +23,8 @@ extension P256.KeyAgreement.PublicKey: CryptoECPublicKey { extension P256.Signing.PublicKey: JSONWebValidatingKey { public func verifySignature(_ signature: S, for data: D, using _: JSONWebSignatureAlgorithm) throws where S: DataProtocol, D: DataProtocol { let ecdsaSignature: P256.Signing.ECDSASignature - if signature.count == (curve?.coordinateSize ?? 0) * 2 { + // swiftformat:disable:next redundantSelf + if signature.count == (self.curve?.coordinateSize ?? 0) * 2 { ecdsaSignature = try .init(rawRepresentation: signature) } else { ecdsaSignature = try .init(derRepresentation: signature) diff --git a/Sources/JWSETKit/Cryptography/EC/P384.swift b/Sources/JWSETKit/Cryptography/EC/P384.swift index 715cf6f..04af41a 100644 --- a/Sources/JWSETKit/Cryptography/EC/P384.swift +++ b/Sources/JWSETKit/Cryptography/EC/P384.swift @@ -23,7 +23,8 @@ extension P384.KeyAgreement.PublicKey: CryptoECPublicKey { extension P384.Signing.PublicKey: JSONWebValidatingKey { public func verifySignature(_ signature: S, for data: D, using _: JSONWebSignatureAlgorithm) throws where S: DataProtocol, D: DataProtocol { let ecdsaSignature: P384.Signing.ECDSASignature - if signature.count == (curve?.coordinateSize ?? 0) * 2 { + // swiftformat:disable:next redundantSelf + if signature.count == (self.curve?.coordinateSize ?? 0) * 2 { ecdsaSignature = try .init(rawRepresentation: signature) } else { ecdsaSignature = try .init(derRepresentation: signature) diff --git a/Sources/JWSETKit/Cryptography/EC/P521.swift b/Sources/JWSETKit/Cryptography/EC/P521.swift index a8eb395..42ddb02 100644 --- a/Sources/JWSETKit/Cryptography/EC/P521.swift +++ b/Sources/JWSETKit/Cryptography/EC/P521.swift @@ -23,7 +23,8 @@ extension P521.KeyAgreement.PublicKey: CryptoECPublicKey { extension P521.Signing.PublicKey: JSONWebValidatingKey { public func verifySignature(_ signature: S, for data: D, using _: JSONWebSignatureAlgorithm) throws where S: DataProtocol, D: DataProtocol { let ecdsaSignature: P521.Signing.ECDSASignature - if signature.count == (curve?.coordinateSize ?? 0) * 2 { + // swiftformat:disable:next redundantSelf + if signature.count == (self.curve?.coordinateSize ?? 0) * 2 { ecdsaSignature = try .init(rawRepresentation: signature) } else { ecdsaSignature = try .init(derRepresentation: signature)