-
Notifications
You must be signed in to change notification settings - Fork 22
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 certificate generation code to DeriveContext #376
Add certificate generation code to DeriveContext #376
Conversation
let mut exported_cdi_handle = [0; MAX_EXPORTED_CDI_SIZE]; | ||
env.crypto | ||
.rand_bytes(&mut exported_cdi_handle) | ||
.map_err(DpeErrorCode::Crypto)?; |
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.
Once refactored this will happen in the call to create_exported_dpe_cert
and return in CreateDpeCertResult
848c7bb
to
37d063b
Compare
37d063b
to
8b54c17
Compare
fdd83b8
to
d25ecbb
Compare
Will follow up in a separate PR with verification tests update. |
dpe/src/commands/derive_context.rs
Outdated
|
||
Ok(Response::DeriveContextExportedCdi(DeriveContextExportedCdiResp { | ||
handle: ContextHandle::new_invalid(), | ||
parent_handle: dpe.contexts[parent_idx].handle, |
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.
If export_cdi, then retains_parent
must be false. So I think the parent handle should be new_invalid
. We should see if we can share the logic from line 374 so it doesn't need to be duploicated.
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.
Moved the parent invalidation logic further up so it is shared with export-cdi
.
f69d748
to
47c5068
Compare
47c5068
to
ccb2db2
Compare
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.
Thanks!
27b8300
into
chipsalliance:feature/gh-issue-caliptra-sw-1807
This will return a self-signed certificate and a CDI for the key handle.