aws-nitro-enclaves-cli icon indicating copy to clipboard operation
aws-nitro-enclaves-cli copied to clipboard

enclave_build: fix argument parsing and image generation

Open sstone opened this issue 2 years ago • 5 comments
trafficstars

Description of changes:

  • 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

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

sstone avatar Nov 22 '22 14:11 sstone

Checked the logs: Makefile:221: recipe for target 'nitro-format' failed Make sure to run cargo-fmt --all before commiting.

raulmldv avatar Nov 28 '22 16:11 raulmldv

Checked the logs: Makefile:221: recipe for target 'nitro-format' failed Make sure to run cargo-fmt --all before commiting.

done in https://github.com/aws/aws-nitro-enclaves-cli/pull/424/commits/dc6467971e9a9315a0ec64986b67be723567f741

sstone avatar Nov 29 '22 08:11 sstone

Currently failing on license check make nitro-about. Opened a PR to update our license file. After we merge it, you should rebase.

raulmldv avatar Nov 29 '22 09:11 raulmldv

Can you describe a bit more the issue that this patch is fixing? It seems to make the commandline arguments inconsistent, since they follow snake_case rather than kebab-case in enclave_build crate. I think they would all need to be updated to look the same.

petreeftime avatar Jan 17 '23 08:01 petreeftime

Can you describe a bit more the issue that this patch is fixing? It seems to make the commandline arguments inconsistent, since they follow snake_case rather than kebab-case in enclave_build crate. I think they would all need to be updated to look the same.

The issue here is that it is not possible to create a signed image with enclave_build because the private key parameter is not parsed at all (instead the code reuses private_certificate which is imho a bug). I used private-key and not private_key because that's how the command line option is defined as the beginning of main.rs.

sstone avatar Jan 30 '23 09:01 sstone