-
Notifications
You must be signed in to change notification settings - Fork 3
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
Should we mark evidence extension as critical? #9
Comments
I second what @KB5201314 wrote. The mbedtls library used by Gramine also has the limitation of "fail on unrecognized critical cert extension": https://github.com/Mbed-TLS/mbedtls/blob/ab1f3c153a90d6943c174613b715d19dfddfc83a/library/x509_crt.c#L847-L851 The rationale for this can be read here: https://github.com/Mbed-TLS/mbedtls/blob/development/docs/3.0-migration-guide.md#remove-the-config-option-mbedtls_x509_allow_unsupported_critical_extension |
My thoughts are:
|
Agree that if TLS libraries (like openssl or mbedtls) do not support extracting critical extensions, then we will have to mark the quote extension to non-critical for now. But semantically this extension should be critical, a verifier that can't process the quote should fail. For reference, openenclave implements RA-TLS on both openssl and mbedtls. As implemented in |
I didn't look deeply how they are implemented in OE, but in general yes -- OpenSSL and mbedTLS first call their own "parse and verify" logic on the certificate, and only afterwards they call custom verification callbacks. Well, it should be easy to check how OE behaves on unknown critical extensions. Maybe one of the OE devs can do such an experiment? |
@dimakuv Agree with your assessment. Let's put a note in the design document that the criticality flag of this extension will be cleared. |
Mark evidence extensions as non-critical, since major TLS libraries (such as openssl or mbedtls) do not support extracting critical extensions. See: CCC-Attestation/interoperable-ra-tls#9 Signed-off-by: Kun Lai <[email protected]>
Mark evidence extensions as non-critical, since many TLS libraries (such as openssl or mbedtls) do not support extracting critical extensions. See: CCC-Attestation/interoperable-ra-tls#9 Signed-off-by: Kun Lai <[email protected]>
As commented in PR #11, @KB5201314 @dimakuv please let us know when you have a chance to investigate the options discussed there. The best is to be able to keep the criticality flag set. |
You can work around this with a custom callback.
At least mbedTLS allows custom callbacks. |
Mark evidence extensions as non-critical, since many TLS libraries (such as openssl or mbedtls) do not support extracting critical extensions. See: CCC-Attestation/interoperable-ra-tls#9 Signed-off-by: Kun Lai <[email protected]>
@DemiMarie Thanks, I didn't know this callback exists. I will experiment with |
Mark evidence extensions as non-critical, since many TLS libraries (such as openssl or mbedtls) do not support extracting critical extensions. See: CCC-Attestation/interoperable-ra-tls#9 Signed-off-by: Kun Lai <[email protected]>
@DemiMarie @shnwc I don't think the See my explanation in this freshly opened GitHub issue: Mbed-TLS/mbedtls#7182 |
@dimakuv is it possible to turn of Mbed TLS’s own certificate verification and do everything manually? I had to make this change in rustls to make it suitable for use with libp2p-quic. |
I do not know of such a switch/config in mbedTLS. Of course, one could just use a different TLS library on top of mbedTLS's I hope that mbedTLS gurus will propose some solutions in Mbed-TLS/mbedtls#7182. |
The current definition of evidence extension is:
interoperable-ra-tls/docs/Interoperable-RA-TLS-cert-edvidence-formats.md
Lines 7 to 10 in 6f0a361
And, accroding to TCG DICE specification draft, the criticality flag of evidence extension should be marked
critical
.However, in practice, some TLS libraries may not have a suitable api to handle a custom extension of the critical attribute. For example, openssl does not provide a way to get the custom extension that causes the
X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION
error.So maybe we can mark the extension as
non-critical
, for now.Any comments are welcome.
The text was updated successfully, but these errors were encountered: