浏览代码

http_client: http_client_request to include default clientcert, clientkey,...

- the lost module uses http_client API functions and in the course of NG112
  client certificates are used for authentication when querying LIS or ECRF,
  the fix allows these to be read out via http_client module parameters.

(cherry picked from commit 7d5868ab1242eb8166e6af1bb8a21b39001df663)
Wolfgang Kampichler 4 年之前
父节点
当前提交
95e7399481
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      src/modules/http_client/functions.c

+ 12 - 0
src/modules/http_client/functions.c

@@ -668,6 +668,18 @@ int http_client_query(
 			query_params.http_proxy_port = default_http_proxy_port;
 		}
 	}
+	if(default_tls_clientcert.s != NULL && default_tls_clientcert.len > 0) {
+		query_params.clientcert = default_tls_clientcert.s;
+	}
+	if(default_tls_clientkey.s != NULL && default_tls_clientkey.len > 0) {
+		query_params.clientkey = default_tls_clientkey.s;
+	}
+	if(default_tls_cacert != NULL) {
+		query_params.cacert = default_tls_cacert;
+	}
+	if(default_cipher_suite_list.s != NULL && default_cipher_suite_list.len) {
+		query_params.ciphersuites = default_cipher_suite_list.s;
+	}
 
 	res = curL_query_url(_m, _url, _dst, &query_params);