Skip to content

Commit

Permalink
[ES-798] fixed VC verification failed issue.
Browse files Browse the repository at this point in the history
Signed-off-by: Mahammed Taheer <[email protected]>
  • Loading branch information
mahammedtaheer committed Feb 14, 2024
1 parent 3cca8ef commit 0333c97
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,8 @@ public String signWithPayload(String data) {
public String jwsSignWithPayload(String data) {
JWSSignatureRequestDto request = new JWSSignatureRequestDto();
request.setApplicationId(vciExchSignApplicationId);
request.setDataToSign(CryptoUtil.encodeBase64Url(data.getBytes()));
//request.setDataToSign(CryptoUtil.encodeBase64Url(data.getBytes()));
request.setDataToSign(data);
request.setIncludeCertHash(false);
request.setIncludeCertificate(includeCertificate);
request.setIncludePayload(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ private JsonLDObject generateLdpVc(String credSubjectId, Map<String, List<Identi
byte[] vcSignBytes = canonicalizer.canonicalize(vcLdProof, vcJsonLdObject);
String vcEncodedData = CryptoUtil.encodeBase64Url(vcSignBytes);

mosipLogger.debug(IdAuthCommonConstants.SESSION_ID, this.getClass().getCanonicalName(), "generateLdpVc",
"Hash value for the generated VC: " + vcEncodedData);

String jws = securityManager.jwsSignWithPayload(vcEncodedData);

LdProof ldProofWithJWS = LdProof.builder()
Expand Down

0 comments on commit 0333c97

Please sign in to comment.