-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add validation of data
and aad
values
#165
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I like how you're validating it implicitly when the SealedBuilder is initialized, this feels more reasonable than having a validate_inputs() method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine in terms of implementing the checks but as James said on #164, we should have specific error discriminants for these errors rather than everything being InvalidParameter (although the different error strings are an improvement)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is fine (assuming changes per comments on #164), but I'm thinking that we can dump EnclaveMemory
in favor of a bare function that does the same job for both Sized and Unsized types using core::mem::size_of_val()
275354d
to
296ff6f
Compare
15b47a1
to
9cc6746
Compare
Previously the `data` and `aad` values to the `mc-sgx-tservicer::SealedBuilder` were only checked by the SGX SDK. This resulted in a generic `InvalidParamter` error that had no context. Now the `data` and `aad` values are ensured to be valid when they are provided to the `SealedBuilder`.
296ff6f
to
b3f3571
Compare
9cc6746
to
c89b535
Compare
Graphite Merge Job Current status: ✅ Merged This pull request was successfully merged as part of a stack. This comment was auto-generated by Graphite. Job Reference: MYnB2IroAk46QVSy8SQp |
Previously the
data
andaad
values to themc-sgx-tservicer::SealedBuilder
were only checked by the SGX SDK.This resulted in a generic
InvalidParamter
error that had no context.Now the
data
andaad
values are ensured to be valid when they areprovided to the
SealedBuilder
.