michael-grunder
ac0b186aa3
Free the reply in redisGetReply when passed NULL
...
We currently perform a NULL check in redisGetReply and don't push the
reply back to the caller, but we don't free any reply meaning that this
will leak memory:
redisGetReply(context, NULL);
This change simply frees the reply if we were passed NULL.
Addresses #740
2019-12-12 14:40:50 -08:00
Michael Grunder
b2d1ad64d0
Merge pull request #727 from pbotros/botros/disable-tests-cmake
...
Adding an option to DISABLE_TESTS
2019-12-05 17:06:44 -08:00
Michael Grunder
f2ef5f0c98
Merge pull request #737 from natoscott/master
...
Fix dead code in sslLogCallback relating to should_log variable.
2019-11-25 17:01:12 -08:00
Nathan Scott
42697bd45a
Fix dead code in sslLogCallback relating to should_log variable.
...
Coverity scans found that the should_log logic in sslLogCallback
is not working as expected because the variable is not correctly
initialised (the conditional code before logging always sets the
value to 1, which it already is).
2019-11-25 15:21:05 +11:00
Michael Grunder
5d0568d9ae
Merge pull request #731 from Kevin-Xi/patch-1
...
Fix typo in dict.c.
2019-11-19 11:11:46 -08:00
Kevin
e58a9f7d52
Fix typo in dict.c.
2019-11-20 00:00:00 +08:00
Paul Botros
f052fd1add
Adding an option to DISABLE_TESTS
...
Useful when hiredis is used as a CMake dependency in other projects and
added via add_subdirectory(). With DISABLE_TESTS on, `make test` in the
parent project won't run hiredis tests.
2019-11-03 22:01:28 -08:00
michael-grunder
e777b0295e
Use correct flag in README.md
2019-10-10 15:46:33 -07:00
Michael Grunder
42a2e679be
Merge pull request #720 from yossigo/ssl-docs
...
Update README with SSL support.
2019-10-10 14:54:01 -07:00
Michael Grunder
18eeeed076
Merge pull request #715 from redis/test-leaks
...
Fixes leaks in unit tests
2019-10-08 10:55:15 -07:00
Yossi Gottlieb
c5726ba5f7
Update README with SSL support.
2019-10-07 13:23:59 +03:00
michael-grunder
5aa7b1056b
Fixes leaks in unit tests
...
redisFormatSdsCommandArgv takes an sds* and calls sdsempty() for us.
Addresses #714
2019-09-25 11:02:44 -07:00
Mark Nunberg
0153527444
Merge pull request #711 from yossigo/ssl-tests
...
SSL Tests
2019-09-16 10:43:53 -04:00
Yossi Gottlieb
d952ed877a
Add SSL mode tests.
...
This repeats all existing tests in SSL mode, but does not yet provide
SSL-specific tests.
2019-09-16 17:30:35 +03:00
Yossi Gottlieb
a1e538092d
Make SSL timeout error compatible with rest.
2019-09-16 17:30:35 +03:00
Yossi Gottlieb
d41443bd3d
Fix: redisReconnect() should clear SSL context.
...
We should not attempt to keep the context and re-establish the
TLS connection for several reasons:
1. Maintain symmetry between redisConnect() and redisReconnect(), so in
both cases an extra step is required to initiate SSL.
2. The caller may also wish to reconfigure the SSL session and needs a
chance to do that.
3. It is not a practical thing to do on an async non-blocking connection
context.
2019-09-16 17:30:35 +03:00
Mark Nunberg
bd2c8fedf7
Merge pull request #708 from yossigo/wip/ssl-reorganization
...
SSL Reorganization
2019-09-16 06:05:46 -04:00
Yossi Gottlieb
dd408e8e3f
Update CMakelists for hiredis/hiredis_ssl builds.
...
Also rename the SSL option from `HIREDIS_SSL` to `ENABLE_SSL` to conform
with CMake convnetions.
2019-09-01 13:47:39 +03:00
Yossi Gottlieb
5872d818d9
Separate hiredis and hiredis_ssl library build.
2019-09-01 13:46:27 +03:00
Yossi Gottlieb
5c85a04164
Use a const funcs in redisContext.
2019-09-01 13:46:07 +03:00
Yossi Gottlieb
44ef4de9d9
Update CMakeLists with sslio.c rename.
2019-08-29 22:21:40 +03:00
Yossi Gottlieb
df68d7d8bd
Rename sslio.
2019-08-29 22:14:09 +03:00
Yossi Gottlieb
8715ba5c82
wip: SSL code reorganization, see #705 .
2019-08-29 22:09:37 +03:00
Mark Nunberg
1ac8fca35d
Merge pull request #706 from yossigo/fix/msvc
...
Fix MSVC build.
2019-08-29 10:14:34 -04:00
Yossi Gottlieb
28759c4b81
Fix MSVC build.
2019-08-28 18:43:40 +03:00
Mark Nunberg
2020f6f329
Merge pull request #702 from yossigo/report-connect-errors
...
SSL: Properly report SSL_connect() errors.
2019-08-27 07:10:25 -04:00
Mark Nunberg
ff4fa45422
Merge pull request #697 from yossigo/resp3
...
Port RESP3 support from Redis.
2019-08-27 06:59:32 -04:00
Mark Nunberg
ce7cb7bcc4
Merge pull request #699 from yossigo/silent-ssl-trace
...
Silent SSL trace to stdout by default.
2019-08-27 06:58:55 -04:00
Yossi Gottlieb
aacd4ccd76
Fix typo.
2019-08-25 11:43:27 +03:00
Yossi Gottlieb
153b8f632b
SSL: Properly report SSL_connect() errors.
2019-08-22 16:20:41 +03:00
Mark Nunberg
9c7c694cb7
Merge pull request #670 from jman-krafton/master
...
fix timeout code in windows
2019-08-13 08:50:41 -04:00
Yossi Gottlieb
6d21ffce7c
Silent SSL trace to stdout by default.
2019-08-13 12:51:47 +03:00
Sangmoon Yi
8e61d5737a
add recv error code for clarifying timeout
2019-08-12 10:55:08 +09:00
Sangmoon Yi
ab1762cd92
fix timeout code in windows
2019-08-12 10:54:12 +09:00
Mark Nunberg
ac49287c3d
Merge pull request #663 from mbitsnbites/mingw-support-2
...
Windows: MinGW fixes and Windows Travis builders
2019-08-09 07:37:28 -04:00
Marcus Geelnard
bbbafc5324
Travis: Add a Windows MSVC 2017 compilation test
2019-08-09 11:49:02 +02:00
Marcus Geelnard
687997c410
Travis: Add a MinGW cross compilation test
2019-08-09 11:49:02 +02:00
Marcus Geelnard
173f16ab55
MSVC: Fix some compiler warnings in sds.h
2019-08-09 11:49:02 +02:00
Marcus Geelnard
85fee25653
MinGW fix: Use _MSC_VER instead of _WIN32 where appropriate
...
Use _MSC_VER (instead of _WIN32) for things that are specific for
Visual Studio.
Also remove #include <winsock2.h> from hiredis.h, as it leaks too
many symbols and defines into the global namespace, which is
undesirable for a public interface header. Anyone who uses the
the affected parts of the hiredis API needs to include the
appropriate headers anyway in order to declare struct timeval
variables.
2019-08-09 11:49:02 +02:00
Mark Nunberg
3af99d5fd5
Merge pull request #597 from justinbrewer/createArray-size_t
...
Update createArray to take size_t
2019-08-09 04:03:02 -04:00
Mark Nunberg
f9bccfb7ba
Merge branch 'master' into createArray-size_t
2019-08-09 04:02:53 -04:00
Mark Nunberg
5d013039a9
Merge pull request #621 from Crunsher/master
...
Update README.md
2019-08-09 03:54:24 -04:00
Mark Nunberg
fe215464ca
Merge pull request #662 from dragonation/master
...
The setsockopt and getsockopt API diffs from BSD socket and WSA one
2019-08-09 03:52:06 -04:00
Mark Nunberg
b1fa77d023
Merge pull request #665 from ghost/musl-test-compat
...
test: fix errstr matching for musl libc
2019-08-09 03:48:56 -04:00
Mark Nunberg
99cdec371f
Merge pull request #671 from movebean/master
...
redisReaderGetReply leak memory
2019-08-09 03:44:25 -04:00
Mark Nunberg
fbb83c4a7a
Merge pull request #684 from qlyoung/remove-unnecessary-nullcheck
...
Remove unnecessary null check before free
2019-08-09 03:40:32 -04:00
Mark Nunberg
9414207002
Merge pull request #688 from kevin1018/patch-1
...
Add install adapters header files
2019-08-09 03:40:05 -04:00
Mark Nunberg
c259f9059d
Merge pull request #691 from Miniwoffer/master
...
Removed whitespace before newline
2019-08-09 03:39:39 -04:00
Yossi Gottlieb
91de9c975a
RESP3 support changes from Redis.
...
This corresponds to commits d5c54f0b..bea09a7f in the redis repository.
2019-08-04 12:13:04 +03:00
Yossi Gottlieb
a7a1886b7e
Initial RESP3 support [d5c54f0b].
2019-08-04 11:55:24 +03:00