eu-digital-identity-wallet / eudi-lib-jvm-siop-openid4vp-kt

Implementation of SIOPv2 and OpenID4VP protocols (wallet's role) in Kotlin
Apache License 2.0
12 stars 2 forks source link

Self Signed Certificates #287

Closed icarboneaq closed 3 weeks ago

icarboneaq commented 1 month ago

Hello, I'm attempting to issue and verify MDOC credentials besides MDL and am running into an issue around verifying the cert chain that is passed in the JWT's header during the OpenID4VP process. For the purposes of testing I am using self signed certificates that chains up to an untrusted root, and the service is expectedly throwing an 'Untrusted x5c' error.

It appears that the issue comes from here. Are there any plans to support self signed certificates in this way? I found some code in the EUDI demo wallet that allows for support of self signed certificates served by web servers, but not for this specifically.

babisRoutis commented 1 month ago

Hi @icarboneaq

Please take a look in Example.kt located under the tests folder.

Actually, you can pass as a parameter to the configuration (SiopOpenId4VpConfig) an implementation of the trust interface.

Here you can find an example that trusts any issuer certificate (chain). Of course it shouldn't be used in production