Skip to content

Commit

Permalink
Add test for TLS cert+key as one
Browse files Browse the repository at this point in the history
  • Loading branch information
jdthomas committed Jan 23, 2025
1 parent dd92373 commit c1832bb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,4 +444,16 @@ mod tests {
.build()
.unwrap();
}

#[test]
fn cert_key_as_one() {
let key = include_str!("../examples/tls/key.ecc");
let cert = include_str!("../examples/tls/cert.ecc.pem");
let combined = format!("{cert}\n{key}");
TlsConfigBuilder::new()
.key(combined.as_bytes())
.cert(combined.as_bytes())
.build()
.unwrap();
}
}

0 comments on commit c1832bb

Please sign in to comment.