summaryrefslogtreecommitdiffstats
path: root/runtime/cryprov.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-05-08 11:19:23 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-05-08 11:19:23 +0200
commit4ae3176e2824607b8016699d3fc3f1f6a8371495 (patch)
tree74fcdcabeaaf7b4b5bc449160398d43dfe6fb4f1 /runtime/cryprov.h
parentfc861c0a504bfea58fea66bbf65738446117d668 (diff)
downloadrsyslog-4ae3176e2824607b8016699d3fc3f1f6a8371495.tar.gz
rsyslog-4ae3176e2824607b8016699d3fc3f1f6a8371495.tar.bz2
rsyslog-4ae3176e2824607b8016699d3fc3f1f6a8371495.zip
extend crypto provider interface so that it can support queue subsystem
Diffstat (limited to 'runtime/cryprov.h')
-rw-r--r--runtime/cryprov.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/cryprov.h b/runtime/cryprov.h
index 8496b745..cbb2f45d 100644
--- a/runtime/cryprov.h
+++ b/runtime/cryprov.h
@@ -26,14 +26,21 @@
#include <gcrypt.h>
+/* we unfortunately need to have two different param names depending on the
+ * context in which parameters are set. Other than (re/over)engineering the core
+ * interface, we just define some values to keep track of that.
+ */
+#define CRYPROV_PARAMTYPE_REGULAR 0
+#define CRYPROV_PARAMTYPE_DISK 1
+
/* interface */
BEGINinterface(cryprov) /* name must also be changed in ENDinterface macro! */
rsRetVal (*Construct)(void *ppThis);
- rsRetVal (*SetCnfParam)(void *ppThis, struct nvlst *lst);
+ rsRetVal (*SetCnfParam)(void *ppThis, struct nvlst *lst, int paramType);
rsRetVal (*Destruct)(void *ppThis);
rsRetVal (*OnFileOpen)(void *pThis, uchar *fn, void *pFileInstData);
rsRetVal (*Encrypt)(void *pFileInstData, uchar *buf, size_t *lenBuf);
rsRetVal (*OnFileClose)(void *pFileInstData, off64_t offsLogfile);
ENDinterface(cryprov)
-#define cryprovCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
+#define cryprovCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */
#endif /* #ifndef INCLUDED_CRYPROV_H */