@@ -29,6 +29,7 @@ use crate::MessageKind;
29
29
use crate :: MgsError ;
30
30
use crate :: MgsRequest ;
31
31
use crate :: MgsResponse ;
32
+ use crate :: MonorailError ;
32
33
use crate :: PowerState ;
33
34
use crate :: PowerStateTransition ;
34
35
use crate :: RotBootInfo ;
@@ -46,6 +47,8 @@ use crate::SpUpdatePrepare;
46
47
use crate :: StartupOptions ;
47
48
use crate :: SwitchDuration ;
48
49
use crate :: TlvPage ;
50
+ use crate :: UnlockChallenge ;
51
+ use crate :: UnlockResponse ;
49
52
use crate :: UpdateChunk ;
50
53
use crate :: UpdateId ;
51
54
use crate :: UpdateStatus ;
@@ -417,6 +420,15 @@ pub trait SpHandler {
417
420
fn start_host_flash_hash ( & mut self , slot : u16 ) -> Result < ( ) , SpError > ;
418
421
419
422
fn get_host_flash_hash ( & mut self , slot : u16 ) -> Result < [ u8 ; 32 ] , SpError > ;
423
+
424
+ /// Unlocks the tech port if the challenge and response are compatible
425
+ fn unlock (
426
+ & mut self ,
427
+ vid : Self :: VLanId ,
428
+ challenge : UnlockChallenge ,
429
+ response : UnlockResponse ,
430
+ time_sec : u32 ,
431
+ ) -> Result < ( ) , MonorailError > ;
420
432
}
421
433
422
434
/// Handle a single incoming message.
@@ -1457,6 +1469,16 @@ mod tests {
1457
1469
) -> Result < [ u8 ; 32 ] , SpError > {
1458
1470
unimplemented ! ( )
1459
1471
}
1472
+
1473
+ fn unlock (
1474
+ & mut self ,
1475
+ _vid : Self :: VLanId ,
1476
+ _challenge : UnlockChallenge ,
1477
+ _response : UnlockResponse ,
1478
+ _time_sec : u32 ,
1479
+ ) -> Result < ( ) , MonorailError > {
1480
+ unimplemented ! ( )
1481
+ }
1460
1482
}
1461
1483
1462
1484
#[ cfg( feature = "std" ) ]
0 commit comments