Browse code

stirshaken: fixed kemi exports

Daniel-Constantin Mierla authored on 21/03/2021 10:40:59
Showing 1 changed files
... ...
@@ -551,7 +551,7 @@ static int w_stirshaken_check_identity(sip_msg_t *msg, char *str1, char *str2)
551 551
 	return ki_stirshaken_check_identity(msg);
552 552
 }
553 553
 
554
-static int ki_stirshaken_check_identity_with_cert(sip_msg_t *msg, char *cert_path)
554
+static int ki_stirshaken_check_identity_with_cert(sip_msg_t *msg, str *cert_path)
555 555
 {
556 556
 	str ibody = STR_NULL;
557 557
 	hdr_field_t *hf = NULL;
... ...
@@ -574,7 +574,7 @@ static int ki_stirshaken_check_identity_with_cert(sip_msg_t *msg, char *cert_pat
574 574
 
575 575
 	ibody = hf->body;
576 576
 
577
-	if (!(cert.x = stir_shaken_load_x509_from_file(&ss, cert_path))) {
577
+	if (!(cert.x = stir_shaken_load_x509_from_file(&ss, cert_path->s))) {
578 578
 		LM_DBG("Cannot load X509 from file\n");
579 579
 		stirshaken_print_error_details(&ss);
580 580
 		goto fail;
... ...
@@ -641,7 +641,7 @@ static int w_stirshaken_check_identity_with_cert(sip_msg_t *msg, char *cert_path
641 641
 		return -1;
642 642
 	}
643 643
 
644
-	return ki_stirshaken_check_identity_with_cert(msg, cert_path);
644
+	return ki_stirshaken_check_identity_with_cert(msg, &keyval);
645 645
 }
646 646
 
647 647
 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[] = {
954 954
 	},
955 955
 	{ str_init("stirshaken"), str_init("stirshaken_check_identity_with_key"),
956 956
 		SR_KEMIP_INT, ki_stirshaken_check_identity_with_key,
957
-		{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
958
-			SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR }
957
+		{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
958
+			SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
959 959
 	},
960 960
 	{ str_init("stirshaken"), str_init("stirshaken_add_identity"),
961 961
 		SR_KEMIP_INT, ki_stirshaken_add_identity,