Merge branch 'master' of github.com:/httperf/httperf into ahc_fix_select
Tento commit je obsažen v:
revize
6510cdb4db
@ -1076,7 +1076,7 @@ avg 6.45 connections/session
|
|||||||
4 7 4 ... 3 3 240
|
4 7 4 ... 3 3 240
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
The line labeled ``Session rate'' shows the minium, average, and
|
The line labeled ``Session rate'' shows the minimum, average, and
|
||||||
maximum rate at which sessions completed (based on a 5 second sampling
|
maximum rate at which sessions completed (based on a 5 second sampling
|
||||||
interval). It also shows the standard deviation of the session
|
interval). It also shows the standard deviation of the session
|
||||||
completion rate. The numbers in parentheses show how many sessions
|
completion rate. The numbers in parentheses show how many sessions
|
||||||
|
@ -112,6 +112,7 @@ conn_init(Conn *conn)
|
|||||||
conn->sd = -1;
|
conn->sd = -1;
|
||||||
conn->myport = -1;
|
conn->myport = -1;
|
||||||
conn->line.iov_base = conn->line_buf;
|
conn->line.iov_base = conn->line_buf;
|
||||||
|
conn->fqdname_len = strcspn(conn->fqdname,"\r\n"); // Chomp since used in Host header record
|
||||||
|
|
||||||
#ifdef HAVE_SSL
|
#ifdef HAVE_SSL
|
||||||
if (param.use_ssl) {
|
if (param.use_ssl) {
|
||||||
|
@ -1039,9 +1039,9 @@ core_ssl_connect(Conn * s)
|
|||||||
"suites!\n");
|
"suites!\n");
|
||||||
else
|
else
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"core_ssl_connect: cipher=%s, valid=%d, id=%lu\n",
|
"core_ssl_connect: cipher=%s, id=%lu\n",
|
||||||
ssl_cipher->name, ssl_cipher->valid,
|
SSL_CIPHER_get_name(ssl_cipher),
|
||||||
ssl_cipher->id);
|
SSL_CIPHER_get_id(ssl_cipher));
|
||||||
}
|
}
|
||||||
|
|
||||||
arg.l = 0;
|
arg.l = 0;
|
||||||
|
@ -146,13 +146,13 @@ struct Sess_Private_Data
|
|||||||
/* Methods allowed for a request: */
|
/* Methods allowed for a request: */
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
HM_DELETE, HM_GET, HM_HEAD, HM_OPTIONS, HM_POST, HM_PUT, HM_TRACE,
|
HM_DELETE, HM_GET, HM_HEAD, HM_OPTIONS, HM_POST, HM_PUT, HM_PROPFIND, HM_REPORT, HM_TRACE,
|
||||||
HM_LEN
|
HM_LEN
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *call_method_name[] =
|
static const char *call_method_name[] =
|
||||||
{
|
{
|
||||||
"DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT", "TRACE"
|
"DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT", "PROPFIND", "REPORT", "TRACE"
|
||||||
};
|
};
|
||||||
|
|
||||||
static size_t sess_private_data_offset;
|
static size_t sess_private_data_offset;
|
||||||
|
@ -678,8 +678,16 @@ main(int argc, char **argv)
|
|||||||
else if (strcasecmp (optarg, "SSLv3") == 0)
|
else if (strcasecmp (optarg, "SSLv3") == 0)
|
||||||
param.ssl_protocol = 3;
|
param.ssl_protocol = 3;
|
||||||
#endif
|
#endif
|
||||||
else if (strcasecmp (optarg, "TLSv1") == 0)
|
else if (strcasecmp (optarg, "TLSv1.0") == 0 || strcasecmp (optarg, "TLSv1_0") == 0 || strcasecmp (optarg, "TLSv1") == 0)
|
||||||
param.ssl_protocol = 4;
|
param.ssl_protocol = 4;
|
||||||
|
else if (strcasecmp (optarg, "TLSv1.1") == 0 || strcasecmp (optarg, "TLSv1_1") == 0)
|
||||||
|
param.ssl_protocol = 5;
|
||||||
|
else if (strcasecmp (optarg, "TLSv1.2") == 0 || strcasecmp (optarg, "TLSv1_2") == 0)
|
||||||
|
param.ssl_protocol = 6;
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10101000L)
|
||||||
|
else if (strcasecmp (optarg, "TLSv1.3") == 0 || strcasecmp (optarg, "TLSv1_3") == 0)
|
||||||
|
param.ssl_protocol = 7;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf (stderr, "%s: illegal SSL protocol %s\n",
|
fprintf (stderr, "%s: illegal SSL protocol %s\n",
|
||||||
@ -1003,23 +1011,91 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
SSL_library_init ();
|
SSL_library_init ();
|
||||||
SSL_load_error_strings ();
|
SSL_load_error_strings ();
|
||||||
|
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
|
||||||
SSLeay_add_all_algorithms ();
|
SSLeay_add_all_algorithms ();
|
||||||
SSLeay_add_ssl_algorithms ();
|
#endif
|
||||||
|
|
||||||
switch (param.ssl_protocol)
|
switch (param.ssl_protocol)
|
||||||
{
|
{
|
||||||
/* 0/auto for SSLv23 */
|
/* 0/auto for highest available */
|
||||||
case 0: ssl_ctx = SSL_CTX_new (SSLv23_client_method ()); break;
|
case 0:
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||||
|
ssl_ctx = SSL_CTX_new (TLS_client_method ()); break;
|
||||||
|
#else
|
||||||
|
ssl_ctx = SSL_CTX_new (SSLv23_client_method ()); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
/* 2/SSLv2 */
|
/* 2/SSLv2 */
|
||||||
case 2: ssl_ctx = SSL_CTX_new (SSLv2_client_method ()); break;
|
case 2:
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||||
|
ssl_ctx = SSL_CTX_new (TLS_client_method ());
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10101000L)
|
||||||
|
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2 | SSL_OP_NO_TLSv1_3); break;
|
||||||
|
#else
|
||||||
|
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2); break;
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
ssl_ctx = SSL_CTX_new (SSLv2_client_method ()); break;
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_SSL3
|
#ifndef OPENSSL_NO_SSL3
|
||||||
/* 3/SSLv3 */
|
/* 3/SSLv3 */
|
||||||
case 3: ssl_ctx = SSL_CTX_new (SSLv3_client_method ()); break;
|
case 3:
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||||
|
ssl_ctx = SSL_CTX_new (TLS_client_method ());
|
||||||
|
SSL_CTX_set_min_proto_version(ssl_ctx, SSL3_VERSION);
|
||||||
|
SSL_CTX_set_max_proto_version(ssl_ctx, SSL3_VERSION);
|
||||||
|
break;
|
||||||
|
#else
|
||||||
|
ssl_ctx = SSL_CTX_new (SSLv3_client_method ()); break;
|
||||||
#endif
|
#endif
|
||||||
/* 4/TLSv1 */
|
#endif
|
||||||
case 4: ssl_ctx = SSL_CTX_new (TLSv1_client_method ()); break;
|
/* 4/TLSv1.0 */
|
||||||
|
case 4:
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||||
|
ssl_ctx = SSL_CTX_new (TLS_client_method ());
|
||||||
|
SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION);
|
||||||
|
SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_VERSION);
|
||||||
|
break;
|
||||||
|
#else
|
||||||
|
ssl_ctx = SSL_CTX_new (TLSv1_client_method ()); break;
|
||||||
|
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* 5/TLSv1.1 */
|
||||||
|
case 5:
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||||
|
ssl_ctx = SSL_CTX_new (TLS_client_method ());
|
||||||
|
SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_1_VERSION);
|
||||||
|
SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_1_VERSION);
|
||||||
|
break;
|
||||||
|
#else
|
||||||
|
ssl_ctx = SSL_CTX_new (TLSv1_client_method ()); break;
|
||||||
|
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_2); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* 6/TLSv1.2 */
|
||||||
|
case 6:
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||||
|
ssl_ctx = SSL_CTX_new (TLS_client_method ());
|
||||||
|
SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_2_VERSION);
|
||||||
|
SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_2_VERSION);
|
||||||
|
break;
|
||||||
|
#else
|
||||||
|
ssl_ctx = SSL_CTX_new (TLSv1_client_method ()); break;
|
||||||
|
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | SSL_OP_NO_TLSv1_1); break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10101000L)
|
||||||
|
/* 7/TLSv1.3 */
|
||||||
|
ssl_ctx = SSL_CTX_new (TLS_client_method ());
|
||||||
|
SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_3_VERSION);
|
||||||
|
SSL_CTX_set_max_proto_version(ssl_ctx, TLS1_3_VERSION);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ssl_ctx) {
|
if (!ssl_ctx) {
|
||||||
@ -1231,7 +1307,12 @@ main(int argc, char **argv)
|
|||||||
#ifndef OPENSSL_NO_SSL3
|
#ifndef OPENSSL_NO_SSL3
|
||||||
case 3: printf (" --ssl-protocol=SSLv3"); break;
|
case 3: printf (" --ssl-protocol=SSLv3"); break;
|
||||||
#endif
|
#endif
|
||||||
case 4: printf (" --ssl-protocol=TLSv1"); break;
|
case 4: printf (" --ssl-protocol=TLSv1.0"); break;
|
||||||
|
case 5: printf (" --ssl-protocol=TLSv1.1"); break;
|
||||||
|
case 6: printf (" --ssl-protocol=TLSv1.2"); break;
|
||||||
|
#if (OPENSSL_VERSION_NUMBER >= 0x10101000L)
|
||||||
|
case 7: printf (" --ssl-protocol=TLSv1.3"); break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (param.additional_header)
|
if (param.additional_header)
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <generic_types.h>
|
#include <generic_types.h>
|
||||||
#include <list.h>
|
#include <list.h>
|
||||||
|
Načítá se…
Odkázat v novém úkolu
Zablokovat Uživatele