File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -755,7 +755,11 @@ local function new_client_context()
755755 local ctx = openssl_ctx .new (" TLS" , false )
756756 ctx :setCipherList (intermediate_cipher_list )
757757 ctx :setOptions (default_tls_options )
758- ctx :setEphemeralKey (openssl_pkey .new { type = " EC" , curve = " prime256v1" })
758+ if ctx .setGroups then
759+ ctx :setGroups (" P-521:P-384:P-256" )
760+ else
761+ ctx :setEphemeralKey (openssl_pkey .new { type = " EC" , curve = " prime256v1" })
762+ end
759763 local store = ctx :getStore ()
760764 store :addDefaults ()
761765 ctx :setVerify (openssl_ctx .VERIFY_PEER )
@@ -766,7 +770,11 @@ local function new_server_context()
766770 local ctx = openssl_ctx .new (" TLS" , true )
767771 ctx :setCipherList (intermediate_cipher_list )
768772 ctx :setOptions (default_tls_options )
769- ctx :setEphemeralKey (openssl_pkey .new { type = " EC" , curve = " prime256v1" })
773+ if ctx .setGroups then
774+ ctx :setGroups (" P-521:P-384:P-256" )
775+ else
776+ ctx :setEphemeralKey (openssl_pkey .new { type = " EC" , curve = " prime256v1" })
777+ end
770778 return ctx
771779end
772780
You can’t perform that action at this time.
0 commit comments