Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Giuseppe De Marco <[email protected]>
Signed-off-by: Daniel Fett <[email protected]>
  • Loading branch information
danielfett and peppelinux authored May 15, 2024
1 parent e0e31de commit b3ac23f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/sd_jwt/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _parse_sd_jwt(self, sd_jwt):
(
self._unverified_input_sd_jwt,
*self._input_disclosures,
self._unverified_input_key_binding_jwt,
self._unverified_input_key_binding_jwt
) = self._split(sd_jwt)

# Extract only the body from SD-JWT without verifying the signature
Expand Down Expand Up @@ -164,7 +164,7 @@ def _parse_sd_jwt(self, sd_jwt):
[
self._unverified_input_sd_jwt_parsed["protected"],
self._unverified_input_sd_jwt_parsed["payload"],
self._unverified_input_sd_jwt_parsed["signature"],
self._unverified_input_sd_jwt_parsed["signature"]
]
)

Expand Down Expand Up @@ -199,6 +199,6 @@ def _calculate_kb_hash(self, disclosures):
string_to_hash = self._combine(
self._unverified_compact_serialized_input_sd_jwt,
*disclosures,
"",
""
)
return self._b64hash(string_to_hash.encode("ascii"))
2 changes: 1 addition & 1 deletion tests/test_disclose_all_shortcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def cb_get_issuer_key(issuer, header_parameters):

expected_header_parameters = {
"alg": testcase.get("sign_alg", "ES256"),
"typ": "testcase+sd-jwt",
"typ": "testcase+sd-jwt"
}
expected_header_parameters.update(extra_header_parameters)

Expand Down

0 comments on commit b3ac23f

Please sign in to comment.