diff --git a/backend/libraries/proof_of_unique_personhood/src/lib.rs b/backend/libraries/proof_of_unique_personhood/src/lib.rs index f9310ad135..a717e58fda 100644 --- a/backend/libraries/proof_of_unique_personhood/src/lib.rs +++ b/backend/libraries/proof_of_unique_personhood/src/lib.rs @@ -4,7 +4,7 @@ use ic_verifiable_credentials::VcFlowSigners; use types::{CanisterId, TimestampMillis, UniquePersonProof, UniquePersonProofProvider}; const ISSUER_CANISTER_ID: CanisterId = CanisterId::from_slice(&[0, 0, 0, 0, 0, 240, 24, 173, 1, 1]); -const ISSUER_ORIGIN: &str = "id.decideai.xyz"; +const ISSUER_ORIGIN: &str = "https://id.decideai.xyz/"; const NANOS_PER_MILLISECOND: u64 = 1_000_000; pub fn verify_proof_of_unique_personhood( @@ -14,6 +14,8 @@ pub fn verify_proof_of_unique_personhood( ic_root_key: &[u8], now: TimestampMillis, ) -> Result { + 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, @@ -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 {