-
Notifications
You must be signed in to change notification settings - Fork 115
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
runtime: Stop using webpki to verify the IAS cert chain #4021
Conversation
d118031
to
18bf728
Compare
Codecov Report
@@ Coverage Diff @@
## master #4021 +/- ##
==========================================
+ Coverage 66.78% 67.01% +0.22%
==========================================
Files 391 410 +19
Lines 38138 42183 +4045
==========================================
+ Hits 25472 28270 +2798
- Misses 9017 9928 +911
- Partials 3649 3985 +336
Continue to review full report at Codecov.
|
18bf728
to
0af5334
Compare
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.
Only some minor nits, otherwise I think this looks good! 🎉
let anchor = match parse_x509_certificate(&cert_ders[1]) { | ||
Ok((_, cert)) => cert, | ||
Err(_) => return Err(AVRError::MalformedCertificateDER.into()), | ||
}; |
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.
let anchor = match parse_x509_certificate(&cert_ders[1]) { | |
Ok((_, cert)) => cert, | |
Err(_) => return Err(AVRError::MalformedCertificateDER.into()), | |
}; | |
let (_, anchor) = parse_x509_certificate(&cert_ders[1]) | |
.map_err(|_| AVRError::MalformedCertificateDER.into())?; |
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.
error[E0282]: type annotations needed
--> runtime/src/common/sgx/avr.rs:397:10
|
397 | .map_err(|_| AVRError::MalformedCertificateDER.into())?;
| ^^^^^^^ ---------------------------------------- this method call resolves to `T`
| |
| cannot infer type for type parameter `F` declared on the associated function `map_err`
0af5334
to
8052db3
Compare
8052db3
to
e42dd0f
Compare
It's German for "The Ring The".
This removes the webpki (and consequently) ring dependency by switching to manually verifying the IAS AVR certificate chain, and AVR signature. It makes a number of assumptions about how IAS does things (that are part of the API specification), so it is probably ok, though if Intel ever decides to change this, we will be rather sad.
The unfortunate thing about this is that I personally like ring/webpki as far as libraries go for the most part, but, having to carry around a fork just to get SGX support due to a trivial patch not being merged is not worth the hassle.
Fixes #2683