Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: (fix #54)option key_backup_data_path means differently for command init and recover in sgx provide #55

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions providers/sgx/sgx-runner/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub fn init(
config::write_sealed_file(
config.sealed_consensus_key_path,
&sealed_key.sealed_key_data,
)
)?
.map_err(|e| format!("failed to write consensus key: {:?}", e))?;
let public_key =
ed25519_dalek::PublicKey::from_bytes(&sealed_key.sealed_key_data.seal_key_request.keyid)
Expand Down Expand Up @@ -198,7 +198,7 @@ pub fn recover(
Zeroizing::new(subtle_encoding::hex::encode(&*key_bytes))
};
let key_data = serde_json::from_str(
&fs::read_to_string(key_backup_data_path)
&fs::read_to_string(key_backup_data_path.join("consensus-key.backup"))
.map_err(|e| format!("failed to read backup data: {:?}", e))?,
)
.map_err(|e| format!("failed to parse backup data: {:?}", e))?;
Expand Down