Skip to content

Commit

Permalink
[backend] allow ECDHE as cipher
Browse files Browse the repository at this point in the history
We need to defind a curve for this.
  • Loading branch information
mlschroe committed Nov 10, 2017
1 parent 80aa390 commit 035d09f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/backend/BSSSL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ sub initctx {
if ($certfile) {
Net::SSLeay::CTX_use_certificate_file($sslctx, $certfile, &Net::SSLeay::FILETYPE_PEM) || die("certificate $keyfile failed\n");
}
if (defined &Net::SSLeay::CTX_set_tmp_ecdh) {
my $curve = Net::SSLeay::OBJ_txt2nid('prime256v1');
my $ecdh = Net::SSLeay::EC_KEY_new_by_curve_name($curve);
Net::SSLeay::CTX_set_tmp_ecdh($sslctx, $ecdh);
Net::SSLeay::EC_KEY_free($ecdh);
}
}

sub freectx {
Expand Down

0 comments on commit 035d09f

Please sign in to comment.