Module: kamailio
Branch: master
Commit: 17d21f0b398ca75c1383b124ca6190b4d1ee7dc0
URL:
https://github.com/kamailio/kamailio/commit/17d21f0b398ca75c1383b124ca6190b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-03-21T11:40:59+01:00
stirshaken: fixed kemi exports
---
Modified: src/modules/stirshaken/stirshaken_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/17d21f0b398ca75c1383b124ca6190b…
Patch:
https://github.com/kamailio/kamailio/commit/17d21f0b398ca75c1383b124ca6190b…
---
diff --git a/src/modules/stirshaken/stirshaken_mod.c
b/src/modules/stirshaken/stirshaken_mod.c
index bc4a04f0fb..a98cb3a4e3 100644
--- a/src/modules/stirshaken/stirshaken_mod.c
+++ b/src/modules/stirshaken/stirshaken_mod.c
@@ -551,7 +551,7 @@ static int w_stirshaken_check_identity(sip_msg_t *msg, char *str1,
char *str2)
return ki_stirshaken_check_identity(msg);
}
-static int ki_stirshaken_check_identity_with_cert(sip_msg_t *msg, char *cert_path)
+static int ki_stirshaken_check_identity_with_cert(sip_msg_t *msg, str *cert_path)
{
str ibody = STR_NULL;
hdr_field_t *hf = NULL;
@@ -574,7 +574,7 @@ static int ki_stirshaken_check_identity_with_cert(sip_msg_t *msg, char
*cert_pat
ibody = hf->body;
- if (!(cert.x = stir_shaken_load_x509_from_file(&ss, cert_path))) {
+ if (!(cert.x = stir_shaken_load_x509_from_file(&ss, cert_path->s))) {
LM_DBG("Cannot load X509 from file\n");
stirshaken_print_error_details(&ss);
goto fail;
@@ -641,7 +641,7 @@ static int w_stirshaken_check_identity_with_cert(sip_msg_t *msg, char
*cert_path
return -1;
}
- return ki_stirshaken_check_identity_with_cert(msg, cert_path);
+ return ki_stirshaken_check_identity_with_cert(msg, &keyval);
}
static int ki_stirshaken_check_identity_with_key(sip_msg_t *msg, str *keypath)
@@ -954,8 +954,8 @@ static sr_kemi_t sr_kemi_stirshaken_exports[] = {
},
{ str_init("stirshaken"),
str_init("stirshaken_check_identity_with_key"),
SR_KEMIP_INT, ki_stirshaken_check_identity_with_key,
- { SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
- SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR }
+ { SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
+ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("stirshaken"), str_init("stirshaken_add_identity"),
SR_KEMIP_INT, ki_stirshaken_add_identity,