summaryrefslogtreecommitdiffstats
path: root/runtime/libgcry.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-05-15 12:08:54 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-05-15 12:08:54 +0200
commitbad876b26584379aba136a0e580e8ab6a5b95a6e (patch)
tree03589db1c2f74227d78fb1f38b76bfa7905d91eb /runtime/libgcry.h
parent24372200d1ff9a70c0474e99fe03e0faca6cc17f (diff)
downloadrsyslog-bad876b26584379aba136a0e580e8ab6a5b95a6e.tar.gz
rsyslog-bad876b26584379aba136a0e580e8ab6a5b95a6e.tar.bz2
rsyslog-bad876b26584379aba136a0e580e8ab6a5b95a6e.zip
clean up crypto provider state files on queue file close
Diffstat (limited to 'runtime/libgcry.h')
-rw-r--r--runtime/libgcry.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/libgcry.h b/runtime/libgcry.h
index 190f4737..7c704bcf 100644
--- a/runtime/libgcry.h
+++ b/runtime/libgcry.h
@@ -43,6 +43,7 @@ struct gcryfile_s {
uchar *readBuf;
int16_t readBufIdx;
int16_t readBufMaxIdx;
+ int8_t bDeleteOnClose; /* for queue support, similar to stream subsys */
};
int gcryGetKeyFromFile(char *fn, char **key, unsigned *keylen);
@@ -68,6 +69,14 @@ int gcryGetKeyFromProg(char *cmd, char **key, unsigned *keylen);
#define RSGCRY_FILETYPE_NAME "rsyslog-enrcyption-info"
#define ENCINFO_SUFFIX ".encinfo"
+/* Note: gf may validly be NULL, e.g. if file has not yet been opened! */
+static inline void
+gcryfileSetDeleteOnClose(gcryfile gf, int val)
+{
+ if(gf != NULL)
+ gf->bDeleteOnClose = val;
+}
+
static inline int
rsgcryAlgoname2Algo(char *algoname) {
if(!strcmp((char*)algoname, "3DES")) return GCRY_CIPHER_3DES;