You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
Certificates in PEM files that starts "BEGIN TRUSTED CERTIFICATE" are ignored #52
Expected behavior
rustls should accept and correctly parse certificates generated by OpenSSL
Additional context
Removing the TRUSTED infix solves the problem, handshake is possible.
To remove the TRUSTED: openssl x509 -in cert.pem -clrtrust -out normal.pem
"BEGIN TRUSTED CERTIFICATE" is an OpenSSL-proprietary format, I don't think we want or need to support that.
And, since this is most commonly used for trust anchors in certificate form, it would be a mistake to give such a certificate to a TLS server.
Also, that example certificate has something really wild going on. It has a non-standard extension which contains PEM encodings of further certificates? Huh?
Indeed this is a certificate used in remote attestation of the SGX enclave.
Certificate is generated with embedded quote (measurement) from the enclave (the non-standard extension).
The web service that runs in the enclave uses privkey and cert during TLS handshake.
Clients verify the quote from the cert, and if valid, they are assured connection is established with software that runs in legit SGX enclave.
The internal certificates comes from Intel, they contain a signature over the generated quote.
Activity
djc commentedon Aug 9, 2024
Do you know what tool produced this PEM? RFC 7468 does not mention
TRUSTED.ctz commentedon Aug 9, 2024
"BEGIN TRUSTED CERTIFICATE" is an OpenSSL-proprietary format, I don't think we want or need to support that.
And, since this is most commonly used for trust anchors in certificate form, it would be a mistake to give such a certificate to a TLS server.
Also, that example certificate has something really wild going on. It has a non-standard extension which contains PEM encodings of further certificates? Huh?
expand me
cpu commentedon Aug 9, 2024
I think this would be a
rustls/pemfilediscussion.I've seen something like that before in a proprietary root from the SGX ecosystem. It's bonkers but I think that ecosystem is full of bad ideas 😬
szymek156 commentedon Aug 9, 2024
Indeed this is a certificate used in remote attestation of the SGX enclave.
Certificate is generated with embedded quote (measurement) from the enclave (the non-standard extension).
The web service that runs in the enclave uses privkey and cert during TLS handshake.
Clients verify the quote from the cert, and if valid, they are assured connection is established with software that runs in legit SGX enclave.
The internal certificates comes from Intel, they contain a signature over the generated quote.
cpu commentedon Sep 16, 2024
I think this is my opinion as well. Let's close this for now pending any new input.