Lines Matching refs:opt

137 } opt;  variable
384 opt.server_name = DFL_SERVER_NAME; in main()
385 opt.server_port = DFL_SERVER_PORT; in main()
386 opt.debug_level = DFL_DEBUG_LEVEL; in main()
387 opt.authentication = DFL_AUTHENTICATION; in main()
388 opt.mode = DFL_MODE; in main()
389 opt.user_name = DFL_USER_NAME; in main()
390 opt.user_pwd = DFL_USER_PWD; in main()
391 opt.mail_from = DFL_MAIL_FROM; in main()
392 opt.mail_to = DFL_MAIL_TO; in main()
393 opt.ca_file = DFL_CA_FILE; in main()
394 opt.crt_file = DFL_CRT_FILE; in main()
395 opt.key_file = DFL_KEY_FILE; in main()
396 opt.force_ciphersuite[0] = DFL_FORCE_CIPHER; in main()
406 opt.server_name = q; in main()
408 opt.server_port = q; in main()
410 opt.debug_level = atoi(q); in main()
411 if (opt.debug_level < 0 || opt.debug_level > 65535) { in main()
415 opt.authentication = atoi(q); in main()
416 if (opt.authentication < 0 || opt.authentication > 1) { in main()
420 opt.mode = atoi(q); in main()
421 if (opt.mode < 0 || opt.mode > 1) { in main()
425 opt.user_name = q; in main()
427 opt.user_pwd = q; in main()
429 opt.mail_from = q; in main()
431 opt.mail_to = q; in main()
433 opt.ca_file = q; in main()
435 opt.crt_file = q; in main()
437 opt.key_file = q; in main()
439 opt.force_ciphersuite[0] = -1; in main()
441 opt.force_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id(q); in main()
443 if (opt.force_ciphersuite[0] <= 0) { in main()
447 opt.force_ciphersuite[1] = 0; in main()
475 if (strlen(opt.ca_file)) { in main()
476 ret = mbedtls_x509_crt_parse_file(&cacert, opt.ca_file); in main()
504 if (strlen(opt.crt_file)) { in main()
505 ret = mbedtls_x509_crt_parse_file(&clicert, opt.crt_file); in main()
516 if (strlen(opt.key_file)) { in main()
517 ret = mbedtls_pk_parse_keyfile(&pkey, opt.key_file, "", in main()
547 mbedtls_printf(" . Connecting to tcp/%s/%s...", opt.server_name, in main()
548 opt.server_port); in main()
551 if ((ret = mbedtls_net_connect(&server_fd, opt.server_name, in main()
552 opt.server_port, MBEDTLS_NET_PROTO_TCP)) != 0) { in main()
580 if (opt.force_ciphersuite[0] != DFL_FORCE_CIPHER) { in main()
581 mbedtls_ssl_conf_ciphersuites(&conf, opt.force_ciphersuite); in main()
595 if ((ret = mbedtls_ssl_set_hostname(&ssl, opt.server_name)) != 0) { in main()
604 if (opt.mode == MODE_SSL_TLS) { in main()
674 if (opt.authentication) { in main()
687 mbedtls_printf(" > Write username to server: %s", opt.user_name); in main()
690 ret = mbedtls_base64_encode(base, sizeof(base), &n, (const unsigned char *) opt.user_name, in main()
691 strlen(opt.user_name)); in main()
706 mbedtls_printf(" > Write password to server: %s", opt.user_pwd); in main()
709 ret = mbedtls_base64_encode(base, sizeof(base), &n, (const unsigned char *) opt.user_pwd, in main()
710 strlen(opt.user_pwd)); in main()
730 len = mbedtls_snprintf((char *) buf, sizeof(buf), "MAIL FROM:<%s>\r\n", opt.mail_from); in main()
746 len = mbedtls_snprintf((char *) buf, sizeof(buf), "RCPT TO:<%s>\r\n", opt.mail_to); in main()
779 "Enjoy!", opt.mail_from); in main()