airsidemobile / JOSESwift

A framework for the JOSE standards JWS, JWE, and JWK written in Swift.
https://www.airsidemobile.com
Apache License 2.0
201 stars 113 forks source link

JWS init error localAuthenticationFailed #329

Open raphaelguye opened 3 months ago

raphaelguye commented 3 months ago

From time to time, we get an JOSESwiftError of type localAuthenticationFailed when trying to initialize a JWS object. The Signer we use is an ECSigner with an algorith ES256.

After some investigations the error seems to be thrown by:

The errorCode is always -1

Do you have any idea why such errors happens and how we should investigate the problem more in details?

daniel-moh commented 2 months ago

Hi @raphaelguye, do you have a reproducible scenario for us to have a look at? In the meantime you can also look at https://github.com/airsidemobile/JOSESwift/pull/173 which was the PR that added this part of error handling, for more details.