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

dcap all sgx statuses #225

Merged
merged 9 commits into from
Sep 13, 2023
Merged

dcap all sgx statuses #225

merged 9 commits into from
Sep 13, 2023

Conversation

brenzi
Copy link
Contributor

@brenzi brenzi commented Sep 13, 2023

closes #217

added one unit test to check outdated status. we could certainly be more thorough with unit testing all possible combinations of tcb info with various quotes. But I guess for now this does test the new feature minimally

Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor things, but looks good to me in general.

Comment on lines +552 to +554
#[cfg(test)]
println!("certificate chain is invalid: {:?}", e);
Error::CertificateChainIsInvalid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to go with the approach you chose in the last pr and simply make this trace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't make it work with cargo test -- --nocapture. that's why I used println specifically here, to see the inner error which we swallow otherwise

Copy link
Contributor

@clangenb clangenb Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to initialize the (env) logger in each test to make this work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

teerex/sgx-verify/src/lib.rs Show resolved Hide resolved
teerex/sgx-verify/src/tests.rs Outdated Show resolved Hide resolved
primitives/teerex/src/lib.rs Show resolved Hide resolved
teerex/sgx-verify/src/collateral.rs Show resolved Hide resolved
primitives/teerex/src/lib.rs Show resolved Hide resolved
teerex/src/lib.rs Show resolved Hide resolved
@brenzi
Copy link
Contributor Author

brenzi commented Sep 13, 2023

@clangenb if you can live with my responses, please approve and resolve the comments. or insist ;-)

Copy link
Contributor

@clangenb clangenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there would be a solution to the logger issue, but I can live with it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DCAP shouldn't translate all valid statuses to SgxStatus::OK
2 participants