diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-04-11 14:49:06 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-04-11 14:49:06 +0200 |
commit | 5f72832b3d6c2acd076b9ebfd3484877fc506ebc (patch) | |
tree | 9747c711c12b9659fb039ef1670310f0e76a74b7 /runtime/lmcry_gcry.c | |
parent | 7ab02dce5c60453c454dd8645a63a5ef33f6a546 (diff) | |
download | rsyslog-5f72832b3d6c2acd076b9ebfd3484877fc506ebc.tar.gz rsyslog-5f72832b3d6c2acd076b9ebfd3484877fc506ebc.tar.bz2 rsyslog-5f72832b3d6c2acd076b9ebfd3484877fc506ebc.zip |
logenc: milestone: rsyslog writes .encinfo side files
Diffstat (limited to 'runtime/lmcry_gcry.c')
-rw-r--r-- | runtime/lmcry_gcry.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/runtime/lmcry_gcry.c b/runtime/lmcry_gcry.c index 31e648fc..881d047d 100644 --- a/runtime/lmcry_gcry.c +++ b/runtime/lmcry_gcry.c @@ -150,11 +150,13 @@ OnFileOpen(void *pT, uchar *fn, void *pGF) gcryfile *pgf = (gcryfile*) pGF; DEFiRet; dbgprintf("DDDD: cry: onFileOpen: %s\n", fn); - /* note: if *pgf is set to NULL, this auto-disables GT functions */ - //*pgf = gcryCtxOpenFile(pThis->ctx, fn); - CHKiRet(rsgcryInitCrypt(pThis->ctx, pgf, GCRY_CIPHER_MODE_CBC, "TODO: init value")); + CHKiRet(rsgcryInitCrypt(pThis->ctx, pgf, GCRY_CIPHER_MODE_CBC, fn)); finalize_it: + /* TODO: enable this error message (need to cleanup loop first ;)) + errmsg.LogError(0, iRet, "Encryption Provider" + "Error: cannot open .encinfo file - disabling log file"); + */ RETiRet; } @@ -169,11 +171,11 @@ dbgprintf("DDDD: Encrypt (%u): %s\n", *lenRec-1, rec); } static rsRetVal -OnFileClose(void *pF) +OnFileClose(void *pF, off64_t offsLogfile) { DEFiRet; dbgprintf("DDDD: onFileClose\n"); - gcryfileDestruct(pF); + gcryfileDestruct(pF, offsLogfile); RETiRet; } |