Skip to content

Commit

Permalink
Fix root_pk_raw value
Browse files Browse the repository at this point in the history
  • Loading branch information
hpeebles committed Jul 23, 2024
1 parent d34623f commit 7622721
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/libraries/proof_of_unique_personhood/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ pub fn verify_proof_of_unique_personhood(
ic_root_key: &[u8],
now: TimestampMillis,
) -> Result<UniquePersonProof, String> {
let root_pk_raw = &ic_root_key[ic_root_key.len().saturating_sub(96)..];

match ic_verifiable_credentials::validate_ii_presentation_and_claims(
credential_jwt,
principal,
Expand All @@ -27,7 +29,7 @@ pub fn verify_proof_of_unique_personhood(
credential_type: "ProofOfUniqueness".to_string(),
arguments: None,
},
ic_root_key,
root_pk_raw,
(now * NANOS_PER_MILLISECOND) as u128,
) {
Ok(_) => Ok(UniquePersonProof {
Expand Down

0 comments on commit 7622721

Please sign in to comment.