File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ pub enum ReplicateStatusCause {
1515 PostComputeEncryptionPublicKeyMissing ,
1616 #[ error( "Unexpected error occurred" ) ]
1717 PostComputeFailedUnknownIssue ,
18- #[ error( "Invalid enclave challenge private key" ) ]
19- PostComputeInvalidEnclaveChallengePrivateKey ,
2018 #[ error( "Invalid TEE signature" ) ]
2119 PostComputeInvalidTeeSignature ,
2220 #[ error( "Failed to upload to IPFS" ) ]
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ use alloy_signer_local::PrivateKeySigner;
2727/// # Errors
2828///
2929/// This function will return an error in the following situations:
30- /// * The provided private key cannot be parsed as a valid `PrivateKeySigner` (returns `PostComputeInvalidEnclaveChallengePrivateKey `)
30+ /// * The provided private key cannot be parsed as a valid `PrivateKeySigner` (returns `PostComputeInvalidTeeSignature `)
3131/// * The signing operation fails (returns `PostComputeInvalidTeeSignature`)
3232///
3333/// # Example
@@ -49,7 +49,7 @@ pub fn sign_enclave_challenge(
4949) -> Result < String , ReplicateStatusCause > {
5050 let signer: PrivateKeySigner = enclave_challenge_private_key
5151 . parse :: < PrivateKeySigner > ( )
52- . map_err ( |_| ReplicateStatusCause :: PostComputeInvalidEnclaveChallengePrivateKey ) ?;
52+ . map_err ( |_| ReplicateStatusCause :: PostComputeInvalidTeeSignature ) ?;
5353
5454 let signature: Signature = signer
5555 . sign_message_sync ( & hex_string_to_byte_array ( message_hash) )
@@ -144,7 +144,7 @@ mod tests {
144144 assert ! (
145145 matches!(
146146 result,
147- Err ( err) if err == ReplicateStatusCause :: PostComputeInvalidEnclaveChallengePrivateKey
147+ Err ( err) if err == ReplicateStatusCause :: PostComputeInvalidTeeSignature
148148 ) ,
149149 "Should return missing TEE challenge private key error"
150150 ) ;
You can’t perform that action at this time.
0 commit comments