From 5d5a33cbb5a5acc80dece0a23f37b00d6fac1510 Mon Sep 17 00:00:00 2001 From: Suzanna Jiwani Date: Mon, 2 Dec 2024 15:35:48 -0500 Subject: [PATCH] Don't Base64.UrlSafe Encode x5c in Request Used java.util.Base64.getEncoder() to encode the the x5c instead. Tested manually against java.util.Base64.getDecoder() .decode to ensure decoding doesn't throw error. Signed-off-by: Suzanna Jiwani --- .../java/com/android/identity/wallet/server/VerifierServlet.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/com/android/identity/wallet/server/VerifierServlet.kt b/server/src/main/java/com/android/identity/wallet/server/VerifierServlet.kt index 18c0840f0..630d34e11 100644 --- a/server/src/main/java/com/android/identity/wallet/server/VerifierServlet.kt +++ b/server/src/main/java/com/android/identity/wallet/server/VerifierServlet.kt @@ -870,7 +870,7 @@ lrW+vvdmRHBgS+ss56uWyYor6W7ah9ygBwYFK4EEACI= ) val readerX5c = singleUseReaderKeyCertChain.certificates.map { cert -> - Base64.from(cert.encodedCertificate.toBase64Url()) + Base64.from(java.util.Base64.getEncoder().encodeToString(cert.encodedCertificate)) } val request = lookupWellknownRequest(session.requestFormat, session.requestDocType, session.requestId)