summaryrefslogtreecommitdiff
path: root/src/redis-benchmark.c
diff options
context:
space:
mode:
authorfilipe oliveira <filipecosta.90@gmail.com>2020-11-04 12:49:15 +0000
committerGitHub <noreply@github.com>2020-11-04 14:49:15 +0200
commit10b50069344120c1d46418838bfc2de38b65ca4a (patch)
treee79e2751abc7f6187882c00fe35963655ffaa609 /src/redis-benchmark.c
parentf4ca3d8757d6abb3536610ddb7b9ab3ad39e81df (diff)
downloadredis-10b50069344120c1d46418838bfc2de38b65ca4a.tar.gz
Enable specifying TLS ciphers(suites) in redis-cli/redis-benchmark (#8005)
Enable specifying the preferred ciphers and/or ciphersuites for redis-cli/redis-benchmark. Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
Diffstat (limited to 'src/redis-benchmark.c')
-rw-r--r--src/redis-benchmark.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/redis-benchmark.c b/src/redis-benchmark.c
index 9f27ad804..0ec9cb1eb 100644
--- a/src/redis-benchmark.c
+++ b/src/redis-benchmark.c
@@ -1520,6 +1520,14 @@ int parseOptions(int argc, const char **argv) {
} else if (!strcmp(argv[i],"--key")) {
if (lastarg) goto invalid;
config.sslconfig.key = strdup(argv[++i]);
+ } else if (!strcmp(argv[i],"--tls-ciphers")) {
+ if (lastarg) goto invalid;
+ config.sslconfig.ciphers = strdup(argv[++i]);
+ #ifdef TLS1_3_VERSION
+ } else if (!strcmp(argv[i],"--tls-ciphersuites")) {
+ if (lastarg) goto invalid;
+ config.sslconfig.ciphersuites = strdup(argv[++i]);
+ #endif
#endif
} else {
/* Assume the user meant to provide an option when the arg starts
@@ -1577,6 +1585,15 @@ usage:
" system-wide trusted root certs configuration will apply.\n"
" --cert <file> Client certificate to authenticate with.\n"
" --key <file> Private key file to authenticate with.\n"
+" --tls-ciphers <list> Sets the list of prefered ciphers (TLSv1.2 and below)\n"
+" in order of preference from highest to lowest separated by colon (\":\").\n"
+" See the ciphers(1ssl) manpage for more information about the syntax of this string.\n"
+#ifdef TLS1_3_VERSION
+" --tls-ciphersuites <list> Sets the list of prefered ciphersuites (TLSv1.3)\n"
+" in order of preference from highest to lowest separated by colon (\":\").\n"
+" See the ciphers(1ssl) manpage for more information about the syntax of this string,\n"
+" and specifically for TLSv1.3 ciphersuites.\n"
+#endif
#endif
" --help Output this help and exit.\n"
" --version Output version and exit.\n\n"