1 .\" $OpenBSD: SSL_set_tmp_ecdh.3,v 1.5 2018/03/23 14:28:16 schwarze Exp $
3 .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: March 23 2018 $
18 .Dt SSL_SET_TMP_ECDH 3
21 .Nm SSL_set_tmp_ecdh ,
22 .Nm SSL_CTX_set_tmp_ecdh ,
23 .Nm SSL_set_ecdh_auto ,
24 .Nm SSL_CTX_set_ecdh_auto ,
25 .Nm SSL_set_tmp_ecdh_callback ,
26 .Nm SSL_CTX_set_tmp_ecdh_callback
27 .Nd select a curve for ECDH ephemeral key exchange
36 .Fo SSL_CTX_set_tmp_ecdh
46 .Fo SSL_CTX_set_ecdh_auto
51 .Fo SSL_set_tmp_ecdh_callback
53 .Fa "EC_KEY *(*ecdh)(SSL *ssl, int is_export, int keylength)"
56 .Fo SSL_CTX_set_tmp_ecdh_callback
58 .Fa "EC_KEY *(*ecdh)(SSL *ssl, int is_export, int keylength)"
61 Automatic EC curve selection and generation is always enabled in
62 LibreSSL, and applications cannot manually provide EC keys for use
63 with ECDHE key exchange.
65 The only remaining effect of
67 is that the curve of the given
69 key becomes the only curve enabled for the
71 connection, so it is equivalent to calling
72 .Xr SSL_set1_groups_list 3
73 with the same single curve name.
75 .Fn SSL_CTX_set_tmp_ecdh
76 has the same effect on all connections that will be created from
81 .Fn SSL_set_ecdh_auto ,
82 .Fn SSL_CTX_set_ecdh_auto ,
83 .Fn SSL_set_tmp_ecdh_callback ,
85 .Fn SSL_CTX_set_tmp_ecdh_callback
86 are deprecated and have no effect.
90 .Fn SSL_CTX_set_tmp_ecdh
91 return 1 on success or 0 on failure.
93 .Fn SSL_set_ecdh_auto ,
94 .Fn SSL_CTX_set_ecdh_auto ,
95 .Fn SSL_set_tmp_ecdh_callback ,
97 .Fn SSL_CTX_set_tmp_ecdh_callback
101 .Xr SSL_CTX_set1_groups 3 ,
102 .Xr SSL_CTX_set_cipher_list 3 ,
103 .Xr SSL_CTX_set_options 3 ,
104 .Xr SSL_CTX_set_tmp_dh_callback 3 ,
107 .Fn SSL_set_tmp_ecdh ,
108 .Fn SSL_CTX_set_tmp_ecdh ,
109 .Fn SSL_set_tmp_ecdh_callback ,
111 .Fn SSL_CTX_set_tmp_ecdh_callback
112 first appeared in OpenSSL 0.9.8 and have been available since
115 .Fn SSL_CTX_set_ecdh_auto
117 .Fn SSL_set_ecdh_auto
118 first appeared in OpenSSL 1.0.2 and have been available since