summaryrefslogtreecommitdiffstats
path: root/runtime/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-05-15 18:49:07 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-05-15 18:49:07 +0200
commit940bdc4c4117117beb7e34c84e5ea5bd3f441d4f (patch)
treeeeec8ea763a6dc67c74b0702709ae9792bbc8048 /runtime/queue.c
parent9205c5541bf2ad524803f7feec0bdbad366566f3 (diff)
downloadrsyslog-940bdc4c4117117beb7e34c84e5ea5bd3f441d4f.tar.gz
rsyslog-940bdc4c4117117beb7e34c84e5ea5bd3f441d4f.tar.bz2
rsyslog-940bdc4c4117117beb7e34c84e5ea5bd3f441d4f.zip
enable ability to read existing encrypted queue file
Diffstat (limited to 'runtime/queue.c')
-rw-r--r--runtime/queue.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/queue.c b/runtime/queue.c
index 0f77bceb..d569318d 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -777,12 +777,21 @@ qqueueTryLoadPersistedInfo(qqueue_t *pThis)
(rsRetVal(*)(obj_t*,void*))qqueueLoadPersStrmInfoFixup, pThis));
CHKiRet(obj.Deserialize(&pThis->tVars.disk.pReadDel, (uchar*) "strm", psQIF,
(rsRetVal(*)(obj_t*,void*))qqueueLoadPersStrmInfoFixup, pThis));
-
/* create a duplicate for the read "pointer". */
CHKiRet(strm.Dup(pThis->tVars.disk.pReadDel, &pThis->tVars.disk.pReadDeq));
CHKiRet(strm.SetbDeleteOnClose(pThis->tVars.disk.pReadDeq, 0)); /* deq must NOT delete the files! */
CHKiRet(strm.ConstructFinalize(pThis->tVars.disk.pReadDeq));
+ /* if we use a crypto provider, we need to amend the objects with it's info */
+ if(pThis->useCryprov) {
+ CHKiRet(strm.Setcryprov(pThis->tVars.disk.pWrite, &pThis->cryprov));
+ CHKiRet(strm.SetcryprovData(pThis->tVars.disk.pWrite, pThis->cryprovData));
+ CHKiRet(strm.Setcryprov(pThis->tVars.disk.pReadDeq, &pThis->cryprov));
+ CHKiRet(strm.SetcryprovData(pThis->tVars.disk.pReadDeq, pThis->cryprovData));
+ CHKiRet(strm.Setcryprov(pThis->tVars.disk.pReadDel, &pThis->cryprov));
+ CHKiRet(strm.SetcryprovData(pThis->tVars.disk.pReadDel, pThis->cryprovData));
+ }
+dbgprintf("DDDD: seeking offsets (here we need crypto)\n");
CHKiRet(strm.SeekCurrOffs(pThis->tVars.disk.pWrite));
CHKiRet(strm.SeekCurrOffs(pThis->tVars.disk.pReadDel));
CHKiRet(strm.SeekCurrOffs(pThis->tVars.disk.pReadDeq));