Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Commit

Permalink
reorder cert chain
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegn committed Dec 10, 2018
1 parent 80a6838 commit 849a2ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions distributed-fly/src/cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ pub fn get_ctx(servername: &str) -> Result<Option<ssl::SslContext>, String> {
.unwrap();
debug!(
"setting certificate! {}",
String::from_utf8(pems[1].to_pem().unwrap()).unwrap()
String::from_utf8(pems[0].to_pem().unwrap()).unwrap()
);
builder.set_certificate(&pems[1]).unwrap();
builder.set_certificate(&pems[0]).unwrap();
debug!(
"adding extra chain cert: {}",
String::from_utf8(pems[0].to_pem().unwrap()).unwrap()
String::from_utf8(pems[1].to_pem().unwrap()).unwrap()
);
builder.add_extra_chain_cert(pems[0].clone()).unwrap();
builder.add_extra_chain_cert(pems[1].clone()).unwrap();
debug!("decrypting private key!");
match decrypt(c.get("encrypted_private_key").unwrap().to_vec())
{
Expand Down

0 comments on commit 849a2ac

Please sign in to comment.