Lines Matching defs:opt
87 } opt;
168 opt.mode = DFL_MODE;
169 opt.filename = DFL_FILENAME;
170 opt.ca_file = DFL_CA_FILE;
171 opt.crl_file = DFL_CRL_FILE;
172 opt.ca_path = DFL_CA_PATH;
173 opt.server_name = DFL_SERVER_NAME;
174 opt.server_port = DFL_SERVER_PORT;
175 opt.debug_level = DFL_DEBUG_LEVEL;
176 opt.permissive = DFL_PERMISSIVE;
193 opt.mode = MODE_FILE;
195 opt.mode = MODE_SSL;
200 opt.filename = q;
202 opt.ca_file = q;
204 opt.crl_file = q;
206 opt.ca_path = q;
208 opt.server_name = q;
210 opt.server_port = q;
212 opt.debug_level = atoi(q);
213 if (opt.debug_level < 0 || opt.debug_level > 65535) {
217 opt.permissive = atoi(q);
218 if (opt.permissive < 0 || opt.permissive > 1) {
232 if (strlen(opt.ca_path)) {
233 if ((ret = mbedtls_x509_crt_parse_path(&cacert, opt.ca_path)) < 0) {
240 } else if (strlen(opt.ca_file)) {
241 if ((ret = mbedtls_x509_crt_parse_file(&cacert, opt.ca_file)) < 0) {
253 if (strlen(opt.crl_file)) {
254 if ((ret = mbedtls_x509_crl_parse_file(&cacrl, opt.crl_file)) != 0) {
264 if (opt.mode == MODE_FILE) {
275 ret = mbedtls_x509_crt_parse_file(&crt, opt.filename);
283 if (opt.permissive == 0 && ret > 0) {
332 } else if (opt.mode == MODE_SSL) {
349 mbedtls_debug_set_threshold(opt.debug_level);
355 mbedtls_printf(" . SSL connection to tcp/%s/%s...", opt.server_name,
356 opt.server_port);
359 if ((ret = mbedtls_net_connect(&server_fd, opt.server_name,
360 opt.server_port, MBEDTLS_NET_PROTO_TCP)) != 0) {
392 if ((ret = mbedtls_ssl_set_hostname(&ssl, opt.server_name)) != 0) {