Update samples (using 'tlsv1').

This commit is contained in:
Bruno Silvestre 2015-11-12 19:04:37 -02:00
parent 49ea6b8ba6
commit 64faf6322e
30 changed files with 59 additions and 59 deletions

View File

@ -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()

View File

@ -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))

View File

@ -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()

View File

@ -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,
}

View File

@ -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()

View File

@ -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",
}

View File

@ -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",
}

View File

@ -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",
}

View File

@ -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()

View File

@ -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",
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -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",
}

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -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"},
}

View File

@ -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()

View File

@ -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",
}

View File

@ -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))

View File

@ -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",
}

View File

@ -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)

View File

@ -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

View File

@ -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",
}

View File

@ -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

View File

@ -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)

View File

@ -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",
}