Merge pull request #62 from gleydsonsoares/update_protocol_samples

add TLS_method / rename "sslv23" to "any" / update protocol samples.
This commit is contained in:
Bruno Silvestre 2015-11-19 12:18:49 -02:00
commit 8be458ff8a
27 changed files with 31 additions and 28 deletions

View File

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

View File

@ -7,7 +7,7 @@ local util = require("util")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -31,7 +31,7 @@ end
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -3,7 +3,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -3,7 +3,7 @@ local ssl = require("ssl")
local params01 = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",
@ -14,7 +14,7 @@ local params01 = {
local params02 = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAAkey.pem",
certificate = "../certs/serverAA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ 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",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -8,7 +8,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -8,7 +8,7 @@ local ssl = require("ssl")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -6,7 +6,7 @@ local ssl = require("ssl")
local params = {
mode = "client",
protocol = "tlsv1",
protocol = "tlsv1_2",
key = "../certs/clientAkey.pem",
certificate = "../certs/clientA.pem",
cafile = "../certs/rootA.pem",

View File

@ -8,7 +8,7 @@ print("Use Ctrl+S and Ctrl+Q to suspend and resume the server.")
local params = {
mode = "server",
protocol = "tlsv1",
protocol = "any",
key = "../certs/serverAkey.pem",
certificate = "../certs/serverA.pem",
cafile = "../certs/rootA.pem",

View File

@ -93,7 +93,10 @@ static int set_option_flag(const char *opt, unsigned long *flag)
*/
static LSEC_SSL_METHOD* str2method(const char *method)
{
if (!strcmp(method, "sslv23")) return SSLv23_method();
#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
#define SSLv23_method TLS_method
#endif
if (!strcmp(method, "any")) return SSLv23_method();
#ifndef OPENSSL_NO_SSL3
if (!strcmp(method, "sslv3")) return SSLv3_method();
#endif