@@ -317,139 +317,131 @@ impl AttestationReport {
317317 // of SPN fields for hash-stick algorithm).
318318 if Self :: chip_id_is_turin_like ( & stepper[ 0x1A0 ..0x1E0 ] ) ? {
319319 AttestationReport {
320- version : stepper. parse_bytes :: < _ , 0 > ( ) ?,
321- guest_svn : stepper. parse_bytes :: < _ , 0 > ( ) ?,
322- policy : stepper. parse_bytes :: < _ , 0 > ( ) ?,
323- family_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
324- image_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
325- vmpl : stepper. parse_bytes :: < _ , 0 > ( ) ?,
326- sig_algo : stepper. parse_bytes :: < _ , 0 > ( ) ?,
327- current_tcb : TcbVersion :: from_turin_bytes (
328- & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?,
329- ) ,
330- plat_info : stepper. parse_bytes :: < _ , 0 > ( ) ?,
331- key_info : stepper. parse_bytes :: < _ , 0 > ( ) ?,
332- report_data : stepper. parse_bytes :: < _ , 4 > ( ) ?,
333- measurement : stepper. parse_bytes :: < _ , 0 > ( ) ?,
334- host_data : stepper. parse_bytes :: < _ , 0 > ( ) ?,
335- id_key_digest : stepper. parse_bytes :: < _ , 0 > ( ) ?,
336- author_key_digest : stepper. parse_bytes :: < _ , 0 > ( ) ?,
337- report_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
338- report_id_ma : stepper. parse_bytes :: < _ , 0 > ( ) ?,
339- reported_tcb : TcbVersion :: from_turin_bytes (
340- & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?,
341- ) ,
320+ version : stepper. parse_bytes ( ) ?,
321+ guest_svn : stepper. parse_bytes ( ) ?,
322+ policy : stepper. parse_bytes ( ) ?,
323+ family_id : stepper. parse_bytes ( ) ?,
324+ image_id : stepper. parse_bytes ( ) ?,
325+ vmpl : stepper. parse_bytes ( ) ?,
326+ sig_algo : stepper. parse_bytes ( ) ?,
327+ current_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes ( ) ?) ,
328+ plat_info : stepper. parse_bytes ( ) ?,
329+ key_info : stepper. parse_bytes ( ) ?,
330+ report_data : stepper. skip_bytes :: < 4 > ( ) ?. parse_bytes ( ) ?,
331+ measurement : stepper. parse_bytes ( ) ?,
332+ host_data : stepper. parse_bytes ( ) ?,
333+ id_key_digest : stepper. parse_bytes ( ) ?,
334+ author_key_digest : stepper. parse_bytes ( ) ?,
335+ report_id : stepper. parse_bytes ( ) ?,
336+ report_id_ma : stepper. parse_bytes ( ) ?,
337+ reported_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes ( ) ?) ,
342338 cpuid_fam_id : None ,
343339 cpuid_mod_id : None ,
344340 cpuid_step : None ,
345- chip_id : stepper. parse_bytes :: < _ , 24 > ( ) ?,
346- committed_tcb : TcbVersion :: from_turin_bytes (
347- & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?,
348- ) ,
349- current : stepper. parse_bytes :: < _ , 0 > ( ) ?,
350- committed : stepper. parse_bytes :: < _ , 1 > ( ) ?,
341+ chip_id : stepper. skip_bytes :: < 24 > ( ) ?. parse_bytes ( ) ?,
342+ committed_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes ( ) ?) ,
343+ current : stepper. parse_bytes ( ) ?,
344+ committed : stepper. skip_bytes :: < 1 > ( ) ?. parse_bytes ( ) ?,
351345 launch_tcb : TcbVersion :: from_turin_bytes (
352- & stepper. parse_bytes :: < [ u8 ; 8 ] , 1 > ( ) ?,
346+ & stepper. skip_bytes :: < 1 > ( ) ? . parse_bytes ( ) ?,
353347 ) ,
354- signature : stepper. parse_bytes :: < _ , 168 > ( ) ?,
348+ signature : stepper. skip_bytes :: < 168 > ( ) ? . parse_bytes ( ) ?,
355349 }
356350 } else {
357351 AttestationReport {
358- version : stepper. parse_bytes :: < _ , 0 > ( ) ?,
359- guest_svn : stepper. parse_bytes :: < _ , 0 > ( ) ?,
360- policy : stepper. parse_bytes :: < _ , 0 > ( ) ?,
361- family_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
362- image_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
363- vmpl : stepper. parse_bytes :: < _ , 0 > ( ) ?,
364- sig_algo : stepper. parse_bytes :: < _ , 0 > ( ) ?,
365- current_tcb : TcbVersion :: from_legacy_bytes (
366- & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?,
367- ) ,
368- plat_info : stepper. parse_bytes :: < _ , 0 > ( ) ?,
369- key_info : stepper. parse_bytes :: < _ , 0 > ( ) ?,
370- report_data : stepper. parse_bytes :: < _ , 4 > ( ) ?,
371- measurement : stepper. parse_bytes :: < _ , 0 > ( ) ?,
372- host_data : stepper. parse_bytes :: < _ , 0 > ( ) ?,
373- id_key_digest : stepper. parse_bytes :: < _ , 0 > ( ) ?,
374- author_key_digest : stepper. parse_bytes :: < _ , 0 > ( ) ?,
375- report_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
376- report_id_ma : stepper. parse_bytes :: < _ , 0 > ( ) ?,
377- reported_tcb : TcbVersion :: from_legacy_bytes (
378- & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?,
379- ) ,
352+ version : stepper. parse_bytes ( ) ?,
353+ guest_svn : stepper. parse_bytes ( ) ?,
354+ policy : stepper. parse_bytes ( ) ?,
355+ family_id : stepper. parse_bytes ( ) ?,
356+ image_id : stepper. parse_bytes ( ) ?,
357+ vmpl : stepper. parse_bytes ( ) ?,
358+ sig_algo : stepper. parse_bytes ( ) ?,
359+ current_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes ( ) ?) ,
360+ plat_info : stepper. parse_bytes ( ) ?,
361+ key_info : stepper. parse_bytes ( ) ?,
362+ report_data : stepper. skip_bytes :: < 4 > ( ) ?. parse_bytes ( ) ?,
363+ measurement : stepper. parse_bytes ( ) ?,
364+ host_data : stepper. parse_bytes ( ) ?,
365+ id_key_digest : stepper. parse_bytes ( ) ?,
366+ author_key_digest : stepper. parse_bytes ( ) ?,
367+ report_id : stepper. parse_bytes ( ) ?,
368+ report_id_ma : stepper. parse_bytes ( ) ?,
369+ reported_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes ( ) ?) ,
380370 cpuid_fam_id : None ,
381371 cpuid_mod_id : None ,
382372 cpuid_step : None ,
383- chip_id : stepper. parse_bytes :: < _ , 24 > ( ) ?,
384- committed_tcb : TcbVersion :: from_legacy_bytes (
385- & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?,
386- ) ,
387- current : stepper. parse_bytes :: < _ , 0 > ( ) ?,
388- committed : stepper. parse_bytes :: < _ , 1 > ( ) ?,
373+ chip_id : stepper. skip_bytes :: < 24 > ( ) ?. parse_bytes ( ) ?,
374+ committed_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes ( ) ?) ,
375+ current : stepper. parse_bytes ( ) ?,
376+ committed : stepper. skip_bytes :: < 1 > ( ) ?. parse_bytes ( ) ?,
389377 launch_tcb : TcbVersion :: from_legacy_bytes (
390- & stepper. parse_bytes :: < [ u8 ; 8 ] , 1 > ( ) ?,
378+ & stepper. skip_bytes :: < 1 > ( ) ? . parse_bytes ( ) ?,
391379 ) ,
392- signature : stepper. parse_bytes :: < _ , 168 > ( ) ?,
380+ signature : stepper. skip_bytes :: < 168 > ( ) ? . parse_bytes ( ) ?,
393381 }
394382 }
395383 }
396384 ReportVariant :: V3PreTurin => AttestationReport {
397- version : stepper. parse_bytes :: < _ , 0 > ( ) ?,
398- guest_svn : stepper. parse_bytes :: < _ , 0 > ( ) ?,
399- policy : stepper. parse_bytes :: < _ , 0 > ( ) ?,
400- family_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
401- image_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
402- vmpl : stepper. parse_bytes :: < _ , 0 > ( ) ?,
403- sig_algo : stepper. parse_bytes :: < _ , 0 > ( ) ?,
404- current_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?) ,
405- plat_info : stepper. parse_bytes :: < _ , 0 > ( ) ?,
406- key_info : stepper. parse_bytes :: < _ , 0 > ( ) ?,
407- report_data : stepper. parse_bytes :: < _ , 4 > ( ) ?,
408- measurement : stepper. parse_bytes :: < _ , 0 > ( ) ?,
409- host_data : stepper. parse_bytes :: < _ , 0 > ( ) ?,
410- id_key_digest : stepper. parse_bytes :: < _ , 0 > ( ) ?,
411- author_key_digest : stepper. parse_bytes :: < _ , 0 > ( ) ?,
412- report_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
413- report_id_ma : stepper. parse_bytes :: < _ , 0 > ( ) ?,
414- reported_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?) ,
415- cpuid_fam_id : Some ( stepper. parse_bytes :: < _ , 0 > ( ) ?) ,
416- cpuid_mod_id : Some ( stepper. parse_bytes :: < _ , 0 > ( ) ?) ,
417- cpuid_step : Some ( stepper. parse_bytes :: < _ , 0 > ( ) ?) ,
418- chip_id : stepper. parse_bytes :: < _ , 21 > ( ) ?,
419- committed_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?) ,
420- current : stepper. parse_bytes :: < _ , 0 > ( ) ?,
421- committed : stepper. parse_bytes :: < _ , 1 > ( ) ?,
422- launch_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes :: < [ u8 ; 8 ] , 1 > ( ) ?) ,
423- signature : stepper. parse_bytes :: < _ , 168 > ( ) ?,
385+ version : stepper. parse_bytes ( ) ?,
386+ guest_svn : stepper. parse_bytes ( ) ?,
387+ policy : stepper. parse_bytes ( ) ?,
388+ family_id : stepper. parse_bytes ( ) ?,
389+ image_id : stepper. parse_bytes ( ) ?,
390+ vmpl : stepper. parse_bytes ( ) ?,
391+ sig_algo : stepper. parse_bytes ( ) ?,
392+ current_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes ( ) ?) ,
393+ plat_info : stepper. parse_bytes ( ) ?,
394+ key_info : stepper. parse_bytes ( ) ?,
395+ report_data : stepper. skip_bytes :: < 4 > ( ) ?. parse_bytes ( ) ?,
396+ measurement : stepper. parse_bytes ( ) ?,
397+ host_data : stepper. parse_bytes ( ) ?,
398+ id_key_digest : stepper. parse_bytes ( ) ?,
399+ author_key_digest : stepper. parse_bytes ( ) ?,
400+ report_id : stepper. parse_bytes ( ) ?,
401+ report_id_ma : stepper. parse_bytes ( ) ?,
402+ reported_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes ( ) ?) ,
403+ cpuid_fam_id : Some ( stepper. parse_bytes ( ) ?) ,
404+ cpuid_mod_id : Some ( stepper. parse_bytes ( ) ?) ,
405+ cpuid_step : Some ( stepper. parse_bytes ( ) ?) ,
406+ chip_id : stepper. skip_bytes :: < 21 > ( ) ?. parse_bytes ( ) ?,
407+ committed_tcb : TcbVersion :: from_legacy_bytes ( & stepper. parse_bytes ( ) ?) ,
408+ current : stepper. parse_bytes ( ) ?,
409+ committed : stepper. skip_bytes :: < 1 > ( ) ?. parse_bytes ( ) ?,
410+ launch_tcb : TcbVersion :: from_legacy_bytes (
411+ & stepper. skip_bytes :: < 1 > ( ) ?. parse_bytes ( ) ?,
412+ ) ,
413+ signature : stepper. skip_bytes :: < 168 > ( ) ?. parse_bytes ( ) ?,
424414 } ,
425415 ReportVariant :: V3Turin => AttestationReport {
426- version : stepper. parse_bytes :: < _ , 0 > ( ) ?,
427- guest_svn : stepper. parse_bytes :: < _ , 0 > ( ) ?,
428- policy : stepper. parse_bytes :: < _ , 0 > ( ) ?,
429- family_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
430- image_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
431- vmpl : stepper. parse_bytes :: < _ , 0 > ( ) ?,
432- sig_algo : stepper. parse_bytes :: < _ , 0 > ( ) ?,
433- current_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?) ,
434- plat_info : stepper. parse_bytes :: < _ , 0 > ( ) ?,
435- key_info : stepper. parse_bytes :: < _ , 0 > ( ) ?,
436- report_data : stepper. parse_bytes :: < _ , 4 > ( ) ?,
437- measurement : stepper. parse_bytes :: < _ , 0 > ( ) ?,
438- host_data : stepper. parse_bytes :: < _ , 0 > ( ) ?,
439- id_key_digest : stepper. parse_bytes :: < _ , 0 > ( ) ?,
440- author_key_digest : stepper. parse_bytes :: < _ , 0 > ( ) ?,
441- report_id : stepper. parse_bytes :: < _ , 0 > ( ) ?,
442- report_id_ma : stepper. parse_bytes :: < _ , 0 > ( ) ?,
443- reported_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?) ,
444- cpuid_fam_id : Some ( stepper. parse_bytes :: < _ , 0 > ( ) ?) ,
445- cpuid_mod_id : Some ( stepper. parse_bytes :: < _ , 0 > ( ) ?) ,
446- cpuid_step : Some ( stepper. parse_bytes :: < _ , 0 > ( ) ?) ,
447- chip_id : stepper. parse_bytes :: < _ , 21 > ( ) ?,
448- committed_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes :: < [ u8 ; 8 ] , 0 > ( ) ?) ,
449- current : stepper. parse_bytes :: < _ , 0 > ( ) ?,
450- committed : stepper. parse_bytes :: < _ , 1 > ( ) ?,
451- launch_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes :: < [ u8 ; 8 ] , 1 > ( ) ?) ,
452- signature : stepper. parse_bytes :: < _ , 168 > ( ) ?,
416+ version : stepper. parse_bytes ( ) ?,
417+ guest_svn : stepper. parse_bytes ( ) ?,
418+ policy : stepper. parse_bytes ( ) ?,
419+ family_id : stepper. parse_bytes ( ) ?,
420+ image_id : stepper. parse_bytes ( ) ?,
421+ vmpl : stepper. parse_bytes ( ) ?,
422+ sig_algo : stepper. parse_bytes ( ) ?,
423+ current_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes ( ) ?) ,
424+ plat_info : stepper. parse_bytes ( ) ?,
425+ key_info : stepper. parse_bytes ( ) ?,
426+ report_data : stepper. skip_bytes :: < 4 > ( ) ?. parse_bytes ( ) ?,
427+ measurement : stepper. parse_bytes ( ) ?,
428+ host_data : stepper. parse_bytes ( ) ?,
429+ id_key_digest : stepper. parse_bytes ( ) ?,
430+ author_key_digest : stepper. parse_bytes ( ) ?,
431+ report_id : stepper. parse_bytes ( ) ?,
432+ report_id_ma : stepper. parse_bytes ( ) ?,
433+ reported_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes ( ) ?) ,
434+ cpuid_fam_id : Some ( stepper. parse_bytes ( ) ?) ,
435+ cpuid_mod_id : Some ( stepper. parse_bytes ( ) ?) ,
436+ cpuid_step : Some ( stepper. parse_bytes ( ) ?) ,
437+ chip_id : stepper. skip_bytes :: < 21 > ( ) ?. parse_bytes ( ) ?,
438+ committed_tcb : TcbVersion :: from_turin_bytes ( & stepper. parse_bytes ( ) ?) ,
439+ current : stepper. parse_bytes ( ) ?,
440+ committed : stepper. skip_bytes :: < 1 > ( ) ?. parse_bytes ( ) ?,
441+ launch_tcb : TcbVersion :: from_turin_bytes (
442+ & stepper. skip_bytes :: < 1 > ( ) ?. parse_bytes ( ) ?,
443+ ) ,
444+ signature : stepper. skip_bytes :: < 168 > ( ) ?. parse_bytes ( ) ?,
453445 } ,
454446 } )
455447 }
@@ -466,41 +458,41 @@ impl AttestationReport {
466458 } ;
467459
468460 // Write version (common to all variants)
469- handle. write_bytes :: < _ , 0 > ( self . version ) ?;
470- handle. write_bytes :: < _ , 0 > ( self . guest_svn ) ?;
471- handle. write_bytes :: < _ , 0 > ( self . policy ) ?;
472- handle. write_bytes :: < _ , 0 > ( self . family_id ) ?;
473- handle. write_bytes :: < _ , 0 > ( self . image_id ) ?;
474- handle. write_bytes :: < _ , 0 > ( self . vmpl ) ?;
475- handle. write_bytes :: < _ , 0 > ( self . sig_algo ) ?;
461+ handle. write_bytes ( self . version ) ?;
462+ handle. write_bytes ( self . guest_svn ) ?;
463+ handle. write_bytes ( self . policy ) ?;
464+ handle. write_bytes ( self . family_id ) ?;
465+ handle. write_bytes ( self . image_id ) ?;
466+ handle. write_bytes ( self . vmpl ) ?;
467+ handle. write_bytes ( self . sig_algo ) ?;
476468
477469 // Write TCB based on variant
478470 match variant {
479471 ReportVariant :: V3Turin => {
480- handle. write_bytes :: < _ , 0 > ( self . current_tcb . to_turin_bytes ( ) ) ?;
472+ handle. write_bytes ( self . current_tcb . to_turin_bytes ( ) ) ?;
481473 }
482474 _ => {
483- handle. write_bytes :: < _ , 0 > ( self . current_tcb . to_legacy_bytes ( ) ) ?;
475+ handle. write_bytes ( self . current_tcb . to_legacy_bytes ( ) ) ?;
484476 }
485477 }
486478
487- handle. write_bytes :: < _ , 0 > ( self . plat_info ) ?;
488- handle. write_bytes :: < _ , 0 > ( self . key_info ) ?;
489- handle. write_bytes :: < _ , 4 > ( self . report_data ) ?;
490- handle. write_bytes :: < _ , 0 > ( self . measurement ) ?;
491- handle. write_bytes :: < _ , 0 > ( self . host_data ) ?;
492- handle. write_bytes :: < _ , 0 > ( self . id_key_digest ) ?;
493- handle. write_bytes :: < _ , 0 > ( self . author_key_digest ) ?;
494- handle. write_bytes :: < _ , 0 > ( self . report_id ) ?;
495- handle. write_bytes :: < _ , 0 > ( self . report_id_ma ) ?;
479+ handle. write_bytes ( self . plat_info ) ?;
480+ handle. write_bytes ( self . key_info ) ?;
481+ handle. skip_bytes :: < 4 > ( ) ? . write_bytes ( self . report_data ) ?;
482+ handle. write_bytes ( self . measurement ) ?;
483+ handle. write_bytes ( self . host_data ) ?;
484+ handle. write_bytes ( self . id_key_digest ) ?;
485+ handle. write_bytes ( self . author_key_digest ) ?;
486+ handle. write_bytes ( self . report_id ) ?;
487+ handle. write_bytes ( self . report_id_ma ) ?;
496488
497489 // Write reported TCB based on variant
498490 match variant {
499491 ReportVariant :: V3Turin => {
500- handle. write_bytes :: < _ , 0 > ( self . reported_tcb . to_turin_bytes ( ) ) ?;
492+ handle. write_bytes ( self . reported_tcb . to_turin_bytes ( ) ) ?;
501493 }
502494 _ => {
503- handle. write_bytes :: < _ , 0 > ( self . reported_tcb . to_legacy_bytes ( ) ) ?;
495+ handle. write_bytes ( self . reported_tcb . to_legacy_bytes ( ) ) ?;
504496 }
505497 }
506498
@@ -511,47 +503,51 @@ impl AttestationReport {
511503 }
512504 _ => {
513505 // Write CPUID fields for V3 and V4
514- handle. write_bytes :: < _ , 0 > ( self . cpuid_fam_id . unwrap_or ( 0 ) ) ?;
515- handle. write_bytes :: < _ , 0 > ( self . cpuid_mod_id . unwrap_or ( 0 ) ) ?;
516- handle. write_bytes :: < _ , 0 > ( self . cpuid_step . unwrap_or ( 0 ) ) ?;
506+ handle. write_bytes ( self . cpuid_fam_id . unwrap_or ( 0 ) ) ?;
507+ handle. write_bytes ( self . cpuid_mod_id . unwrap_or ( 0 ) ) ?;
508+ handle. write_bytes ( self . cpuid_step . unwrap_or ( 0 ) ) ?;
517509 }
518510 }
519511
520512 // Write chip_id with appropriate padding
521513 match variant {
522514 ReportVariant :: V2 => {
523- handle. write_bytes :: < _ , 24 > ( self . chip_id ) ?;
515+ handle. skip_bytes :: < 24 > ( ) ? . write_bytes ( self . chip_id ) ?;
524516 }
525517 _ => {
526- handle. write_bytes :: < _ , 21 > ( self . chip_id ) ?;
518+ handle. skip_bytes :: < 21 > ( ) ? . write_bytes ( self . chip_id ) ?;
527519 }
528520 }
529521
530522 // Write committed TCB based on variant
531523 match variant {
532524 ReportVariant :: V3Turin => {
533- handle. write_bytes :: < _ , 0 > ( self . committed_tcb . to_turin_bytes ( ) ) ?;
525+ handle. write_bytes ( self . committed_tcb . to_turin_bytes ( ) ) ?;
534526 }
535527 _ => {
536- handle. write_bytes :: < _ , 0 > ( self . committed_tcb . to_legacy_bytes ( ) ) ?;
528+ handle. write_bytes ( self . committed_tcb . to_legacy_bytes ( ) ) ?;
537529 }
538530 }
539531
540- handle. write_bytes :: < _ , 0 > ( self . current ) ?;
541- handle. write_bytes :: < _ , 1 > ( self . committed ) ?;
532+ handle. write_bytes ( self . current ) ?;
533+ handle. skip_bytes :: < 1 > ( ) ? . write_bytes ( self . committed ) ?;
542534
543535 // Write launch TCB based on variant
544536 match variant {
545537 ReportVariant :: V3Turin => {
546- handle. write_bytes :: < _ , 1 > ( self . launch_tcb . to_turin_bytes ( ) ) ?;
538+ handle
539+ . skip_bytes :: < 1 > ( ) ?
540+ . write_bytes ( self . launch_tcb . to_turin_bytes ( ) ) ?;
547541 }
548542 _ => {
549- handle. write_bytes :: < _ , 1 > ( self . launch_tcb . to_legacy_bytes ( ) ) ?;
543+ handle
544+ . skip_bytes :: < 1 > ( ) ?
545+ . write_bytes ( self . launch_tcb . to_legacy_bytes ( ) ) ?;
550546 }
551547 }
552548
553549 // Write signature (common to all variants)
554- handle. write_bytes :: < _ , 168 > ( self . signature ) ?;
550+ handle. skip_bytes :: < 168 > ( ) ? . write_bytes ( self . signature ) ?;
555551
556552 Ok ( ( ) )
557553 }
0 commit comments