U:RDoc::AnyMethod[iI"ecdh_curves=:ETI"*OpenSSL::SSL::SSLContext#ecdh_curves=;TF: publico:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CSets the list of "supported elliptic curves" for this context.;To:RDoc::Markup::BlankLineo; ; [I"RFor a TLS client, the list is directly used in the Supported Elliptic Curves ;TI"RExtension. For a server, the list is used by OpenSSL to determine the set of ;TI"Gshared curves. OpenSSL will pick the most appropriate one from it.;T@o; ; [I"RNote that this works differently with old OpenSSL (<= 1.0.1). Only one curve ;TI"8can be set, and this has no effect for TLS clients.;T@S:RDoc::Markup::Heading: leveli: textI" Example;To:RDoc::Markup::Verbatim; [I")ctx1 = OpenSSL::SSL::SSLContext.new ;TI"-ctx1.ecdh_curves = "X25519:P-256:P-224" ;TI"6svr = OpenSSL::SSL::SSLServer.new(tcp_svr, ctx1) ;TI"Thread.new { svr.accept } ;TI" ;TI")ctx2 = OpenSSL::SSL::SSLContext.new ;TI" ctx2.ecdh_curves = "P-256" ;TI"7cli = OpenSSL::SSL::SSLSocket.new(tcp_sock, ctx2) ;TI"cli.connect ;TI" ;TI"$p cli.tmp_key.group.curve_name ;TI"3# => "prime256v1" (is an alias for NIST P-256);T: @format0: @fileI"ext/openssl/ossl_ssl.c;T:0@omit_headings_from_table_of_contents_below0I"0ctx.ecdh_curves = curve_list -> curve_list ;T0[I" (p1);T@(FI"SSLContext;TcRDoc::NormalClass00