Module: kamailio
Branch: master
Commit: d581418bcc49ad30bd35910f988ac78c8d9047e0
URL:
https://github.com/kamailio/kamailio/commit/d581418bcc49ad30bd35910f988ac78…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-06-04T18:32:14+02:00
crypto: check if netio crypto key is set if callbacks are enabled
---
Modified: src/modules/crypto/crypto_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d581418bcc49ad30bd35910f988ac78…
Patch:
https://github.com/kamailio/kamailio/commit/d581418bcc49ad30bd35910f988ac78…
---
diff --git a/src/modules/crypto/crypto_mod.c b/src/modules/crypto/crypto_mod.c
index c2f7fe61e4..720042792b 100644
--- a/src/modules/crypto/crypto_mod.c
+++ b/src/modules/crypto/crypto_mod.c
@@ -137,6 +137,10 @@ static int mod_init(void)
}
if(_crypto_register_evcb!=0) {
+ if(_crypto_netio_key.s==NULL || _crypto_netio_key.len<=0) {
+ LM_ERR("crypto netio key parameter is not set\n");
+ return -1;
+ }
crypto_evcb_enable();
}