File tree 1 file changed +10
-2
lines changed
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()
755
755
local ctx = openssl_ctx .new (" TLS" , false )
756
756
ctx :setCipherList (intermediate_cipher_list )
757
757
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
759
763
local store = ctx :getStore ()
760
764
store :addDefaults ()
761
765
ctx :setVerify (openssl_ctx .VERIFY_PEER )
@@ -766,7 +770,11 @@ local function new_server_context()
766
770
local ctx = openssl_ctx .new (" TLS" , true )
767
771
ctx :setCipherList (intermediate_cipher_list )
768
772
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
770
778
return ctx
771
779
end
772
780
You can’t perform that action at this time.
0 commit comments