File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
keylime-push-model-agent/src Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ pub enum State {
1818 Negotiating ( ContextInfo ) ,
1919 Attesting ( ContextInfo , ResponseInformation ) ,
2020 Complete ,
21+ RegistrationFailed ( anyhow:: Error ) ,
2122 Failed ( anyhow:: Error ) ,
2223}
2324
@@ -74,6 +75,11 @@ impl<'a> StateMachine<'a> {
7475 self . state = State :: Complete ;
7576 break ;
7677 }
78+ State :: RegistrationFailed ( e) => {
79+ error ! ( "Registration failed: {e:?}" ) ;
80+ debug ! ( "Resetting state to Unregistered and retrying" ) ;
81+ self . state = State :: Unregistered ;
82+ }
7783 State :: Failed ( e) => {
7884 error ! ( "Attestation failed: {e:?}" ) ;
7985 self . state = State :: Failed ( e) ;
@@ -100,8 +106,9 @@ impl<'a> StateMachine<'a> {
100106 }
101107 }
102108 Err ( e) => {
103- self . state =
104- State :: Failed ( anyhow ! ( "Registration failed: {e:?}" ) ) ;
109+ self . state = State :: RegistrationFailed ( anyhow ! (
110+ "Registration failed: {e:?}"
111+ ) ) ;
105112 }
106113 }
107114 }
You can’t perform that action at this time.
0 commit comments