Skip to content

Commit bc7b643

Browse files
committed
http/tls.lua: the default 'param' behaviour is already correct
Reading through OpenSSL's ssl/ssl_cert.c and crypto/x509/x509_vpm.c the correct purpose is selected by default
1 parent a74462e commit bc7b643

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

http/tls.lua

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -698,29 +698,21 @@ local default_tls_options = openssl_ctx.OP_NO_COMPRESSION
698698
+ openssl_ctx.OP_NO_SSLv2
699699
+ openssl_ctx.OP_NO_SSLv3
700700

701-
local client_params = openssl_verify_param.new()
702-
client_params:setPurpose("sslserver") -- the purpose the peer has to present
703-
704701
local function new_client_context()
705702
local ctx = openssl_ctx.new("TLS", false)
706703
ctx:setCipherList(intermediate_cipher_list)
707704
ctx:setOptions(default_tls_options)
708-
ctx:setParam(client_params)
709705
ctx:setEphemeralKey(openssl_pkey.new{ type = "EC", curve = "prime256v1" })
710706
local store = ctx:getStore()
711707
store:addDefaults()
712708
ctx:setVerify(openssl_ctx.VERIFY_PEER)
713709
return ctx
714710
end
715711

716-
local server_params = openssl_verify_param.new()
717-
server_params:setPurpose("sslclient") -- the purpose the peer has to present
718-
719712
local function new_server_context()
720713
local ctx = openssl_ctx.new("TLS", true)
721714
ctx:setCipherList(intermediate_cipher_list)
722715
ctx:setOptions(default_tls_options)
723-
ctx:setParam(server_params)
724716
ctx:setEphemeralKey(openssl_pkey.new{ type = "EC", curve = "prime256v1" })
725717
return ctx
726718
end

0 commit comments

Comments
 (0)