Update samples.

This commit is contained in:
Bruno Silvestre 2015-11-20 19:12:19 -02:00
parent d36e156fac
commit 6cc8e951d4
31 changed files with 64 additions and 64 deletions

View File

@ -7,12 +7,12 @@ local util = require("util")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
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 conn = socket.tcp()

View File

@ -7,12 +7,12 @@ local util = require("util")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "sslv23",
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",
}
local ctx = assert(ssl.newcontext(params))

View File

@ -6,12 +6,12 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "sslv3",
protocol = "tlsv1_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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

@ -5,7 +5,7 @@ local ssl = require("ssl")
local pass = "foobar"
local cfg = {
protocol = "tlsv1",
protocol = "tlsv1_2",
mode = "client",
key = "key.pem",
}

View File

@ -6,12 +6,12 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "sslv3",
protocol = "tlsv1_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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,13 +6,13 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/serverBkey.pem",
certificate = "../certs/serverB.pem",
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

@ -6,13 +6,13 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "sslv23",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
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_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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_2",
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 = "sslv23",
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",
}