Skip to content

Commit a5a62a3

Browse files
committed
enclave_build: fix argument parsing and image generation
- 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
1 parent a80cda0 commit a5a62a3

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enclave_build/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "enclave_build"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
authors = ["The AWS Nitro Enclaves Team <[email protected]>"]
55
edition = "2018"
66
rust-version = "1.58"

enclave_build/src/main.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ fn main() {
131131
let linuxkit_path = matches.value_of("linuxkit_path").unwrap();
132132
let output = matches.value_of("output").unwrap();
133133
let signing_certificate = matches
134-
.value_of("signing_certificate")
134+
.value_of("signing-certificate")
135135
.map(|val| val.to_string());
136136
let private_key = matches
137-
.value_of("private_certificate")
137+
.value_of("private-key")
138138
.map(|val| val.to_string());
139139
let img_name = matches.value_of("image_name").map(|val| val.to_string());
140140
let img_version = matches.value_of("image_version").map(|val| val.to_string());
@@ -144,6 +144,7 @@ fn main() {
144144
.read(true)
145145
.write(true)
146146
.create(true)
147+
.truncate(true)
147148
.open(output)
148149
.expect("Failed to create output file");
149150

0 commit comments

Comments
 (0)