Skip to content

Commit

Permalink
enclave_build: fix argument parsing and image generation
Browse files Browse the repository at this point in the history
- fixed inconsistencies in argument names that make it impossible to generate a signed image
- fixed potential image corruption if the output image already exists by truncating it before writing to it
- bump version to 0.2.0
  • Loading branch information
sstone committed Nov 22, 2022
1 parent a80cda0 commit a5a62a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion enclave_build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "enclave_build"
version = "0.1.0"
version = "0.2.0"
authors = ["The AWS Nitro Enclaves Team <[email protected]>"]
edition = "2018"
rust-version = "1.58"
Expand Down
5 changes: 3 additions & 2 deletions enclave_build/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ fn main() {
let linuxkit_path = matches.value_of("linuxkit_path").unwrap();
let output = matches.value_of("output").unwrap();
let signing_certificate = matches
.value_of("signing_certificate")
.value_of("signing-certificate")
.map(|val| val.to_string());
let private_key = matches
.value_of("private_certificate")
.value_of("private-key")
.map(|val| val.to_string());
let img_name = matches.value_of("image_name").map(|val| val.to_string());
let img_version = matches.value_of("image_version").map(|val| val.to_string());
Expand All @@ -144,6 +144,7 @@ fn main() {
.read(true)
.write(true)
.create(true)
.truncate(true)
.open(output)
.expect("Failed to create output file");

Expand Down

0 comments on commit a5a62a3

Please sign in to comment.