Skip to content

Commit

Permalink
Exported CDI handle should be 32 bits not 32 bytes. (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
clundin25 authored Jan 15, 2025
1 parent ce993a6 commit 0adad36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions dpe/src/commands/derive_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ impl CommandExecution for DeriveContextCmd {
|| (!dpe.support.internal_dice() && self.uses_internal_dice_input())
|| (!dpe.support.retain_parent_context() && self.retains_parent())
|| (!dpe.support.x509() && self.allows_x509())
|| (!dpe.support.cdi_export()
&& (self.creates_certificate() || self.exports_cdi()))
|| (!dpe.support.cdi_export() && (self.creates_certificate() || self.exports_cdi()))
|| (!dpe.support.recursive() && self.is_recursive())
{
return Err(DpeErrorCode::ArgumentNotSupported);
Expand Down
2 changes: 1 addition & 1 deletion dpe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub mod x509;

use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};

const MAX_EXPORTED_CDI_SIZE: usize = 256;
const MAX_EXPORTED_CDI_SIZE: usize = 32;

// Max cert size returned by CertifyKey
const MAX_CERT_SIZE: usize = 6144;
Expand Down

0 comments on commit 0adad36

Please sign in to comment.