Lines Matching refs:opt
554 } opt;
578 if (opt.debug_level == 0) {
608 if (opt.transport != MBEDTLS_SSL_TRANSPORT_DATAGRAM) {
631 if (opt.cid_enabled == MBEDTLS_SSL_CID_ENABLED) {
727 ret = mbedtls_snprintf((char *) buf, buf_size, GET_REQUEST, opt.request_page);
734 if (opt.request_size != DFL_REQUEST_SIZE) {
735 request_size = (size_t) opt.request_size;
744 /* Add padding to GET request to reach opt.request_size in length */
745 if (opt.request_size != DFL_REQUEST_SIZE &&
755 if (opt.request_size != DFL_REQUEST_SIZE &&
910 opt.server_name = DFL_SERVER_NAME;
911 opt.server_addr = DFL_SERVER_ADDR;
912 opt.server_port = DFL_SERVER_PORT;
913 opt.debug_level = DFL_DEBUG_LEVEL;
914 opt.cid_enabled = DFL_CID_ENABLED;
915 opt.cid_val = DFL_CID_VALUE;
916 opt.cid_enabled_renego = DFL_CID_ENABLED_RENEGO;
917 opt.cid_val_renego = DFL_CID_VALUE_RENEGO;
918 opt.nbio = DFL_NBIO;
919 opt.event = DFL_EVENT;
920 opt.context_crt_cb = DFL_CONTEXT_CRT_CB;
921 opt.read_timeout = DFL_READ_TIMEOUT;
922 opt.max_resend = DFL_MAX_RESEND;
923 opt.request_page = DFL_REQUEST_PAGE;
924 opt.request_size = DFL_REQUEST_SIZE;
925 opt.ca_file = DFL_CA_FILE;
926 opt.ca_path = DFL_CA_PATH;
927 opt.crt_file = DFL_CRT_FILE;
928 opt.key_file = DFL_KEY_FILE;
929 opt.key_opaque = DFL_KEY_OPAQUE;
930 opt.key_pwd = DFL_KEY_PWD;
931 opt.psk = DFL_PSK;
933 opt.psk_opaque = DFL_PSK_OPAQUE;
936 opt.ca_callback = DFL_CA_CALLBACK;
938 opt.psk_identity = DFL_PSK_IDENTITY;
939 opt.ecjpake_pw = DFL_ECJPAKE_PW;
941 opt.ecjpake_pw_opaque = DFL_ECJPAKE_PW_OPAQUE;
943 opt.ec_max_ops = DFL_EC_MAX_OPS;
944 opt.force_ciphersuite[0] = DFL_FORCE_CIPHER;
946 opt.tls13_kex_modes = DFL_TLS1_3_KEX_MODES;
948 opt.renegotiation = DFL_RENEGOTIATION;
949 opt.allow_legacy = DFL_ALLOW_LEGACY;
950 opt.renegotiate = DFL_RENEGOTIATE;
951 opt.exchanges = DFL_EXCHANGES;
952 opt.min_version = DFL_MIN_VERSION;
953 opt.max_version = DFL_MAX_VERSION;
954 opt.allow_sha1 = DFL_SHA1;
955 opt.auth_mode = DFL_AUTH_MODE;
956 opt.mfl_code = DFL_MFL_CODE;
957 opt.trunc_hmac = DFL_TRUNC_HMAC;
958 opt.recsplit = DFL_RECSPLIT;
959 opt.dhmlen = DFL_DHMLEN;
960 opt.reconnect = DFL_RECONNECT;
961 opt.reco_server_name = DFL_RECO_SERVER_NAME;
962 opt.reco_delay = DFL_RECO_DELAY;
963 opt.reco_mode = DFL_RECO_MODE;
964 opt.reconnect_hard = DFL_RECONNECT_HARD;
965 opt.tickets = DFL_TICKETS;
966 opt.alpn_string = DFL_ALPN_STRING;
967 opt.groups = DFL_GROUPS;
968 opt.sig_algs = DFL_SIG_ALGS;
970 opt.early_data = DFL_EARLY_DATA;
972 opt.transport = DFL_TRANSPORT;
973 opt.hs_to_min = DFL_HS_TO_MIN;
974 opt.hs_to_max = DFL_HS_TO_MAX;
975 opt.dtls_mtu = DFL_DTLS_MTU;
976 opt.fallback = DFL_FALLBACK;
977 opt.extended_ms = DFL_EXTENDED_MS;
978 opt.etm = DFL_ETM;
979 opt.dgram_packing = DFL_DGRAM_PACKING;
980 opt.serialize = DFL_SERIALIZE;
981 opt.context_file = DFL_CONTEXT_FILE;
982 opt.eap_tls = DFL_EAP_TLS;
983 opt.reproducible = DFL_REPRODUCIBLE;
984 opt.nss_keylog = DFL_NSS_KEYLOG;
985 opt.nss_keylog_file = DFL_NSS_KEYLOG_FILE;
986 opt.skip_close_notify = DFL_SKIP_CLOSE_NOTIFY;
987 opt.query_config_mode = DFL_QUERY_CONFIG_MODE;
988 opt.use_srtp = DFL_USE_SRTP;
989 opt.force_srtp_profile = DFL_SRTP_FORCE_PROFILE;
990 opt.mki = DFL_SRTP_MKI;
991 opt.key_opaque_alg1 = DFL_KEY_OPAQUE_ALG;
992 opt.key_opaque_alg2 = DFL_KEY_OPAQUE_ALG;
1047 opt.server_name = q;
1049 opt.server_addr = q;
1051 opt.server_port = q;
1055 opt.transport = MBEDTLS_SSL_TRANSPORT_STREAM;
1057 opt.transport = MBEDTLS_SSL_TRANSPORT_DATAGRAM;
1062 opt.debug_level = atoi(q);
1063 if (opt.debug_level < 0 || opt.debug_level > 65535) {
1074 opt.context_crt_cb = atoi(q);
1075 if (opt.context_crt_cb != 0 && opt.context_crt_cb != 1) {
1079 opt.nbio = atoi(q);
1080 if (opt.nbio < 0 || opt.nbio > 2) {
1084 opt.event = atoi(q);
1085 if (opt.event < 0 || opt.event > 2) {
1089 opt.read_timeout = atoi(q);
1091 opt.max_resend = atoi(q);
1092 if (opt.max_resend < 0) {
1096 opt.request_page = q;
1098 opt.request_size = atoi(q);
1099 if (opt.request_size < 0 ||
1100 opt.request_size > MAX_REQUEST_SIZE) {
1104 opt.ca_file = q;
1106 opt.ca_path = q;
1108 opt.crt_file = q;
1110 opt.key_file = q;
1112 opt.key_pwd = q;
1116 opt.key_opaque = atoi(q);
1121 opt.cid_enabled = atoi(q);
1122 if (opt.cid_enabled != 0 && opt.cid_enabled != 1) {
1126 opt.cid_enabled_renego = atoi(q);
1127 if (opt.cid_enabled_renego != 0 && opt.cid_enabled_renego != 1) {
1131 opt.cid_val = q;
1133 opt.cid_val_renego = q;
1137 opt.psk = q;
1141 opt.psk_opaque = atoi(q);
1146 opt.ca_callback = atoi(q);
1150 opt.psk_identity = q;
1152 opt.ecjpake_pw = q;
1156 opt.ecjpake_pw_opaque = atoi(q);
1160 opt.ec_max_ops = atoi(q);
1162 opt.force_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id(q);
1164 if (opt.force_ciphersuite[0] == 0) {
1168 opt.force_ciphersuite[1] = 0;
1170 opt.renegotiation = (atoi(q)) ?
1176 opt.allow_legacy = MBEDTLS_SSL_LEGACY_BREAK_HANDSHAKE;
1179 opt.allow_legacy = MBEDTLS_SSL_LEGACY_NO_RENEGOTIATION;
1182 opt.allow_legacy = MBEDTLS_SSL_LEGACY_ALLOW_RENEGOTIATION;
1187 opt.renegotiate = atoi(q);
1188 if (opt.renegotiate < 0 || opt.renegotiate > 1) {
1192 opt.exchanges = atoi(q);
1193 if (opt.exchanges < 1) {
1197 opt.reconnect = atoi(q);
1198 if (opt.reconnect < 0 || opt.reconnect > 2) {
1202 opt.reco_server_name = q;
1204 opt.reco_delay = atoi(q);
1205 if (opt.reco_delay < 0) {
1209 opt.reco_mode = atoi(q);
1210 if (opt.reco_mode < 0) {
1214 opt.reconnect_hard = atoi(q);
1215 if (opt.reconnect_hard < 0 || opt.reconnect_hard > 1) {
1219 opt.tickets = atoi(q);
1220 if (opt.tickets < 0) {
1224 opt.alpn_string = q;
1228 opt.extended_ms = MBEDTLS_SSL_EXTENDED_MS_DISABLED;
1231 opt.extended_ms = MBEDTLS_SSL_EXTENDED_MS_ENABLED;
1236 opt.groups = q;
1240 opt.sig_algs = q;
1245 case 0: opt.etm = MBEDTLS_SSL_ETM_DISABLED; break;
1246 case 1: opt.etm = MBEDTLS_SSL_ETM_ENABLED; break;
1256 opt.early_data = MBEDTLS_SSL_EARLY_DATA_DISABLED;
1259 opt.early_data = MBEDTLS_SSL_EARLY_DATA_ENABLED;
1268 opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK;
1270 opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL;
1272 opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL;
1274 opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ALL;
1276 opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ALL;
1278 opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_ALL;
1280 opt.tls13_kex_modes = MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK |
1290 opt.min_version = MBEDTLS_SSL_VERSION_TLS1_2;
1294 opt.min_version = MBEDTLS_SSL_VERSION_TLS1_3;
1303 opt.max_version = MBEDTLS_SSL_VERSION_TLS1_2;
1307 opt.max_version = MBEDTLS_SSL_VERSION_TLS1_3;
1315 case 0: opt.allow_sha1 = 0; break;
1316 case 1: opt.allow_sha1 = 1; break;
1321 opt.min_version = MBEDTLS_SSL_VERSION_TLS1_2;
1322 opt.max_version = MBEDTLS_SSL_VERSION_TLS1_2;
1324 opt.min_version = MBEDTLS_SSL_VERSION_TLS1_2;
1325 opt.max_version = MBEDTLS_SSL_VERSION_TLS1_2;
1326 opt.transport = MBEDTLS_SSL_TRANSPORT_DATAGRAM;
1330 opt.min_version = MBEDTLS_SSL_VERSION_TLS1_3;
1331 opt.max_version = MBEDTLS_SSL_VERSION_TLS1_3;
1339 opt.auth_mode = MBEDTLS_SSL_VERIFY_NONE;
1341 opt.auth_mode = MBEDTLS_SSL_VERIFY_OPTIONAL;
1343 opt.auth_mode = MBEDTLS_SSL_VERIFY_REQUIRED;
1349 opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_512;
1351 opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_1024;
1353 opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_2048;
1355 opt.mfl_code = MBEDTLS_SSL_MAX_FRAG_LEN_4096;
1361 case 0: opt.trunc_hmac = MBEDTLS_SSL_TRUNC_HMAC_DISABLED; break;
1362 case 1: opt.trunc_hmac = MBEDTLS_SSL_TRUNC_HMAC_ENABLED; break;
1370 opt.hs_to_min = atoi(q);
1371 opt.hs_to_max = atoi(p);
1372 if (opt.hs_to_min == 0 || opt.hs_to_max < opt.hs_to_min) {
1376 opt.dtls_mtu = atoi(q);
1377 if (opt.dtls_mtu < 0) {
1381 opt.dgram_packing = atoi(q);
1382 if (opt.dgram_packing != 0 &&
1383 opt.dgram_packing != 1) {
1387 opt.recsplit = atoi(q);
1388 if (opt.recsplit < 0 || opt.recsplit > 1) {
1392 opt.dhmlen = atoi(q);
1393 if (opt.dhmlen < 0) {
1397 opt.query_config_mode = 1;
1401 opt.serialize = atoi(q);
1402 if (opt.serialize < 0 || opt.serialize > 2) {
1406 opt.context_file = q;
1408 opt.eap_tls = atoi(q);
1409 if (opt.eap_tls < 0 || opt.eap_tls > 1) {
1413 opt.reproducible = 1;
1415 opt.nss_keylog = atoi(q);
1416 if (opt.nss_keylog < 0 || opt.nss_keylog > 1) {
1420 opt.nss_keylog_file = q;
1422 opt.skip_close_notify = atoi(q);
1423 if (opt.skip_close_notify < 0 || opt.skip_close_notify > 1) {
1427 opt.use_srtp = atoi(q);
1429 opt.force_srtp_profile = atoi(q);
1431 opt.mki = q;
1433 if (key_opaque_alg_parse(q, &opt.key_opaque_alg1,
1434 &opt.key_opaque_alg2) != 0) {
1446 if (opt.nss_keylog != 0 && opt.eap_tls != 0) {
1454 if (opt.event == 1 && opt.nbio != 1) {
1456 opt.nbio = 1;
1460 mbedtls_debug_set_threshold(opt.debug_level);
1467 if (strlen(opt.psk)) {
1469 opt.psk, &psk_len) != 0) {
1477 if (opt.psk_opaque != 0) {
1478 if (opt.psk == NULL) {
1484 if (opt.force_ciphersuite[0] <= 0) {
1493 if (opt.force_ciphersuite[0] > 0) {
1496 mbedtls_ssl_ciphersuite_from_id(opt.force_ciphersuite[0]);
1498 if (opt.max_version != -1 &&
1499 ciphersuite_info->min_tls_version > opt.max_version) {
1504 if (opt.min_version != -1 &&
1505 ciphersuite_info->max_tls_version < opt.min_version) {
1513 if (opt.max_version == -1 ||
1514 opt.max_version > ciphersuite_info->max_tls_version) {
1515 opt.max_version = ciphersuite_info->max_tls_version;
1517 if (opt.min_version < ciphersuite_info->min_tls_version) {
1518 opt.min_version = ciphersuite_info->min_tls_version;
1520 if (opt.transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM &&
1521 opt.min_version < MBEDTLS_SSL_VERSION_TLS1_2) {
1522 opt.min_version = MBEDTLS_SSL_VERSION_TLS1_2;
1528 if (opt.psk_opaque != 0) {
1543 opt.cid_val, &cid_len) != 0) {
1550 if (opt.cid_enabled_renego == DFL_CID_ENABLED_RENEGO) {
1551 opt.cid_enabled_renego = opt.cid_enabled;
1553 if (opt.cid_val_renego == DFL_CID_VALUE_RENEGO) {
1554 opt.cid_val_renego = opt.cid_val;
1558 opt.cid_val_renego, &cid_renego_len) != 0) {
1564 if (opt.groups != NULL) {
1565 if (parse_groups(opt.groups, group_list, GROUP_LIST_SIZE) != 0) {
1571 if (opt.sig_algs != NULL) {
1572 p = (char *) opt.sig_algs;
1638 if (opt.alpn_string != NULL) {
1639 p = (char *) opt.alpn_string;
1666 ret = rng_seed(&rng, opt.reproducible, pers);
1679 if (strcmp(opt.ca_path, "none") == 0 ||
1680 strcmp(opt.ca_file, "none") == 0) {
1684 if (strlen(opt.ca_path)) {
1685 ret = mbedtls_x509_crt_parse_path(&cacert, opt.ca_path);
1686 } else if (strlen(opt.ca_file)) {
1687 ret = mbedtls_x509_crt_parse_file(&cacert, opt.ca_file);
1728 if (strcmp(opt.crt_file, "none") == 0) {
1732 if (strlen(opt.crt_file)) {
1733 ret = mbedtls_x509_crt_parse_file(&clicert, opt.crt_file);
1745 if (strcmp(opt.key_file, "none") == 0) {
1749 if (strlen(opt.key_file)) {
1750 ret = mbedtls_pk_parse_keyfile(&pkey, opt.key_file, opt.key_pwd, rng_get, &rng);
1763 if (opt.key_opaque != 0) {
1767 if (key_opaque_set_alg_usage(opt.key_opaque_alg1,
1768 opt.key_opaque_alg2,
1784 strlen(opt.key_file) || strlen(opt.key_opaque_alg1) ?
1796 opt.transport,
1806 if (opt.allow_sha1 > 0) {
1811 if (opt.context_crt_cb == 0) {
1819 if (opt.cid_enabled == 1 || opt.cid_enabled_renego == 1) {
1820 if (opt.cid_enabled == 1 &&
1821 opt.cid_enabled_renego == 1 &&
1827 if (opt.cid_enabled == 1) {
1843 if (opt.auth_mode != DFL_AUTH_MODE) {
1844 mbedtls_ssl_conf_authmode(&conf, opt.auth_mode);
1848 if (opt.hs_to_min != DFL_HS_TO_MIN || opt.hs_to_max != DFL_HS_TO_MAX) {
1849 mbedtls_ssl_conf_handshake_timeout(&conf, opt.hs_to_min,
1850 opt.hs_to_max);
1853 if (opt.dgram_packing != DFL_DGRAM_PACKING) {
1854 mbedtls_ssl_set_datagram_packing(&ssl, opt.dgram_packing);
1859 if ((ret = mbedtls_ssl_conf_max_frag_len(&conf, opt.mfl_code)) != 0) {
1868 { opt.force_srtp_profile, MBEDTLS_TLS_SRTP_UNSET };
1869 if (opt.use_srtp == 1) {
1870 if (opt.force_srtp_profile != 0) {
1883 } else if (opt.force_srtp_profile != 0) {
1890 if (opt.extended_ms != DFL_EXTENDED_MS) {
1891 mbedtls_ssl_conf_extended_master_secret(&conf, opt.extended_ms);
1896 if (opt.etm != DFL_ETM) {
1897 mbedtls_ssl_conf_encrypt_then_mac(&conf, opt.etm);
1902 if (opt.dhmlen != DFL_DHMLEN) {
1903 mbedtls_ssl_conf_dhm_min_bitlen(&conf, opt.dhmlen);
1908 if (opt.alpn_string != NULL) {
1917 if (opt.reproducible) {
1929 mbedtls_ssl_conf_read_timeout(&conf, opt.read_timeout);
1932 mbedtls_ssl_conf_session_tickets(&conf, opt.tickets);
1935 if (opt.force_ciphersuite[0] != DFL_FORCE_CIPHER) {
1936 mbedtls_ssl_conf_ciphersuites(&conf, opt.force_ciphersuite);
1940 mbedtls_ssl_conf_tls13_key_exchange_modes(&conf, opt.tls13_kex_modes);
1943 if (opt.allow_legacy != DFL_ALLOW_LEGACY) {
1944 mbedtls_ssl_conf_legacy_renegotiation(&conf, opt.allow_legacy);
1947 mbedtls_ssl_conf_renegotiation(&conf, opt.renegotiation);
1951 if (strcmp(opt.ca_path, "none") != 0 &&
1952 strcmp(opt.ca_file, "none") != 0) {
1954 if (opt.ca_callback != 0) {
1960 if (strcmp(opt.crt_file, "none") != 0 &&
1961 strcmp(opt.key_file, "none") != 0) {
1973 if (opt.groups != NULL &&
1974 strcmp(opt.groups, "default") != 0) {
1980 if (opt.sig_algs != NULL) {
1987 if (opt.psk_opaque != 0) {
2000 (const unsigned char *) opt.psk_identity,
2001 strlen(opt.psk_identity))) != 0) {
2010 (const unsigned char *) opt.psk_identity,
2011 strlen(opt.psk_identity));
2019 if (opt.min_version != DFL_MIN_VERSION) {
2020 mbedtls_ssl_conf_min_tls_version(&conf, opt.min_version);
2023 if (opt.max_version != DFL_MAX_VERSION) {
2024 mbedtls_ssl_conf_max_tls_version(&conf, opt.max_version);
2028 if (opt.early_data != DFL_EARLY_DATA) {
2029 mbedtls_ssl_conf_early_data(&conf, opt.early_data);
2039 if (opt.eap_tls != 0) {
2042 } else if (opt.nss_keylog != 0) {
2048 else if (opt.use_srtp != 0) {
2055 if ((ret = mbedtls_ssl_set_hostname(&ssl, opt.server_name)) != 0) {
2063 if (opt.ecjpake_pw != DFL_ECJPAKE_PW) {
2065 if (opt.ecjpake_pw_opaque != DFL_ECJPAKE_PW_OPAQUE) {
2073 (const unsigned char *) opt.ecjpake_pw,
2074 strlen(opt.ecjpake_pw),
2093 (const unsigned char *) opt.ecjpake_pw,
2094 strlen(opt.ecjpake_pw))) != 0) {
2104 if (opt.context_crt_cb == 1) {
2112 opt.nbio == 0 ? recv_timeout_cb : NULL);
2115 if (opt.transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) {
2116 if ((ret = mbedtls_ssl_set_cid(&ssl, opt.cid_enabled,
2126 if (opt.dtls_mtu != DFL_DTLS_MTU) {
2127 mbedtls_ssl_set_mtu(&ssl, opt.dtls_mtu);
2137 if (opt.ec_max_ops != DFL_EC_MAX_OPS) {
2138 mbedtls_ecp_set_max_ops(opt.ec_max_ops);
2143 if (opt.use_srtp != 0 && strlen(opt.mki) != 0) {
2145 opt.mki, &mki_len) != 0) {
2152 (uint16_t) strlen(opt.mki) / 2)) != 0) {
2164 if (opt.server_addr == NULL) {
2165 opt.server_addr = opt.server_name;
2169 opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ? "tcp" : "udp",
2170 opt.server_addr, opt.server_port);
2174 opt.server_addr, opt.server_port,
2175 opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ?
2182 if (opt.nbio > 0) {
2230 if (opt.event == 1 /* level triggered IO */) {
2270 if (opt.alpn_string != NULL) {
2277 if (opt.eap_tls != 0) {
2325 else if (opt.use_srtp != 0) {
2380 if (opt.reconnect != 0 && ssl.tls_version != MBEDTLS_SSL_VERSION_TLS1_3) {
2384 if (opt.reco_mode == 1) {
2402 if (opt.reco_mode == 1) {
2438 if (opt.transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM) {
2439 if ((ret = mbedtls_ssl_set_cid(&ssl, opt.cid_enabled_renego,
2450 if (opt.renegotiate) {
2473 if (opt.event == 1 /* level triggered IO */) {
2496 retry_left = opt.max_resend;
2506 if (opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM) {
2522 if (opt.event == 1 /* level triggered IO */) {
2550 if (opt.event == 1 /* level triggered IO */) {
2583 opt.request_size = DFL_REQUEST_SIZE;
2594 if (opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM) {
2612 if (opt.event == 1 /* level triggered IO */) {
2643 if (opt.reconnect != 0) {
2647 if (opt.reco_mode == 1) {
2667 if (opt.reco_mode == 1) {
2716 if (opt.event == 1 /* level triggered IO */) {
2756 if (opt.reconnect_hard != 0) {
2757 opt.reconnect_hard = 0;
2782 if (opt.event == 1 /* level triggered IO */) {
2800 if (opt.serialize != 0) {
2831 /* Save serialized context to the 'opt.context_file' as a base64 code */
2832 if (0 < strlen(opt.context_file)) {
2855 if ((b64_file = fopen(opt.context_file, "w")) == NULL) {
2857 opt.context_file);
2876 if (opt.serialize == 1) {
2881 if (opt.serialize == 2) {
2894 if (opt.nbio == 2) {
2900 opt.nbio == 0 ? mbedtls_net_recv_timeout : NULL);
2933 if (--opt.exchanges > 0) {
2954 * ssl-opt.sh, avoided by enabling skip_close_notify client-side.
2956 if (opt.skip_close_notify == 0) {
2970 if (opt.reconnect != 0) {
2971 --opt.reconnect;
2976 if (opt.reco_delay > 0) {
2977 mbedtls_net_usleep(1000 * opt.reco_delay);
2993 if (opt.reco_mode == 1) {
3010 if (opt.reco_server_name != NULL &&
3012 opt.reco_server_name)) != 0) {
3020 opt.server_addr, opt.server_port,
3021 opt.transport == MBEDTLS_SSL_TRANSPORT_STREAM ?
3028 if (opt.nbio > 0) {
3063 if (opt.event == 1 /* level triggered IO */) {
3142 if (opt.psk_opaque != 0) {
3149 (opt.query_config_mode == DFL_QUERY_CONFIG_MODE)) {
3167 if ((opt.ecjpake_pw_opaque != DFL_ECJPAKE_PW_OPAQUE)) {
3224 if (opt.query_config_mode == DFL_QUERY_CONFIG_MODE) {