Lines Matching refs:opt
155 } opt; variable
397 opt.server_name = DFL_SERVER_NAME; in main()
398 opt.server_port = DFL_SERVER_PORT; in main()
399 opt.debug_level = DFL_DEBUG_LEVEL; in main()
400 opt.authentication = DFL_AUTHENTICATION; in main()
401 opt.mode = DFL_MODE; in main()
402 opt.user_name = DFL_USER_NAME; in main()
403 opt.user_pwd = DFL_USER_PWD; in main()
404 opt.mail_from = DFL_MAIL_FROM; in main()
405 opt.mail_to = DFL_MAIL_TO; in main()
406 opt.ca_file = DFL_CA_FILE; in main()
407 opt.crt_file = DFL_CRT_FILE; in main()
408 opt.key_file = DFL_KEY_FILE; in main()
409 opt.force_ciphersuite[0]= DFL_FORCE_CIPHER; in main()
419 opt.server_name = q; in main()
421 opt.server_port = q; in main()
424 opt.debug_level = atoi( q ); in main()
425 if( opt.debug_level < 0 || opt.debug_level > 65535 ) in main()
430 opt.authentication = atoi( q ); in main()
431 if( opt.authentication < 0 || opt.authentication > 1 ) in main()
436 opt.mode = atoi( q ); in main()
437 if( opt.mode < 0 || opt.mode > 1 ) in main()
441 opt.user_name = q; in main()
443 opt.user_pwd = q; in main()
445 opt.mail_from = q; in main()
447 opt.mail_to = q; in main()
449 opt.ca_file = q; in main()
451 opt.crt_file = q; in main()
453 opt.key_file = q; in main()
456 opt.force_ciphersuite[0] = -1; in main()
458 opt.force_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id( q ); in main()
460 if( opt.force_ciphersuite[0] <= 0 ) in main()
463 opt.force_ciphersuite[1] = 0; in main()
493 if( strlen( opt.ca_file ) ) in main()
494 ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file ); in main()
523 if( strlen( opt.crt_file ) ) in main()
524 ret = mbedtls_x509_crt_parse_file( &clicert, opt.crt_file ); in main()
543 if( strlen( opt.key_file ) ) in main()
544 ret = mbedtls_pk_parse_keyfile( &pkey, opt.key_file, "" ); in main()
567 mbedtls_printf( " . Connecting to tcp/%s/%s...", opt.server_name, in main()
568 opt.server_port ); in main()
571 if( ( ret = mbedtls_net_connect( &server_fd, opt.server_name, in main()
572 opt.server_port, MBEDTLS_NET_PROTO_TCP ) ) != 0 ) in main()
602 if( opt.force_ciphersuite[0] != DFL_FORCE_CIPHER ) in main()
603 mbedtls_ssl_conf_ciphersuites( &conf, opt.force_ciphersuite ); in main()
618 if( ( ret = mbedtls_ssl_set_hostname( &ssl, opt.server_name ) ) != 0 ) in main()
628 if( opt.mode == MODE_SSL_TLS ) in main()
704 if( opt.authentication ) in main()
719 mbedtls_printf( " > Write username to server: %s", opt.user_name ); in main()
722 … ret = mbedtls_base64_encode( base, sizeof( base ), &n, (const unsigned char *) opt.user_name, in main()
723 strlen( opt.user_name ) ); in main()
739 mbedtls_printf( " > Write password to server: %s", opt.user_pwd ); in main()
742 ret = mbedtls_base64_encode( base, sizeof( base ), &n, (const unsigned char *) opt.user_pwd, in main()
743 strlen( opt.user_pwd ) ); in main()
764 len = sprintf( (char *) buf, "MAIL FROM:<%s>\r\n", opt.mail_from ); in main()
777 len = sprintf( (char *) buf, "RCPT TO:<%s>\r\n", opt.mail_to ); in main()
807 "Enjoy!", opt.mail_from ); in main()