Skip to content

Commit

Permalink
Revert the order of the chain in Identity from PKCS12
Browse files Browse the repository at this point in the history
  • Loading branch information
kazk committed Dec 8, 2021
1 parent a512918 commit 0f91cd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/imp/openssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ impl Identity {
Ok(Identity {
pkey: parsed.pkey,
cert: parsed.cert,
chain: parsed.chain.into_iter().flatten().collect(),
// > The stack is the reverse of what you might expect due to the way
// > PKCS12_parse is implemented, so we need to load it backwards.
// > https://github.com/sfackler/rust-native-tls/commit/05fb5e583be589ab63d9f83d986d095639f8ec44
chain: parsed.chain.into_iter().flatten().rev().collect(),
})
}

Expand Down

0 comments on commit 0f91cd7

Please sign in to comment.