Fix exchange algorithm in secio (#257)

This commit is contained in:
Pierre Krieger 2018-06-19 13:57:47 +02:00 committed by GitHub
parent f74cf9f126
commit 8fb919321b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,7 +285,7 @@ where
// Generate an ephemeral key for the negotiation. // Generate an ephemeral key for the negotiation.
.and_then(|(socket, context)| { .and_then(|(socket, context)| {
match EphemeralPrivateKey::generate(&agreement::ECDH_P256, &context.rng) { match EphemeralPrivateKey::generate(context.chosen_exchange.as_ref().unwrap(), &context.rng) {
Ok(tmp_priv_key) => Ok((socket, context, tmp_priv_key)), Ok(tmp_priv_key) => Ok((socket, context, tmp_priv_key)),
Err(_) => { Err(_) => {
debug!("failed to generate ECDH key"); debug!("failed to generate ECDH key");