Skip to content

Commit

Permalink
[INJICERT-657] fixup duplicate hashing for RSA
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
  • Loading branch information
vharsh committed Dec 20, 2024
1 parent fe7ab48 commit fe72605
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ public Canonicalizer getCanonicalizer() {

@Override
public LdProof generateProof(LdProof vcLdProof, String vcEncodedHash, Map<String, String> keyID) {
String vcEncodedData = Base64.getUrlEncoder().encodeToString(vcEncodedHash.getBytes(StandardCharsets.UTF_8));
JWSSignatureRequestDto payload = new JWSSignatureRequestDto();
payload.setDataToSign(vcEncodedData);
payload.setDataToSign(vcEncodedHash);
payload.setApplicationId(keyID.get(Constants.APPLICATION_ID));
payload.setReferenceId(keyID.get(Constants.REFERENCE_ID)); // alg, empty = RSA
payload.setIncludePayload(false);
Expand Down

0 comments on commit fe72605

Please sign in to comment.