jolocom / jolocom-sdk

A tool kit for integration with SSI
Apache License 2.0
31 stars 9 forks source link

Fix validation of subject and issuer #78

Closed clauxx closed 4 years ago

clauxx commented 4 years ago

Currently credential validation in the context of the Credential Offer flow happens at two points: inside handleCredentialsReceive (where the validity of the SignedCredential is checked with JolocomLib.parseAndValidate.signedCredential and the validity state is updated) and in getIssuanceResult (which is called manually and returns the issued credentials along with the validity of the subject and issuer fields). In the second case the validity state is not updated, causing interaction.storeSelectedCredentials to fail due to storing credentials with bad subject and issuer.