Lines Matching refs:opt
160 } opt; variable
415 opt.server_name = DFL_SERVER_NAME; in main()
416 opt.server_port = DFL_SERVER_PORT; in main()
417 opt.debug_level = DFL_DEBUG_LEVEL; in main()
418 opt.authentication = DFL_AUTHENTICATION; in main()
419 opt.mode = DFL_MODE; in main()
420 opt.user_name = DFL_USER_NAME; in main()
421 opt.user_pwd = DFL_USER_PWD; in main()
422 opt.mail_from = DFL_MAIL_FROM; in main()
423 opt.mail_to = DFL_MAIL_TO; in main()
424 opt.ca_file = DFL_CA_FILE; in main()
425 opt.crt_file = DFL_CRT_FILE; in main()
426 opt.key_file = DFL_KEY_FILE; in main()
427 opt.force_ciphersuite[0]= DFL_FORCE_CIPHER; in main()
437 opt.server_name = q; in main()
439 opt.server_port = q; in main()
442 opt.debug_level = atoi( q ); in main()
443 if( opt.debug_level < 0 || opt.debug_level > 65535 ) in main()
448 opt.authentication = atoi( q ); in main()
449 if( opt.authentication < 0 || opt.authentication > 1 ) in main()
454 opt.mode = atoi( q ); in main()
455 if( opt.mode < 0 || opt.mode > 1 ) in main()
459 opt.user_name = q; in main()
461 opt.user_pwd = q; in main()
463 opt.mail_from = q; in main()
465 opt.mail_to = q; in main()
467 opt.ca_file = q; in main()
469 opt.crt_file = q; in main()
471 opt.key_file = q; in main()
474 opt.force_ciphersuite[0] = -1; in main()
476 opt.force_ciphersuite[0] = mbedtls_ssl_get_ciphersuite_id( q ); in main()
478 if( opt.force_ciphersuite[0] <= 0 ) in main()
481 opt.force_ciphersuite[1] = 0; in main()
511 if( strlen( opt.ca_file ) ) in main()
512 ret = mbedtls_x509_crt_parse_file( &cacert, opt.ca_file ); in main()
541 if( strlen( opt.crt_file ) ) in main()
542 ret = mbedtls_x509_crt_parse_file( &clicert, opt.crt_file ); in main()
554 if( strlen( opt.key_file ) ) in main()
556 ret = mbedtls_pk_parse_keyfile( &pkey, opt.key_file, "", in main()
583 mbedtls_printf( " . Connecting to tcp/%s/%s...", opt.server_name, in main()
584 opt.server_port ); in main()
587 if( ( ret = mbedtls_net_connect( &server_fd, opt.server_name, in main()
588 opt.server_port, MBEDTLS_NET_PROTO_TCP ) ) != 0 ) in main()
618 if( opt.force_ciphersuite[0] != DFL_FORCE_CIPHER ) in main()
619 mbedtls_ssl_conf_ciphersuites( &conf, opt.force_ciphersuite ); in main()
634 if( ( ret = mbedtls_ssl_set_hostname( &ssl, opt.server_name ) ) != 0 ) in main()
644 if( opt.mode == MODE_SSL_TLS ) in main()
720 if( opt.authentication ) in main()
735 mbedtls_printf( " > Write username to server: %s", opt.user_name ); in main()
738 … ret = mbedtls_base64_encode( base, sizeof( base ), &n, (const unsigned char *) opt.user_name, in main()
739 strlen( opt.user_name ) ); in main()
755 mbedtls_printf( " > Write password to server: %s", opt.user_pwd ); in main()
758 ret = mbedtls_base64_encode( base, sizeof( base ), &n, (const unsigned char *) opt.user_pwd, in main()
759 strlen( opt.user_pwd ) ); in main()
780 len = sprintf( (char *) buf, "MAIL FROM:<%s>\r\n", opt.mail_from ); in main()
793 len = sprintf( (char *) buf, "RCPT TO:<%s>\r\n", opt.mail_to ); in main()
823 "Enjoy!", opt.mail_from ); in main()