Skip to content

OID4VP - specifying the signature algorithm crashes the "presentation flow" #207

@cvetojevichbojan

Description

@cvetojevichbojan

When performing an OpenID4VP presentation if we specify the signature algorithm ES256 when generating the response (as in the examples), the process fails with the following error:

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at com.nimbusds.jose.JWSAlgorithm.parse(JWSAlgorithm.java:257)
at eu.europa.ec.eudi.wallet.internal.OpenId4VpUtilsKt.serializeWithKeyBinding(OpenId4VpUtils.kt:340)
at eu.europa.ec.eudi.wallet.internal.OpenId4VpUtilsKt$verifiablePresentationForSdJwtVc$2.invokeSuspend(OpenId4VpUtils.kt:408)

Omitting the signature algorithm fixes the issue.

Debugging the issue was difficult and i couldn't easily determine how the NPE error occurs as there seemed to be some kind of context switch when going through the OpenId4VpUtils#serializeWithKeyBinding method that would throw the error.

I have not tried other combinations of algorithms.

Steps to Reproduce:

In the EUDI android wallet ui demo app, in WalletCorePresentationControllerImpl modify the line 377 and add Algorithm.EP256 as a parameter.

Create a verifier request of Presentation Query Type: Presentation Exchange and try to transfer a sd_jwt pid document.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions