mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
26 lines
732 B
Tcl
26 lines
732 B
Tcl
|
start_server {tags {"tls"}} {
|
||
|
if {$::tls} {
|
||
|
package require tls
|
||
|
|
||
|
test {TLS: Not accepting non-TLS connections on a TLS port} {
|
||
|
set s [redis [srv 0 host] [srv 0 port]]
|
||
|
catch {$s PING} e
|
||
|
set e
|
||
|
} {*I/O error*}
|
||
|
|
||
|
test {TLS: Verify tls-auth-clients behaves as expected} {
|
||
|
set s [redis [srv 0 host] [srv 0 port]]
|
||
|
::tls::import [$s channel]
|
||
|
catch {$s PING} e
|
||
|
assert_match {*error*} $e
|
||
|
|
||
|
set resp [r CONFIG SET tls-auth-clients no]
|
||
|
|
||
|
set s [redis [srv 0 host] [srv 0 port]]
|
||
|
::tls::import [$s channel]
|
||
|
catch {$s PING} e
|
||
|
assert_match {PONG} $e
|
||
|
} {}
|
||
|
}
|
||
|
}
|