Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ pub fn netflix() {
);
}

#[test]
pub fn rewritten_cert() {
// This cert is a rewritten version of github.com's end entity cert, generated by an
// SSL inspection system (https://www.forcepoint.com/product/ngfw-next-generation-firewall).
// We believe the cert should be considered valid:
// - It can be parsed by OpenSSL, e.g., these both work:
// `openssl x509 -inform der -in tests/rewritten_cert.der -text -noout`
// `openssl asn1parse -i -inform der -in tests/rewritten_cert.der`
// - It's generated by a robust real-world system that works in practice...
// We encountered an issue where rustls cannot handle this rewritten cert. We traced this
// back to webpki, and specifically to the code exercised by this test.
let ee: &[u8] = include_bytes!("rewritten_cert.der");
webpki::EndEntityCert::try_from(ee).unwrap();
}

#[test]
pub fn ed25519() {
let ee: &[u8] = include_bytes!("ed25519/ee.der");
Expand Down
Binary file added tests/rewritten_cert.der
Binary file not shown.