@@ -124,6 +124,7 @@ static const param_export_t params[] = {
124124 { "tls_method" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_method },
125125 { "verify_cert" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_verify },
126126 { "require_cert" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_require },
127+ { "verify_hostname" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_verify_hostname },
127128 { "certificate" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_certificate },
128129 { "private_key" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_pk },
129130 { "crl_check_all" , STR_PARAM |USE_FUNC_PARAM , (void * )tlsp_set_crl_check },
@@ -141,6 +142,7 @@ static const param_export_t params[] = {
141142 { "tls_method_col" , STR_PARAM , & method_col .s },
142143 { "verify_cert_col" , STR_PARAM , & verify_cert_col .s },
143144 { "require_cert_col" , STR_PARAM , & require_cert_col .s },
145+ { "verify_hostname_col" , STR_PARAM , & verify_hostname_col .s },
144146 { "certificate_col" , STR_PARAM , & certificate_col .s },
145147 { "private_key_col" , STR_PARAM , & pk_col .s },
146148 { "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,
417419 columns [14 ] = & cplist_col ;
418420 columns [15 ] = & dhparams_col ;
419421 columns [16 ] = & eccurve_col ;
422+ columns [17 ] = & verify_hostname_col ;
420423
421424 /* checking if the table version is up to date*/
422425 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,
435438 goto error ;
436439 }
437440 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 );
439442 if (no_rows == 0 ) no_rows = 5 ;
440443 if (dr_dbf .fetch_result (db_hdl , & res , no_rows ) < 0 ) {
441444 LM_ERR ("Error fetching rows\n" );
@@ -517,6 +520,9 @@ int load_info(struct tls_domain **serv_dom, struct tls_domain **cli_dom,
517520 check_val (eccurve_col , ROW_VALUES (row ) + 16 , DB_STRING , 0 , 0 );
518521 str_vals [STR_VALS_ECCURVE_COL ] = (char * ) VAL_STRING (ROW_VALUES (row ) + 16 );
519522
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+
520526 if (db_add_domain (str_vals , int_vals , blob_vals , serv_dom , cli_dom ,
521527 script_srv_doms , script_cli_doms ) < 0 ) {
522528 if (str_vals [STR_VALS_DOMAIN_COL ])
@@ -994,6 +1000,7 @@ static int mod_init(void) {
9941000 method_col .len = strlen (method_col .s );
9951001 verify_cert_col .len = strlen (verify_cert_col .s );
9961002 require_cert_col .len = strlen (require_cert_col .s );
1003+ verify_hostname_col .len = strlen (verify_hostname_col .s );
9971004 certificate_col .len = strlen (certificate_col .s );
9981005 pk_col .len = strlen (pk_col .s );
9991006 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)
12531260 if (add_mi_bool (domain_item , MI_SSTR ("REQ_CLI_CERT" ), d -> require_client_cert ) < 0 )
12541261 goto error ;
12551262
1263+ if (add_mi_bool (domain_item , MI_SSTR ("VERIFY_HOSTNAME" ), d -> verify_hostname ) < 0 )
1264+ goto error ;
1265+
12561266 if (add_mi_bool (domain_item , MI_SSTR ("CRL_CHECKALL" ), d -> crl_check_all ) < 0 )
12571267 goto error ;
12581268
0 commit comments