Skip to content
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

Attestation-Service: replacing anyhow with explicit error types #231

Closed
mkulke opened this issue Nov 21, 2023 · 1 comment · Fixed by #327 or #330 · May be fixed by #326 or #328
Closed

Attestation-Service: replacing anyhow with explicit error types #231

mkulke opened this issue Nov 21, 2023 · 1 comment · Fixed by #327 or #330 · May be fixed by #326 or #328
Assignees

Comments

@mkulke
Copy link
Contributor

mkulke commented Nov 21, 2023

In a library crate it's better to specify expected error types explicitly rather than relying on generic anyhow errors. thiserror is a crate by the same author, which allows doing this in a convenient fashion.

mkulke added a commit to mkulke/trustee that referenced this issue Nov 22, 2023
Similar to confidential-containers#230 the verify function here is actually not checking the
result of the verification.

There is a fail-test for the vcek signature verification, but it fails
at parsing the DER cert. We should get rid of anyhow here and use proper
error types (confidential-containers#231) which we can then assert in such tests.

- Fixed the verification logic
- Added test-case for toggled ark-ask
- Fixed fail-test to produce a legit VCEK

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
@mkulke mkulke changed the title Attestation-Service: consider replacing anyhow Attestation-Service: replacing anyhow with explicit error types Nov 22, 2023
mkulke added a commit to mkulke/trustee that referenced this issue Nov 23, 2023
Similar to confidential-containers#230 the verify function here is actually not checking the
result of the verification.

There is a fail-test for the vcek signature verification, but it fails
at parsing the DER cert. We should get rid of anyhow here and use proper
error types (confidential-containers#231) which we can then assert in such tests.

- Fixed the verification logic
- Added test-case for toggled ark-ask
- Fixed fail-test to produce a legit VCEK

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
mkulke added a commit to mkulke/trustee that referenced this issue Nov 23, 2023
Similar to confidential-containers#230 the verify function here is actually not checking the result
of the verification.

There is a fail-test for the vcek signature verification, but it fails at
parsing the DER cert. We should get rid of anyhow here and use proper error
types (confidential-containers#231) which we can then assert in such tests.

- Fixed the verification logic
- Added test-case for toggled ark-ask
- Fixed fail-test to produce a legit VCEK

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
Xynnn007 pushed a commit that referenced this issue Nov 23, 2023
Similar to #230 the verify function here is actually not checking the result
of the verification.

There is a fail-test for the vcek signature verification, but it fails at
parsing the DER cert. We should get rid of anyhow here and use proper error
types (#231) which we can then assert in such tests.

- Fixed the verification logic
- Added test-case for toggled ark-ask
- Fixed fail-test to produce a legit VCEK

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
@kartikjoshi21
Copy link
Contributor

@Xynnn007 please assign this one to me. Thanks

kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 15, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 15, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 15, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 15, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 22, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 22, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 26, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 26, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 27, 2024
Replace anyhow error crate with thiserror crate
Fixes: confidential-containers#231

Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Feb 29, 2024
Replace anyhow error crate with thiserror crate
Fixes: confidential-containers#231

Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 11, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 11, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 12, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 12, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 12, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 19, 2024
Replace anyhow error crate with thiserror crate
Fixes: confidential-containers#231

Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 19, 2024
Replace anyhow error crate with thiserror crate
Fixes: confidential-containers#231

Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 19, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 19, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 19, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 20, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
sameo pushed a commit that referenced this issue Mar 24, 2024
Fixes: #231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 26, 2024
Replace anyhow error crate with thiserror crate
Fixes: confidential-containers#231

Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 26, 2024
Replace anyhow error crate with thiserror crate
Fixes: confidential-containers#231

Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
kartikjoshi21 added a commit to kartikjoshi21/kbs that referenced this issue Mar 26, 2024
Fixes: confidential-containers#231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
jialez0 pushed a commit that referenced this issue Apr 10, 2024
Fixes: #231
Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
jialez0 pushed a commit that referenced this issue Apr 10, 2024
Replace anyhow error crate with thiserror crate
Fixes: #231

Signed-off-by: Kartik Joshi <kartikjoshi@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment