From 64faf6322e24b6132e932d71e58409c0ca4e351b Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Thu, 12 Nov 2015 19:04:37 -0200 Subject: [PATCH] Update samples (using 'tlsv1'). --- samples/chain/client.lua | 2 +- samples/chain/server.lua | 2 +- samples/dhparam/client.lua | 4 ++-- samples/dhparam/server.lua | 4 ++-- samples/digest/client.lua | 4 ++-- samples/digest/server.lua | 4 ++-- samples/ecdh/client.lua | 4 ++-- samples/ecdh/server.lua | 4 ++-- samples/info/client.lua | 4 ++-- samples/info/server.lua | 4 ++-- samples/loop-gc/client.lua | 4 ++-- samples/loop-gc/server.lua | 4 ++-- samples/loop/client.lua | 4 ++-- samples/loop/server.lua | 4 ++-- samples/oneshot/client.lua | 4 ++-- samples/oneshot/server.lua | 4 ++-- samples/verification/fail-string/client.lua | 6 +++--- samples/verification/fail-string/server.lua | 6 +++--- samples/verification/fail-table/client.lua | 6 +++--- samples/verification/fail-table/server.lua | 4 ++-- samples/verification/success/client.lua | 4 ++-- samples/verification/success/server.lua | 4 ++-- samples/verify/client.lua | 2 +- samples/verify/server.lua | 2 +- samples/want/client.lua | 4 ++-- samples/want/server.lua | 4 ++-- samples/wantread/client.lua | 4 ++-- samples/wantread/server.lua | 4 ++-- samples/wantwrite/client.lua | 4 ++-- samples/wantwrite/server.lua | 4 ++-- 30 files changed, 59 insertions(+), 59 deletions(-) diff --git a/samples/chain/client.lua b/samples/chain/client.lua index 410c6d8..c728ea6 100644 --- a/samples/chain/client.lua +++ b/samples/chain/client.lua @@ -12,7 +12,7 @@ local params = { certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } local conn = socket.tcp() diff --git a/samples/chain/server.lua b/samples/chain/server.lua index 9a6c4dc..d8643e9 100644 --- a/samples/chain/server.lua +++ b/samples/chain/server.lua @@ -12,7 +12,7 @@ local params = { certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } local ctx = assert(ssl.newcontext(params)) diff --git a/samples/dhparam/client.lua b/samples/dhparam/client.lua index 202fb12..42a26b3 100644 --- a/samples/dhparam/client.lua +++ b/samples/dhparam/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } local peer = socket.tcp() diff --git a/samples/dhparam/server.lua b/samples/dhparam/server.lua index e8594e5..e2f63a2 100644 --- a/samples/dhparam/server.lua +++ b/samples/dhparam/server.lua @@ -31,12 +31,12 @@ end local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", dhparam = dhparam_cb, } diff --git a/samples/digest/client.lua b/samples/digest/client.lua index 202fb12..42a26b3 100644 --- a/samples/digest/client.lua +++ b/samples/digest/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } local peer = socket.tcp() diff --git a/samples/digest/server.lua b/samples/digest/server.lua index 9af34fe..a0e7cac 100644 --- a/samples/digest/server.lua +++ b/samples/digest/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } diff --git a/samples/ecdh/client.lua b/samples/ecdh/client.lua index 5f0344d..6877c0f 100644 --- a/samples/ecdh/client.lua +++ b/samples/ecdh/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", -- curve = "secp384r1", } diff --git a/samples/ecdh/server.lua b/samples/ecdh/server.lua index f8c3dd5..31dc40a 100644 --- a/samples/ecdh/server.lua +++ b/samples/ecdh/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", -- curve = "secp384r1", } diff --git a/samples/info/client.lua b/samples/info/client.lua index 202fb12..42a26b3 100644 --- a/samples/info/client.lua +++ b/samples/info/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } local peer = socket.tcp() diff --git a/samples/info/server.lua b/samples/info/server.lua index a22686a..64183c5 100644 --- a/samples/info/server.lua +++ b/samples/info/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } diff --git a/samples/loop-gc/client.lua b/samples/loop-gc/client.lua index 0a47d0a..f0081c3 100644 --- a/samples/loop-gc/client.lua +++ b/samples/loop-gc/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } while true do diff --git a/samples/loop-gc/server.lua b/samples/loop-gc/server.lua index 89470cc..f7a1ce2 100644 --- a/samples/loop-gc/server.lua +++ b/samples/loop-gc/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } -- [[ SSL context diff --git a/samples/loop/client.lua b/samples/loop/client.lua index a0a1e2d..e35ef2a 100644 --- a/samples/loop/client.lua +++ b/samples/loop/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } while true do diff --git a/samples/loop/server.lua b/samples/loop/server.lua index 496d05c..076c276 100644 --- a/samples/loop/server.lua +++ b/samples/loop/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } -- [[ SSL context diff --git a/samples/oneshot/client.lua b/samples/oneshot/client.lua index 202fb12..42a26b3 100644 --- a/samples/oneshot/client.lua +++ b/samples/oneshot/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } local peer = socket.tcp() diff --git a/samples/oneshot/server.lua b/samples/oneshot/server.lua index 233a825..562382f 100644 --- a/samples/oneshot/server.lua +++ b/samples/oneshot/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } diff --git a/samples/verification/fail-string/client.lua b/samples/verification/fail-string/client.lua index 7a45212..50a0365 100644 --- a/samples/verification/fail-string/client.lua +++ b/samples/verification/fail-string/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../../certs/clientBkey.pem", certificate = "../../certs/clientB.pem", cafile = "../../certs/rootB.pem", - verify = {"none"}, - options = {"all", "no_sslv2"}, + verify = "none", + options = "all", } local peer = socket.tcp() diff --git a/samples/verification/fail-string/server.lua b/samples/verification/fail-string/server.lua index 64e4638..d0bcf88 100644 --- a/samples/verification/fail-string/server.lua +++ b/samples/verification/fail-string/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../../certs/serverAkey.pem", certificate = "../../certs/serverA.pem", cafile = "../../certs/rootA.pem", - verify = {"none"}, - options = {"all", "no_sslv2"}, + verify = "none", + options = "all", } -- [[ SSL context diff --git a/samples/verification/fail-table/client.lua b/samples/verification/fail-table/client.lua index 307c8e5..e58c15d 100644 --- a/samples/verification/fail-table/client.lua +++ b/samples/verification/fail-table/client.lua @@ -6,13 +6,13 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../../certs/clientBkey.pem", certificate = "../../certs/clientB.pem", cafile = "../../certs/rootB.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, - verifyext = {"lsec_continue"}, + options = "all", + verifyext = "lsec_continue", } -- [[ SSL context diff --git a/samples/verification/fail-table/server.lua b/samples/verification/fail-table/server.lua index e270783..b6de4a3 100644 --- a/samples/verification/fail-table/server.lua +++ b/samples/verification/fail-table/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../../certs/serverAkey.pem", certificate = "../../certs/serverA.pem", cafile = "../../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", verifyext = {"lsec_continue", "crl_check", "crl_check_chain"}, } diff --git a/samples/verification/success/client.lua b/samples/verification/success/client.lua index 996940b..abb887a 100644 --- a/samples/verification/success/client.lua +++ b/samples/verification/success/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../../certs/clientAkey.pem", certificate = "../../certs/clientA.pem", cafile = "../../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } local peer = socket.tcp() diff --git a/samples/verification/success/server.lua b/samples/verification/success/server.lua index fb75b6d..9e1a4b5 100644 --- a/samples/verification/success/server.lua +++ b/samples/verification/success/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../../certs/serverAkey.pem", certificate = "../../certs/serverA.pem", cafile = "../../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } diff --git a/samples/verify/client.lua b/samples/verify/client.lua index 78dce8d..8270c62 100644 --- a/samples/verify/client.lua +++ b/samples/verify/client.lua @@ -12,7 +12,7 @@ local params = { cafile = "../certs/rootB.pem", verify = {"peer", "fail_if_no_peer_cert"}, verifyext = {"lsec_continue", "lsec_ignore_purpose"}, - options = {"all", "no_sslv2"}, + options = "all", } local ctx = assert(ssl.newcontext(params)) diff --git a/samples/verify/server.lua b/samples/verify/server.lua index cebe315..216c2cd 100644 --- a/samples/verify/server.lua +++ b/samples/verify/server.lua @@ -12,7 +12,7 @@ local params = { cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, verifyext = {"lsec_continue", "lsec_ignore_purpose"}, - options = {"all", "no_sslv2"}, + options = "all", } diff --git a/samples/want/client.lua b/samples/want/client.lua index 3987aa8..813f310 100644 --- a/samples/want/client.lua +++ b/samples/want/client.lua @@ -8,12 +8,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } -- Wait until socket is ready (for reading or writing) diff --git a/samples/want/server.lua b/samples/want/server.lua index 14f7c12..b0fe220 100644 --- a/samples/want/server.lua +++ b/samples/want/server.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } -- [[ SSL context diff --git a/samples/wantread/client.lua b/samples/wantread/client.lua index 38800df..1c13949 100644 --- a/samples/wantread/client.lua +++ b/samples/wantread/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } diff --git a/samples/wantread/server.lua b/samples/wantread/server.lua index 44cf8b3..5323e69 100644 --- a/samples/wantread/server.lua +++ b/samples/wantread/server.lua @@ -8,12 +8,12 @@ local ssl = require("ssl") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } -- [[ SSL context diff --git a/samples/wantwrite/client.lua b/samples/wantwrite/client.lua index 09b7003..f3e6479 100644 --- a/samples/wantwrite/client.lua +++ b/samples/wantwrite/client.lua @@ -6,12 +6,12 @@ local ssl = require("ssl") local params = { mode = "client", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/clientAkey.pem", certificate = "../certs/clientA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", } local function wait(peer, err) diff --git a/samples/wantwrite/server.lua b/samples/wantwrite/server.lua index fadad6b..7b03891 100644 --- a/samples/wantwrite/server.lua +++ b/samples/wantwrite/server.lua @@ -8,12 +8,12 @@ print("Use Ctrl+S and Ctrl+Q to suspend and resume the server.") local params = { mode = "server", - protocol = "sslv3", + protocol = "tlsv1", key = "../certs/serverAkey.pem", certificate = "../certs/serverA.pem", cafile = "../certs/rootA.pem", verify = {"peer", "fail_if_no_peer_cert"}, - options = {"all", "no_sslv2"}, + options = "all", }