diff --git a/post-compute/src/compute/errors.rs b/post-compute/src/compute/errors.rs index 36978aa..b6bfcdd 100644 --- a/post-compute/src/compute/errors.rs +++ b/post-compute/src/compute/errors.rs @@ -15,8 +15,6 @@ pub enum ReplicateStatusCause { PostComputeEncryptionPublicKeyMissing, #[error("Unexpected error occurred")] PostComputeFailedUnknownIssue, - #[error("Invalid enclave challenge private key")] - PostComputeInvalidEnclaveChallengePrivateKey, #[error("Invalid TEE signature")] PostComputeInvalidTeeSignature, #[error("Failed to upload to IPFS")] diff --git a/post-compute/src/compute/signer.rs b/post-compute/src/compute/signer.rs index 3dc9701..6760dd3 100644 --- a/post-compute/src/compute/signer.rs +++ b/post-compute/src/compute/signer.rs @@ -27,7 +27,7 @@ use alloy_signer_local::PrivateKeySigner; /// # Errors /// /// This function will return an error in the following situations: -/// * The provided private key cannot be parsed as a valid `PrivateKeySigner` (returns `PostComputeInvalidEnclaveChallengePrivateKey`) +/// * The provided private key cannot be parsed as a valid `PrivateKeySigner` (returns `PostComputeInvalidTeeSignature`) /// * The signing operation fails (returns `PostComputeInvalidTeeSignature`) /// /// # Example @@ -49,7 +49,7 @@ pub fn sign_enclave_challenge( ) -> Result { let signer: PrivateKeySigner = enclave_challenge_private_key .parse::() - .map_err(|_| ReplicateStatusCause::PostComputeInvalidEnclaveChallengePrivateKey)?; + .map_err(|_| ReplicateStatusCause::PostComputeInvalidTeeSignature)?; let signature: Signature = signer .sign_message_sync(&hex_string_to_byte_array(message_hash)) @@ -144,7 +144,7 @@ mod tests { assert!( matches!( result, - Err(err) if err == ReplicateStatusCause::PostComputeInvalidEnclaveChallengePrivateKey + Err(err) if err == ReplicateStatusCause::PostComputeInvalidTeeSignature ), "Should return missing TEE challenge private key error" );