summaryrefslogtreecommitdiffstats
path: root/plugins/imrelp/imrelp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-06-12 11:24:02 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-06-12 11:24:02 +0200
commit0df900240b19caec85a627488dfb3ee685e5b737 (patch)
tree8f92e97f99691e64d7e5d6444b6948ca988a350d /plugins/imrelp/imrelp.c
parente837b78f6aa9a312f24a3cab2ba9095ffbd117b7 (diff)
downloadrsyslog-0df900240b19caec85a627488dfb3ee685e5b737.tar.gz
rsyslog-0df900240b19caec85a627488dfb3ee685e5b737.tar.bz2
rsyslog-0df900240b19caec85a627488dfb3ee685e5b737.zip
imrelp: new parameter "compression.dhbits"
which controls the number of bits being used for Diffie-Hellman key generation
Diffstat (limited to 'plugins/imrelp/imrelp.c')
-rw-r--r--plugins/imrelp/imrelp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/imrelp/imrelp.c b/plugins/imrelp/imrelp.c
index 7fa98617..100574b1 100644
--- a/plugins/imrelp/imrelp.c
+++ b/plugins/imrelp/imrelp.c
@@ -76,6 +76,7 @@ struct instanceConf_s {
uchar *pszBindPort; /* port to bind to */
sbool bEnableTLS;
sbool bEnableTLSZip;
+ int dhBits;
struct instanceConf_s *next;
};
@@ -104,6 +105,7 @@ static struct cnfparamblk modpblk =
static struct cnfparamdescr inppdescr[] = {
{ "port", eCmdHdlrString, CNFPARAM_REQUIRED },
{ "tls", eCmdHdlrBinary, 0 },
+ { "tls.dhbits", eCmdHdlrInt, 0 },
{ "tls.compression", eCmdHdlrBinary, 0 }
};
static struct cnfparamblk inppblk =
@@ -171,6 +173,7 @@ createInstance(instanceConf_t **pinst)
inst->pszBindPort = NULL;
inst->bEnableTLS = 0;
inst->bEnableTLSZip = 0;
+ inst->dhBits = 0;
/* node created, let's add to config */
if(loadModConf->tail == NULL) {
@@ -240,6 +243,9 @@ addListner(modConfData_t __attribute__((unused)) *modConf, instanceConf_t *inst)
if(inst->bEnableTLSZip) {
relpSrvEnableTLSZip(pSrv);
}
+ if(inst->dhBits) {
+ relpSrvSetDHBits(pSrv, inst->dhBits);
+ }
}
CHKiRet(relpEngineListnerConstructFinalize(pRelpEngine, pSrv));
@@ -276,6 +282,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.dhbits")) {
+ inst->dhBits = (unsigned) pvals[i].val.d.n;
} else if(!strcmp(inppblk.descr[i].name, "tls.compression")) {
inst->bEnableTLSZip = (unsigned) pvals[i].val.d.n;
} else {