summaryrefslogtreecommitdiff
path: root/sslio.h
diff options
context:
space:
mode:
authorMark Nunberg <mnunberg@haskalah.org>2018-01-08 16:07:10 -0500
committerMark Nunberg <mnunberg@haskalah.org>2019-02-20 09:10:10 -0500
commit82549a53de4483b368008485d74028f302fd0e60 (patch)
tree2d562f086abe03acd7a72766246a351319bfa9ce /sslio.h
parent08efa46599410e6b56ab19ed1c9a72c67476db9c (diff)
Disable SSL by default
Diffstat (limited to 'sslio.h')
-rw-r--r--sslio.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/sslio.h b/sslio.h
index 1f46b03..9edac87 100644
--- a/sslio.h
+++ b/sslio.h
@@ -2,19 +2,26 @@
#define REDIS_SSLIO_H
-#ifdef HIREDIS_NOSSL
+#ifndef HIREDIS_SSL
typedef struct redisSsl {
- int dummy;
+ size_t lastLen;
+ int wantRead;
+ int pendingWrite;
} redisSsl;
-static void redisFreeSsl(redisSsl *) {
+static inline void redisFreeSsl(redisSsl *ssl) {
+ (void)ssl;
}
-static int redisSslCreate(struct redisContext *c) {
+static inline int redisSslCreate(struct redisContext *c, const char *ca,
+ const char *cert, const char *key) {
+ (void)c;(void)ca;(void)cert;(void)key;
return REDIS_ERR;
}
-static int redisSslRead(struct redisContect *c, char *s, size_t, n) {
+static inline int redisSslRead(struct redisContext *c, char *s, size_t n) {
+ (void)c;(void)s;(void)n;
return -1;
}
-static int redisSslWrite(struct redisContext *c) {
+static inline int redisSslWrite(struct redisContext *c) {
+ (void)c;
return -1;
}
#else
@@ -53,5 +60,5 @@ int redisSslCreate(struct redisContext *c, const char *caPath,
int redisSslRead(struct redisContext *c, char *buf, size_t bufcap);
int redisSslWrite(struct redisContext *c);
-#endif /* !HIREDIS_NOSSL */
+#endif /* HIREDIS_SSL */
#endif /* HIREDIS_SSLIO_H */