Mercurial > hg > freeDiameter
comparison freeDiameter/config.c @ 17:ab3c58d88be3
Added proper gcrypt initializer
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Mon, 05 Oct 2009 14:03:05 +0900 |
parents | c5c99c73c2bf |
children | e7187583dcf8 |
comparison
equal
deleted
inserted
replaced
16:013ce9851131 | 17:ab3c58d88be3 |
---|---|
119 #else /* DISABLE_SCTP */ | 119 #else /* DISABLE_SCTP */ |
120 fd_log_debug(" - SCTP ......... : %s\n", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled"); | 120 fd_log_debug(" - SCTP ......... : %s\n", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled"); |
121 #endif /* DISABLE_SCTP */ | 121 #endif /* DISABLE_SCTP */ |
122 fd_log_debug(" - Pref. proto .. : %s\n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP"); | 122 fd_log_debug(" - Pref. proto .. : %s\n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP"); |
123 fd_log_debug(" - TLS method ... : %s\n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port"); | 123 fd_log_debug(" - TLS method ... : %s\n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port"); |
124 fd_log_debug(" TLS : - Certificate .. : %s\n", fd_g_config->cnf_sec_data.cert_file ?: "(none)"); | |
125 fd_log_debug(" - Private key .. : %s\n", fd_g_config->cnf_sec_data.key_file ?: "(none)"); | |
126 fd_log_debug(" - CA ........... : %s\n", fd_g_config->cnf_sec_data.ca_file ?: "(none)"); | |
127 fd_log_debug(" - CRL .......... : %s\n", fd_g_config->cnf_sec_data.crl_file ?: "(none)"); | |
128 fd_log_debug(" - Priority ..... : %s\n", fd_g_config->cnf_sec_data.prio_string ?: "(default)"); | |
124 fd_log_debug(" Origin-State-Id ........ : %u\n", fd_g_config->cnf_orstateid); | 129 fd_log_debug(" Origin-State-Id ........ : %u\n", fd_g_config->cnf_orstateid); |
125 } | 130 } |
126 | 131 |
127 /* Parse the configuration file (using the yacc parser) */ | 132 /* Parse the configuration file (using the yacc parser) */ |
128 int fd_conf_parse() | 133 int fd_conf_parse() |
200 if (fd_g_config->cnf_flags.no_tcp && fd_g_config->cnf_flags.no_sctp) { | 205 if (fd_g_config->cnf_flags.no_tcp && fd_g_config->cnf_flags.no_sctp) { |
201 fprintf(stderr, "TCP and SCTP cannot be disabled at the same time.\n"); | 206 fprintf(stderr, "TCP and SCTP cannot be disabled at the same time.\n"); |
202 return EINVAL; | 207 return EINVAL; |
203 } | 208 } |
204 | 209 |
210 /* TLS parameters */ | |
211 CHECK_GNUTLS_DO( gnutls_certificate_allocate_credentials (&fd_g_config->cnf_sec_data.credentials), return ENOMEM ); | |
212 | |
213 CHECK_GNUTLS_DO( gnutls_dh_params_init (&fd_g_config->cnf_sec_data.dh_cache), return ENOMEM ); | |
214 | |
215 | |
205 return 0; | 216 return 0; |
206 } | 217 } |