fix tests for multiple certificates

The tests now actually check that a specific certificate is being used by only
loading the correct one into the trust chain while running the test. The
problem before was that openssl-req by default generates CA-capable certs which
are not accepted by rustls.
This commit is contained in:
Johann150 2021-03-11 22:24:10 +01:00
parent b96cf3940b
commit 782e043083
No known key found for this signature in database
GPG key ID: 9EE6577A2A06F8F1
8 changed files with 167 additions and 254 deletions

View file

@ -429,7 +429,7 @@ mod multicert {
.root_store
.add_pem_file(&mut Cursor::new(include_bytes!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/tests/data/multicert/ca_cert.pem"
"/tests/data/multicert/example.com/cert.pem"
))))
.unwrap();
@ -459,7 +459,7 @@ mod multicert {
.root_store
.add_pem_file(&mut Cursor::new(include_bytes!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/tests/data/multicert/ca_cert.pem"
"/tests/data/multicert/example.org/cert.pem"
))))
.unwrap();