Skip to content

Commit

Permalink
Merge pull request #19 from eu-digital-identity-wallet/develop
Browse files Browse the repository at this point in the history
fix for verifier name
  • Loading branch information
psima authored Feb 6, 2024
2 parents dfb80ca + 10da47b commit e35d98b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public class OpenId4VpService: PresentationService {
let chainVerifier = X509CertificateChainVerifier()
let verified = try? chainVerifier.verifyCertificateChain(base64Certificates: certificates)
var result = chainVerifier.isChainTrustResultSuccesful(verified ?? .failure)
guard let self, let b64cert = certificates.last, let data = Data(base64Encoded: b64cert), let str = String(data: data, encoding: .utf8) else { return result }
guard let self, let b64cert = certificates.first, let data = Data(base64Encoded: b64cert), let str = String(data: data, encoding: .utf8) else { return result }
guard let encodedData = Data(base64Encoded: str.removeCertificateDelimiters()), let cert = SecCertificateCreateWithData(nil, encodedData as CFData) else { return result }
var cfName: CFString?; SecCertificateCopyCommonName(cert, &cfName); self.readerCertificateIssuer = cfName as String?
let (isValid, reason, _) = SecurityHelpers.isValidMdlPublicKey(secCert: cert, usage: .mdocAuth, rootCerts: self.iaca)
Expand Down

0 comments on commit e35d98b

Please sign in to comment.