@@ -124,6 +124,7 @@ static const param_export_t params[] = {
124
124
{ "tls_method" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_method },
125
125
{ "verify_cert" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_verify },
126
126
{ "require_cert" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_require },
127
+ { "verify_hostname" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_verify_hostname },
127
128
{ "certificate" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_certificate },
128
129
{ "private_key" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_pk },
129
130
{ "crl_check_all" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_crl_check },
@@ -141,6 +142,7 @@ static const param_export_t params[] = {
141
142
{ "tls_method_col" , STR_PARAM , & method_col .s },
142
143
{ "verify_cert_col" , STR_PARAM , & verify_cert_col .s },
143
144
{ "require_cert_col" , STR_PARAM , & require_cert_col .s },
145
+ { "verify_hostname_col" , STR_PARAM , & verify_hostname_col .s },
144
146
{ "certificate_col" , STR_PARAM , & certificate_col .s },
145
147
{ "private_key_col" , STR_PARAM , & pk_col .s },
146
148
{ "crl_check_all_col" , STR_PARAM , & crl_check_col .s },
@@ -417,6 +419,7 @@ int load_info(struct tls_domain **serv_dom, struct tls_domain **cli_dom,
417
419
columns [14 ] = & cplist_col ;
418
420
columns [15 ] = & dhparams_col ;
419
421
columns [16 ] = & eccurve_col ;
422
+ columns [17 ] = & verify_hostname_col ;
420
423
421
424
/* checking if the table version is up to date*/
422
425
if (db_check_table_version (& dr_dbf , db_hdl , & tls_db_table , TLS_TABLE_VERSION ) != 0 )
@@ -435,7 +438,7 @@ int load_info(struct tls_domain **serv_dom, struct tls_domain **cli_dom,
435
438
goto error ;
436
439
}
437
440
no_rows = estimate_available_rows (4 + 45 + 4 + 45 + 4 + 4 + 45 +
438
- 45 + 4 + 45 + 45 + 4 * 4096 , db_cols );
441
+ 45 + 4 + 45 + 45 + 4 * 4096 + 4 , db_cols );
439
442
if (no_rows == 0 ) no_rows = 5 ;
440
443
if (dr_dbf .fetch_result (db_hdl , & res , no_rows ) < 0 ) {
441
444
LM_ERR ("Error fetching rows\n" );
@@ -517,6 +520,9 @@ int load_info(struct tls_domain **serv_dom, struct tls_domain **cli_dom,
517
520
check_val (eccurve_col , ROW_VALUES (row ) + 16 , DB_STRING , 0 , 0 );
518
521
str_vals [STR_VALS_ECCURVE_COL ] = (char * ) VAL_STRING (ROW_VALUES (row ) + 16 );
519
522
523
+ check_val (verify_hostname_col , ROW_VALUES (row ) + 17 , DB_INT , 0 , 0 );
524
+ int_vals [INT_VALS_VERIFY_HOSTNAME_COL ] = VAL_INT (ROW_VALUES (row ) + 17 );
525
+
520
526
if (db_add_domain (str_vals , int_vals , blob_vals , serv_dom , cli_dom ,
521
527
script_srv_doms , script_cli_doms ) < 0 ) {
522
528
if (str_vals [STR_VALS_DOMAIN_COL ])
@@ -994,6 +1000,7 @@ static int mod_init(void) {
994
1000
method_col .len = strlen (method_col .s );
995
1001
verify_cert_col .len = strlen (verify_cert_col .s );
996
1002
require_cert_col .len = strlen (require_cert_col .s );
1003
+ verify_hostname_col .len = strlen (verify_hostname_col .s );
997
1004
certificate_col .len = strlen (certificate_col .s );
998
1005
pk_col .len = strlen (pk_col .s );
999
1006
crl_check_col .len = strlen (crl_check_col .s );
@@ -1253,6 +1260,9 @@ static int list_domain(mi_item_t *domains_arr, struct tls_domain *d)
1253
1260
if (add_mi_bool (domain_item , MI_SSTR ("REQ_CLI_CERT" ), d -> require_client_cert ) < 0 )
1254
1261
goto error ;
1255
1262
1263
+ if (add_mi_bool (domain_item , MI_SSTR ("VERIFY_HOSTNAME" ), d -> verify_hostname ) < 0 )
1264
+ goto error ;
1265
+
1256
1266
if (add_mi_bool (domain_item , MI_SSTR ("CRL_CHECKALL" ), d -> crl_check_all ) < 0 )
1257
1267
goto error ;
1258
1268
0 commit comments