diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-06-07 12:13:14 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-06-07 12:13:14 +0200 |
commit | 20067e7fbcf72a49bf08c0f55b4151a7c619c03e (patch) | |
tree | e93d915b88b79aac7a6a2368404ec44af18e87c5 /plugins/imrelp/imrelp.c | |
parent | f27cff39a3ec4c904e366ac3927e4975b158aafe (diff) | |
download | rsyslog-20067e7fbcf72a49bf08c0f55b4151a7c619c03e.tar.gz rsyslog-20067e7fbcf72a49bf08c0f55b4151a7c619c03e.tar.bz2 rsyslog-20067e7fbcf72a49bf08c0f55b4151a7c619c03e.zip |
[io]mrelp: add TLS compression support
Diffstat (limited to 'plugins/imrelp/imrelp.c')
-rw-r--r-- | plugins/imrelp/imrelp.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/imrelp/imrelp.c b/plugins/imrelp/imrelp.c index f3972233..5994faca 100644 --- a/plugins/imrelp/imrelp.c +++ b/plugins/imrelp/imrelp.c @@ -75,6 +75,7 @@ static struct configSettings_s { struct instanceConf_s { uchar *pszBindPort; /* port to bind to */ sbool bEnableTLS; + sbool bEnableTLSZip; struct instanceConf_s *next; }; @@ -92,7 +93,8 @@ static modConfData_t *runModConf = NULL;/* modConf ptr to use for the current lo /* input instance parameters */ static struct cnfparamdescr inppdescr[] = { { "port", eCmdHdlrString, CNFPARAM_REQUIRED }, - { "tls", eCmdHdlrBinary, 0 } + { "tls", eCmdHdlrBinary, 0 }, + { "tls.compression", eCmdHdlrBinary, 0 } }; static struct cnfparamblk inppblk = { CNFPARAMBLK_VERSION, @@ -158,6 +160,7 @@ createInstance(instanceConf_t **pinst) inst->pszBindPort = NULL; inst->bEnableTLS = 0; + inst->bEnableTLSZip = 0; /* node created, let's add to config */ if(loadModConf->tail == NULL) { @@ -222,8 +225,12 @@ addListner(modConfData_t __attribute__((unused)) *modConf, instanceConf_t *inst) CHKiRet(relpEngineListnerConstruct(pRelpEngine, &pSrv)); CHKiRet(relpSrvSetLstnPort(pSrv, inst->pszBindPort)); - if(inst->bEnableTLS) + if(inst->bEnableTLS) { relpSrvEnableTLS(pSrv); + if(inst->bEnableTLSZip) { + relpSrvEnableTLSZip(pSrv); + } + } CHKiRet(relpEngineListnerConstructFinalize(pRelpEngine, pSrv)); finalize_it: @@ -259,6 +266,8 @@ CODESTARTnewInpInst inst->pszBindPort = (uchar*)es_str2cstr(pvals[i].val.d.estr, NULL); } else if(!strcmp(inppblk.descr[i].name, "tls")) { inst->bEnableTLS = (unsigned) pvals[i].val.d.n; + } else if(!strcmp(inppblk.descr[i].name, "tls.compression")) { + inst->bEnableTLSZip = (unsigned) pvals[i].val.d.n; } else { dbgprintf("imrelp: program error, non-handled " "param '%s'\n", inppblk.descr[i].name); |