-
Notifications
You must be signed in to change notification settings - Fork 40
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
[Shamir port] Implement greeting procedure #8995
base: master
Are you sure you want to change the base?
Conversation
08dde62
to
d8d9e29
Compare
d97b906
to
4c9ff67
Compare
@@ -64,6 +64,9 @@ pub async fn main(args: Args) -> anyhow::Result<()> { | |||
let ctx = step4_device(ctx).await?; | |||
save_device(ctx, save_mode).await | |||
} | |||
UserOrDeviceClaimInitialCtx::ShamirRecovery(_) => { | |||
panic!("Shamir recovery invitation is not supported") |
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.
Return an error instead of panicing
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.
Yes, it's part of the todo list
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.
I mark the PR as a draft then
if cfg!(test) | ||
&& recovery_device |
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 cfg!(test) | |
&& recovery_device | |
#[cfg!(test)] | |
if recovery_device |
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.
This suggestion would complain about recovery_device
being mut
}; | ||
|
||
#[parsec_test(testbed = "shamir", with_server)] | ||
async fn shamir(tmp_path: TmpPath, env: &TestbedEnv) { |
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.
This function is long, I would split it using sub-function
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.
I don't really the point in splitting a single test scenario into subfunction.
There could be multiple smaller tests but I like to have at least one test for testing the full scenario. My plan is to add more smaller tests around it for edge cases.
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.
Having sub-function simplify reading the test since you wont need to read its implementation first
do_a();
do_b();
check_c();
) -> Result<ShamirRecoveryShareData, CertifListShamirRecoveryError> { | ||
ops.store | ||
.for_read(|store| async move { | ||
// TODO: check that the shamir is actually recoverable |
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.
Meaning that enough recipient are still here / not revoked ?
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.
Update rfc accordingly
Close #8841
TODO: