Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
5e042dbc
Commit
5e042dbc
authored
Feb 04, 2020
by
lifubang
Committed by
antirez
Feb 12, 2020
Browse files
fix ssl flag check for redis-cli
Signed-off-by:
lifubang
<
lifubang@acmcoder.com
>
parent
dcbe8bfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
5e042dbc
...
@@ -1595,15 +1595,15 @@ static int parseOptions(int argc, char **argv) {
...
@@ -1595,15 +1595,15 @@ static int parseOptions(int argc, char **argv) {
#ifdef USE_OPENSSL
#ifdef USE_OPENSSL
}
else
if
(
!
strcmp
(
argv
[
i
],
"--tls"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--tls"
))
{
config
.
tls
=
1
;
config
.
tls
=
1
;
}
else
if
(
!
strcmp
(
argv
[
i
],
"--sni"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--sni"
)
&&
!
lastarg
)
{
config
.
sni
=
argv
[
++
i
];
config
.
sni
=
argv
[
++
i
];
}
else
if
(
!
strcmp
(
argv
[
i
],
"--cacertdir"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--cacertdir"
)
&&
!
lastarg
)
{
config
.
cacertdir
=
argv
[
++
i
];
config
.
cacertdir
=
argv
[
++
i
];
}
else
if
(
!
strcmp
(
argv
[
i
],
"--cacert"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--cacert"
)
&&
!
lastarg
)
{
config
.
cacert
=
argv
[
++
i
];
config
.
cacert
=
argv
[
++
i
];
}
else
if
(
!
strcmp
(
argv
[
i
],
"--cert"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--cert"
)
&&
!
lastarg
)
{
config
.
cert
=
argv
[
++
i
];
config
.
cert
=
argv
[
++
i
];
}
else
if
(
!
strcmp
(
argv
[
i
],
"--key"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"--key"
)
&&
!
lastarg
)
{
config
.
key
=
argv
[
++
i
];
config
.
key
=
argv
[
++
i
];
#endif
#endif
}
else
if
(
!
strcmp
(
argv
[
i
],
"-v"
)
||
!
strcmp
(
argv
[
i
],
"--version"
))
{
}
else
if
(
!
strcmp
(
argv
[
i
],
"-v"
)
||
!
strcmp
(
argv
[
i
],
"--version"
))
{
...
@@ -1701,12 +1701,13 @@ static void usage(void) {
...
@@ -1701,12 +1701,13 @@ static void usage(void) {
" -c Enable cluster mode (follow -ASK and -MOVED redirections).
\n
"
" -c Enable cluster mode (follow -ASK and -MOVED redirections).
\n
"
#ifdef USE_OPENSSL
#ifdef USE_OPENSSL
" --tls Establish a secure TLS connection.
\n
"
" --tls Establish a secure TLS connection.
\n
"
" --cacert CA Certificate file to verify with.
\n
"
" --sni <host> Server name indication for TLS.
\n
"
" --cacertdir Directory where trusted CA certificates are stored.
\n
"
" --cacert <file> CA Certificate file to verify with.
\n
"
" --cacertdir <dir> Directory where trusted CA certificates are stored.
\n
"
" If neither cacert nor cacertdir are specified, the default
\n
"
" If neither cacert nor cacertdir are specified, the default
\n
"
" system-wide trusted root certs configuration will apply.
\n
"
" system-wide trusted root certs configuration will apply.
\n
"
" --cert
Client certificate to authenticate with.
\n
"
" --cert
<file>
Client certificate to authenticate with.
\n
"
" --key
Private key file to authenticate with.
\n
"
" --key
<file>
Private key file to authenticate with.
\n
"
#endif
#endif
" --raw Use raw formatting for replies (default when STDOUT is
\n
"
" --raw Use raw formatting for replies (default when STDOUT is
\n
"
" not a tty).
\n
"
" not a tty).
\n
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment