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

The v0.2.0 release is unusable from crates.io #30

Open
dreemkiller opened this issue Apr 20, 2022 · 0 comments
Open

The v0.2.0 release is unusable from crates.io #30

dreemkiller opened this issue Apr 20, 2022 · 0 comments

Comments

@dreemkiller
Copy link

dreemkiller commented Apr 20, 2022

As the project is currently structured, the v0.2.0 release appears to be unusable when pulling from crates.io

As the code is currently structured/written, the only way to reasonably read a random number is using the nsm_lib::nsm_get_random. However, the nsm_lib code is unreachable when pulling the dependency from crates.io as follows in a Cargo.toml file:

aws-nitro-enclaves-nsm-api = "0.2.1"

since the nsm_lib library is placed as a sub-crate within the aws-nitro-enclaves-nsm-api crate, and cargo does not appear to have a way to reference crates this way.

This means that users wanting to pull random numbers from NSM need to specify the dependency as pulling from a tag on github as follows in a Cargo.toml file:

nsm_lib = { git = "https://github.com/aws/aws-nitro-enclaves-nsm-api.git/", tag = "v0.2.0", package = "nsm-lib", optional = true }

which is fine, but the aws-nitro-enclaves-nsm-api has been published to crates.io, so it was apparently your intention that this be possible.

There is evidence that there is work in progress to add accessor functions in aws-nitro-enclave-nsm-api for the nsm-lib functions (perhaps preventing us from having to use unsafe), but this work appears to be incomplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant