2 // Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
16 #include "utc-connection-common.h"
17 #include "connection_extension.h"
19 #define EAP_USER_NAME "eap_user_name"
20 #define EAP_PASSPHRASE "eap_passphrase"
21 #define EAP_IDENTITY "eap_identity"
22 #define EAP_CA_CERT_FILE "eap_ca_cert_file"
23 #define EAP_CLIENT_CERT_FILE "eap_client_cert_file"
24 #define EAP_PRIVATE_KEY_FILENAME "eap_private_key_filename"
25 #define EAP_PRIVATE_KEY_PASSWD "eap_private_key_passwd"
26 #define EAP_ANONYMOUS_IDENTITY "eap_anonymous_identity"
27 #define EAP_PAC_FILENAME "eap_pac_filename"
29 void utc_connection_extension_startup(void)
31 wifi_supported = connection_check_feature_supported(FEATURE_WIFI);
32 telephony_supported = connection_check_feature_supported(FEATURE_TELEPHONY);
33 bt_tethering_supported = connection_check_feature_supported(FEATURE_BT_TETHERING);
34 ethernet_supported = connection_check_feature_supported(FEATURE_ETHERNET);
36 if (telephony_supported == false && wifi_supported == false
37 && bt_tethering_supported == false && ethernet_supported == false) {
38 all_features_not_supported = true;
42 int ret = connection_create(&connection);
43 PRINT_RETURN("connection_create", ret);
45 if (ret != CONNECTION_ERROR_NONE)
48 if (telephony_supported) {
49 if (!profile_cellular) {
50 ret = connection_profile_create(CONNECTION_PROFILE_TYPE_CELLULAR, "Net", &profile_cellular);
51 PRINT_RETURN("connection_profile_create", ret);
57 ret = connection_profile_create(CONNECTION_PROFILE_TYPE_WIFI, NULL, &profile_wifi);
58 PRINT_RETURN("connection_profile_create", ret);
64 * @function utc_connection_profile_cleanup
65 * @description Called after each test
69 void utc_connection_extension_cleanup(void)
73 if (profile_cellular) {
74 ret = connection_profile_destroy(profile_cellular);
75 PRINT_RETURN("connection_profile_destroy", ret);
76 if (ret == CONNECTION_ERROR_NONE)
77 profile_cellular = NULL;
81 ret = connection_profile_destroy(profile_wifi);
82 PRINT_RETURN("connection_profile_destroy", ret);
83 if (ret == CONNECTION_ERROR_NONE)
88 ret = connection_profile_destroy(profile_temp);
89 PRINT_RETURN("connection_profile_destroy", ret);
90 if (ret == CONNECTION_ERROR_NONE)
95 ret = connection_destroy(connection);
96 PRINT_RETURN("connection_destroy", ret);
97 if (ret == CONNECTION_ERROR_NONE)
102 int utc_connection_profile_start_tcpdump_p(void)
106 if (telephony_supported) {
107 ret = connection_profile_start_tcpdump(connection);
108 CHECK_RETURN("connection_profile_start_tcpdump", ret, CONNECTION_ERROR_NONE);
110 ret = connection_profile_start_tcpdump(connection);
111 CHECK_RETURN("connection_profile_start_tcpdump", ret, CONNECTION_ERROR_NOT_SUPPORTED);
117 int utc_connection_profile_start_tcpdump_n(void)
121 if (telephony_supported) {
122 ret = connection_profile_start_tcpdump(NULL);
123 CHECK_RETURN("connection_profile_start_tcpdump", ret, CONNECTION_ERROR_INVALID_PARAMETER);
125 ret = connection_profile_start_tcpdump(NULL);
126 CHECK_RETURN("connection_profile_start_tcpdump", ret, CONNECTION_ERROR_NOT_SUPPORTED);
132 int utc_connection_profile_stop_tcpdump_p(void)
136 if (telephony_supported) {
137 ret = connection_profile_stop_tcpdump(connection);
138 CHECK_RETURN("connection_profile_start_tcpdump", ret, CONNECTION_ERROR_NONE);
140 ret = connection_profile_stop_tcpdump(connection);
141 CHECK_RETURN("connection_profile_start_tcpdump", ret, CONNECTION_ERROR_NOT_SUPPORTED);
147 int utc_connection_profile_stop_tcpdump_n(void)
151 if (telephony_supported) {
152 ret = connection_profile_stop_tcpdump(NULL);
153 CHECK_RETURN("connection_profile_stop_tcpdump", ret, CONNECTION_ERROR_INVALID_PARAMETER);
155 ret = connection_profile_stop_tcpdump(NULL);
156 CHECK_RETURN("connection_profile_stop_tcpdump", ret, CONNECTION_ERROR_NOT_SUPPORTED);
162 int utc_connection_profile_get_tcpdump_state_p(void)
167 if (telephony_supported) {
168 ret = connection_profile_get_tcpdump_state(connection, &state);
169 CHECK_RETURN("connection_profile_get_tcpdump_state", ret, CONNECTION_ERROR_NONE);
171 ret = connection_profile_get_tcpdump_state(connection, &state);
172 CHECK_RETURN("connection_profile_get_tcpdump_state", ret, CONNECTION_ERROR_NOT_SUPPORTED);
178 int utc_connection_profile_get_tcpdump_state_n(void)
182 if (telephony_supported) {
183 ret = connection_profile_get_tcpdump_state(NULL, NULL);
184 CHECK_RETURN("connection_profile_get_tcpdump_state", ret, CONNECTION_ERROR_INVALID_PARAMETER);
186 ret = connection_profile_get_tcpdump_state(NULL, NULL);
187 CHECK_RETURN("connection_profile_get_tcpdump_state", ret, CONNECTION_ERROR_NOT_SUPPORTED);
193 int utc_connection_profile_save_ethernet_eap_config_p(void)
195 connection_profile_h profile_h = NULL;
196 int ret = test_get_any_profile(&profile_h);
198 if (!ethernet_supported) {
199 ret = connection_profile_save_ethernet_eap_config(connection, profile_temp);
200 CHECK_RETURN("connection_profile_save_ethernet_eap_config", ret, CONNECTION_ERROR_NOT_SUPPORTED);
204 profile_temp = profile_h;
206 ret = connection_profile_save_ethernet_eap_config(connection, profile_temp);
207 CHECK_RETURN("connection_profile_save_ethernet_eap_config", ret, CONNECTION_ERROR_NONE);
212 int utc_connection_profile_save_ethernet_eap_config_n(void)
216 if (telephony_supported) {
217 ret = connection_profile_save_ethernet_eap_config(NULL, NULL);
218 CHECK_RETURN("connection_profile_save_ethernet_eap_config", ret, CONNECTION_ERROR_INVALID_PARAMETER);
220 ret = connection_profile_save_ethernet_eap_config(NULL, NULL);
221 CHECK_RETURN("connection_profile_save_ethernet_eap_config", ret, CONNECTION_ERROR_NOT_SUPPORTED);
227 int utc_connection_mptcp_is_supported_p(void)
232 ret = connection_mptcp_is_supported(connection, &supported);
233 CHECK_RETURN("connection_mptcp_is_supported", ret, CONNECTION_ERROR_NONE);
238 int utc_connection_mptcp_is_supported_n(void)
242 ret = connection_mptcp_is_supported(NULL, NULL);
243 CHECK_RETURN("connection_mptcp_is_supported", ret, CONNECTION_ERROR_INVALID_PARAMETER);
248 int utc_connection_mptcp_enable_p(void)
252 ret = connection_mptcp_enable(connection, CONNECTION_MPTCP_ENABLE_ALL);
253 CHECK_RETURN("connection_mptcp_enable", ret, CONNECTION_ERROR_NONE);
258 int utc_connection_mptcp_enable_n(void)
262 ret = connection_mptcp_enable(NULL, CONNECTION_MPTCP_ENABLE_ALL);
263 CHECK_RETURN("connection_mptcp_enable", ret, CONNECTION_ERROR_INVALID_PARAMETER);
265 ret = connection_mptcp_enable(connection, CONNECTION_MPTCP_DISABLE);
266 CHECK_RETURN("connection_mptcp_enable", ret, CONNECTION_ERROR_INVALID_PARAMETER);
271 int utc_connection_mptcp_disable_p(void)
275 ret = connection_mptcp_disable(connection);
276 CHECK_RETURN("connection_mptcp_disable", ret, CONNECTION_ERROR_NONE);
281 int utc_connection_mptcp_disable_n(void)
285 ret = connection_mptcp_disable(NULL);
286 CHECK_RETURN("connection_mptcp_disable", ret, CONNECTION_ERROR_INVALID_PARAMETER);
291 int utc_connection_mptcp_get_enabled_p(void)
294 connection_mptcp_enable_e enable;
296 ret = connection_mptcp_get_enabled(connection, &enable);
297 CHECK_RETURN("connection_mptcp_get_enabled", ret, CONNECTION_ERROR_NONE);
302 int utc_connection_mptcp_get_enabled_n(void)
306 ret = connection_mptcp_get_enabled(NULL, NULL);
307 CHECK_RETURN("connection_mptcp_get_enabled", ret, CONNECTION_ERROR_INVALID_PARAMETER);
312 int utc_connection_mptcp_set_path_manager_p(void)
316 ret = connection_mptcp_set_path_manager(connection, CONNECTION_MPTCP_PM_DEFAULT);
317 CHECK_RETURN("connection_mptcp_set_path_manager", ret, CONNECTION_ERROR_NONE);
322 int utc_connection_mptcp_set_path_manager_n(void)
326 ret = connection_mptcp_set_path_manager(NULL, CONNECTION_MPTCP_PM_DEFAULT);
327 CHECK_RETURN("connection_mptcp_set_path_manager", ret, CONNECTION_ERROR_INVALID_PARAMETER);
332 int utc_connection_mptcp_get_path_manager_p(void)
335 connection_mptcp_path_manager_e pm;
337 ret = connection_mptcp_get_path_manager(connection, &pm);
338 CHECK_RETURN("connection_mptcp_get_path_manager", ret, CONNECTION_ERROR_NONE);
343 int utc_connection_mptcp_get_path_manager_n(void)
346 connection_mptcp_path_manager_e pm;
348 ret = connection_mptcp_get_path_manager(NULL, &pm);
349 CHECK_RETURN("connection_mptcp_get_path_manager", ret, CONNECTION_ERROR_INVALID_PARAMETER);
351 ret = connection_mptcp_get_path_manager(connection, NULL);
352 CHECK_RETURN("connection_mptcp_get_path_manager", ret, CONNECTION_ERROR_INVALID_PARAMETER);
357 int utc_connection_mptcp_set_scheduler_p(void)
361 ret = connection_mptcp_set_scheduler(connection, CONNECTION_MPTCP_SCHEDULER_DEFAULT);
362 CHECK_RETURN("connection_mptcp_set_scheduler", ret, CONNECTION_ERROR_NONE);
367 int utc_connection_mptcp_set_scheduler_n(void)
371 ret = connection_mptcp_set_scheduler(NULL, CONNECTION_MPTCP_SCHEDULER_DEFAULT);
372 CHECK_RETURN("connection_mptcp_set_scheduler", ret, CONNECTION_ERROR_INVALID_PARAMETER);
377 int utc_connection_mptcp_get_scheduler_p(void)
380 connection_mptcp_scheduler_e scheduler;
382 ret = connection_mptcp_get_scheduler(connection, &scheduler);
383 CHECK_RETURN("connection_mptcp_get_scheduler", ret, CONNECTION_ERROR_NONE);
388 int utc_connection_mptcp_get_scheduler_n(void)
391 connection_mptcp_scheduler_e scheduler;
393 ret = connection_mptcp_get_scheduler(NULL, &scheduler);
394 CHECK_RETURN("connection_mptcp_get_scheduler", ret, CONNECTION_ERROR_INVALID_PARAMETER);
396 ret = connection_mptcp_get_scheduler(connection, NULL);
397 CHECK_RETURN("connection_mptcp_get_scheduler", ret, CONNECTION_ERROR_INVALID_PARAMETER);
402 int utc_connection_profile_is_ethernet_eap_enabled_p(void)
407 if (all_features_not_supported) {
408 ret = connection_profile_is_ethernet_eap_enabled(NULL, NULL);
409 CHECK_RETURN("connection_profile_is_ethernet_eap_enabled", ret, CONNECTION_ERROR_NOT_SUPPORTED);
413 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
414 ret = connection_profile_is_ethernet_eap_enabled(profile_temp, &enabled);
415 CHECK_RETURN("connection_profile_is_ethernet_eap_enabled", ret, CONNECTION_ERROR_NONE);
420 int utc_connection_profile_is_ethernet_eap_enabled_n(void)
424 if (all_features_not_supported) {
425 ret = connection_profile_is_ethernet_eap_enabled(NULL, NULL);
426 CHECK_RETURN("connection_profile_is_ethernet_eap_enabled", ret, CONNECTION_ERROR_NOT_SUPPORTED);
430 ret = connection_profile_is_ethernet_eap_enabled(NULL, NULL);
431 CHECK_RETURN("connection_profile_is_ethernet_eap_enabled", ret, CONNECTION_ERROR_INVALID_PARAMETER);
436 int utc_connection_profile_enable_ethernet_eap_p(void)
440 if (all_features_not_supported) {
441 ret = connection_profile_enable_ethernet_eap(NULL, NULL);
442 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NOT_SUPPORTED);
446 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
447 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
448 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
453 int utc_connection_profile_enable_ethernet_eap_n(void)
457 if (all_features_not_supported) {
458 ret = connection_profile_enable_ethernet_eap(NULL, NULL);
459 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NOT_SUPPORTED);
463 ret = connection_profile_enable_ethernet_eap(NULL, NULL);
464 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_INVALID_PARAMETER);
469 int utc_connection_profile_set_ethernet_eap_type_p(void)
473 if (all_features_not_supported) {
474 ret = connection_profile_set_ethernet_eap_type(NULL, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
475 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NOT_SUPPORTED);
479 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
480 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
481 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
482 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
483 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
488 int utc_connection_profile_set_ethernet_eap_type_n(void)
492 if (all_features_not_supported) {
493 ret = connection_profile_set_ethernet_eap_type(NULL, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
494 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NOT_SUPPORTED);
498 ret = connection_profile_set_ethernet_eap_type(NULL, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
499 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_INVALID_PARAMETER);
504 int utc_connection_profile_get_ethernet_eap_type_p(void)
507 connection_ethernet_eap_type_e type;
509 if (all_features_not_supported) {
510 ret = connection_profile_get_ethernet_eap_type(NULL, NULL);
511 CHECK_RETURN("connection_profile_get_ethernet_eap_type", ret, CONNECTION_ERROR_NOT_SUPPORTED);
515 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
516 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
517 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
518 ret = connection_profile_get_ethernet_eap_type(profile_temp, &type);
519 CHECK_RETURN("connection_profile_get_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
524 int utc_connection_profile_get_ethernet_eap_type_n(void)
528 if (all_features_not_supported) {
529 ret = connection_profile_get_ethernet_eap_type(NULL, NULL);
530 CHECK_RETURN("connection_profile_get_ethernet_eap_type", ret, CONNECTION_ERROR_NOT_SUPPORTED);
534 ret = connection_profile_get_ethernet_eap_type(NULL, NULL);
535 CHECK_RETURN("connection_profile_get_ethernet_eap_type", ret, CONNECTION_ERROR_INVALID_PARAMETER);
540 int utc_connection_profile_set_ethernet_eap_passphrase_p(void)
544 if (all_features_not_supported) {
545 ret = connection_profile_set_ethernet_eap_passphrase(NULL, NULL, NULL);
546 CHECK_RETURN("connection_profile_set_ethernet_eap_passphrase", ret, CONNECTION_ERROR_NOT_SUPPORTED);
550 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
551 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
552 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
553 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
554 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
555 ret = connection_profile_set_ethernet_eap_passphrase(profile_temp, EAP_USER_NAME, EAP_PASSPHRASE);
556 CHECK_RETURN("connection_profile_set_ethernet_eap_passphrase", ret, CONNECTION_ERROR_INVALID_OPERATION);
557 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
558 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
559 ret = connection_profile_set_ethernet_eap_passphrase(profile_temp, EAP_USER_NAME, EAP_PASSPHRASE);
560 CHECK_RETURN("connection_profile_set_ethernet_eap_passphrase", ret, CONNECTION_ERROR_NONE);
565 int utc_connection_profile_set_ethernet_eap_passphrase_n(void)
569 if (all_features_not_supported) {
570 ret = connection_profile_set_ethernet_eap_passphrase(NULL, NULL, NULL);
571 CHECK_RETURN("connection_profile_set_ethernet_eap_passphrase", ret, CONNECTION_ERROR_NOT_SUPPORTED);
575 ret = connection_profile_set_ethernet_eap_passphrase(NULL, NULL, NULL);
576 CHECK_RETURN("connection_profile_set_ethernet_eap_passphrase", ret, CONNECTION_ERROR_INVALID_PARAMETER);
581 int utc_connection_profile_get_ethernet_eap_passphrase_p(void)
585 bool is_password_set;
587 if (all_features_not_supported) {
588 ret = connection_profile_get_ethernet_eap_passphrase(NULL, NULL, NULL);
589 CHECK_RETURN("connection_profile_get_ethernet_eap_passphrase", ret, CONNECTION_ERROR_NOT_SUPPORTED);
593 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
594 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
595 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
596 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
597 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
598 ret = connection_profile_get_ethernet_eap_passphrase(profile_temp, &user_name, &is_password_set);
599 CHECK_RETURN("connection_profile_get_ethernet_eap_passphrase", ret, CONNECTION_ERROR_INVALID_OPERATION);
600 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
601 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
602 ret = connection_profile_get_ethernet_eap_passphrase(profile_temp, &user_name, &is_password_set);
603 CHECK_RETURN("connection_profile_get_ethernet_eap_passphrase", ret, CONNECTION_ERROR_NONE);
608 int utc_connection_profile_get_ethernet_eap_passphrase_n(void)
612 if (all_features_not_supported) {
613 ret = connection_profile_get_ethernet_eap_passphrase(NULL, NULL, NULL);
614 CHECK_RETURN("connection_profile_get_ethernet_eap_passphrase", ret, CONNECTION_ERROR_NOT_SUPPORTED);
618 ret = connection_profile_get_ethernet_eap_passphrase(NULL, NULL, NULL);
619 CHECK_RETURN("connection_profile_get_ethernet_eap_passphrase", ret, CONNECTION_ERROR_INVALID_PARAMETER);
624 int utc_connection_profile_set_ethernet_eap_identity_p(void)
628 if (all_features_not_supported) {
629 ret = connection_profile_set_ethernet_eap_identity(NULL, NULL);
630 CHECK_RETURN("connection_profile_set_ethernet_eap_identity", ret, CONNECTION_ERROR_NOT_SUPPORTED);
634 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
635 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
636 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
637 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
638 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
639 ret = connection_profile_set_ethernet_eap_identity(profile_temp, EAP_IDENTITY);
640 CHECK_RETURN("connection_profile_set_ethernet_eap_identity", ret, CONNECTION_ERROR_NONE);
645 int utc_connection_profile_set_ethernet_eap_identity_n(void)
649 if (all_features_not_supported) {
650 ret = connection_profile_set_ethernet_eap_identity(NULL, NULL);
651 CHECK_RETURN("connection_profile_set_ethernet_eap_identity", ret, CONNECTION_ERROR_NOT_SUPPORTED);
655 ret = connection_profile_set_ethernet_eap_identity(NULL, NULL);
656 CHECK_RETURN("connection_profile_set_ethernet_eap_identity", ret, CONNECTION_ERROR_INVALID_PARAMETER);
661 int utc_connection_profile_get_ethernet_eap_identity_p(void)
666 if (all_features_not_supported) {
667 ret = connection_profile_get_ethernet_eap_identity(NULL, NULL);
668 CHECK_RETURN("connection_profile_get_ethernet_eap_identity", ret, CONNECTION_ERROR_NOT_SUPPORTED);
672 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
673 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
674 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
675 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
676 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
677 ret = connection_profile_get_ethernet_eap_identity(profile_temp, &identity);
678 CHECK_RETURN("connection_profile_get_ethernet_eap_identity", ret, CONNECTION_ERROR_NONE);
683 int utc_connection_profile_get_ethernet_eap_identity_n(void)
687 if (all_features_not_supported) {
688 ret = connection_profile_get_ethernet_eap_identity(NULL, NULL);
689 CHECK_RETURN("connection_profile_get_ethernet_eap_identity", ret, CONNECTION_ERROR_NOT_SUPPORTED);
693 ret = connection_profile_get_ethernet_eap_identity(NULL, NULL);
694 CHECK_RETURN("connection_profile_get_ethernet_eap_identity", ret, CONNECTION_ERROR_INVALID_PARAMETER);
699 int utc_connection_profile_set_ethernet_eap_ca_cert_file_p(void)
703 if (all_features_not_supported) {
704 ret = connection_profile_set_ethernet_eap_ca_cert_file(NULL, NULL);
705 CHECK_RETURN("connection_profile_set_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
709 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
710 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
711 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
712 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_MD5);
713 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
714 ret = connection_profile_set_ethernet_eap_ca_cert_file(profile_temp, EAP_CA_CERT_FILE);
715 CHECK_RETURN("connection_profile_set_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_INVALID_OPERATION);
716 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
717 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
718 ret = connection_profile_set_ethernet_eap_ca_cert_file(profile_temp, EAP_CA_CERT_FILE);
719 CHECK_RETURN("connection_profile_set_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_NONE);
724 int utc_connection_profile_set_ethernet_eap_ca_cert_file_n(void)
728 if (all_features_not_supported) {
729 ret = connection_profile_set_ethernet_eap_ca_cert_file(NULL, NULL);
730 CHECK_RETURN("connection_profile_set_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
734 ret = connection_profile_set_ethernet_eap_ca_cert_file(NULL, NULL);
735 CHECK_RETURN("connection_profile_set_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_INVALID_PARAMETER);
740 int utc_connection_profile_get_ethernet_eap_ca_cert_file_p(void)
745 if (all_features_not_supported) {
746 ret = connection_profile_get_ethernet_eap_ca_cert_file(NULL, NULL);
747 CHECK_RETURN("connection_profile_get_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
751 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
752 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
753 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
754 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_MD5);
755 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
756 ret = connection_profile_get_ethernet_eap_ca_cert_file(profile_temp, &file);
757 CHECK_RETURN("connection_profile_get_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_INVALID_OPERATION);
758 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
759 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
760 ret = connection_profile_get_ethernet_eap_ca_cert_file(profile_temp, &file);
761 CHECK_RETURN("connection_profile_get_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_NONE);
766 int utc_connection_profile_get_ethernet_eap_ca_cert_file_n(void)
770 if (all_features_not_supported) {
771 ret = connection_profile_get_ethernet_eap_ca_cert_file(NULL, NULL);
772 CHECK_RETURN("connection_profile_get_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
776 ret = connection_profile_get_ethernet_eap_ca_cert_file(NULL, NULL);
777 CHECK_RETURN("connection_profile_get_ethernet_eap_ca_cert_file", ret, CONNECTION_ERROR_INVALID_PARAMETER);
782 int utc_connection_profile_set_ethernet_eap_client_cert_file_p(void)
786 if (all_features_not_supported) {
787 ret = connection_profile_set_ethernet_eap_client_cert_file(NULL, NULL);
788 CHECK_RETURN("connection_profile_set_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
792 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
793 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
794 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
795 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
796 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
797 ret = connection_profile_set_ethernet_eap_client_cert_file(profile_temp, EAP_CLIENT_CERT_FILE);
798 CHECK_RETURN("connection_profile_set_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_INVALID_OPERATION);
799 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
800 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
801 ret = connection_profile_set_ethernet_eap_client_cert_file(profile_temp, EAP_CLIENT_CERT_FILE);
802 CHECK_RETURN("connection_profile_set_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_NONE);
807 int utc_connection_profile_set_ethernet_eap_client_cert_file_n(void)
811 if (all_features_not_supported) {
812 ret = connection_profile_set_ethernet_eap_client_cert_file(NULL, NULL);
813 CHECK_RETURN("connection_profile_set_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
817 ret = connection_profile_set_ethernet_eap_client_cert_file(NULL, NULL);
818 CHECK_RETURN("connection_profile_set_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_INVALID_PARAMETER);
823 int utc_connection_profile_get_ethernet_eap_client_cert_file_p(void)
828 if (all_features_not_supported) {
829 ret = connection_profile_get_ethernet_eap_client_cert_file(NULL, NULL);
830 CHECK_RETURN("connection_profile_get_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
834 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
835 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
836 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
837 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
838 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
839 ret = connection_profile_get_ethernet_eap_client_cert_file(profile_temp, &file);
840 CHECK_RETURN("connection_profile_get_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_INVALID_OPERATION);
841 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
842 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
843 ret = connection_profile_get_ethernet_eap_client_cert_file(profile_temp, &file);
844 CHECK_RETURN("connection_profile_get_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_NONE);
849 int utc_connection_profile_get_ethernet_eap_client_cert_file_n(void)
853 if (all_features_not_supported) {
854 ret = connection_profile_get_ethernet_eap_client_cert_file(NULL, NULL);
855 CHECK_RETURN("connection_profile_get_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
859 ret = connection_profile_get_ethernet_eap_client_cert_file(NULL, NULL);
860 CHECK_RETURN("connection_profile_get_ethernet_eap_client_cert_file", ret, CONNECTION_ERROR_INVALID_PARAMETER);
865 int utc_connection_profile_set_ethernet_eap_private_key_info_p(void)
869 if (all_features_not_supported) {
870 ret = connection_profile_set_ethernet_eap_private_key_info(NULL, NULL, NULL);
871 CHECK_RETURN("connection_profile_set_ethernet_eap_private_key_info", ret, CONNECTION_ERROR_NOT_SUPPORTED);
875 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
876 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
877 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
878 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
879 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
880 ret = connection_profile_set_ethernet_eap_private_key_info(profile_temp,
881 EAP_PRIVATE_KEY_FILENAME, EAP_PRIVATE_KEY_PASSWD);
882 CHECK_RETURN("connection_profile_set_ethernet_eap_private_key_info", ret, CONNECTION_ERROR_INVALID_OPERATION);
883 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
884 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
885 ret = connection_profile_set_ethernet_eap_private_key_info(profile_temp,
886 EAP_PRIVATE_KEY_FILENAME, EAP_PRIVATE_KEY_PASSWD);
887 CHECK_RETURN("connection_profile_set_ethernet_eap_private_key_info", ret, CONNECTION_ERROR_NONE);
892 int utc_connection_profile_set_ethernet_eap_private_key_info_n(void)
896 if (all_features_not_supported) {
897 ret = connection_profile_set_ethernet_eap_private_key_info(NULL, NULL, NULL);
898 CHECK_RETURN("connection_profile_set_ethernet_eap_private_key_info", ret, CONNECTION_ERROR_NOT_SUPPORTED);
902 ret = connection_profile_set_ethernet_eap_private_key_info(NULL, NULL, NULL);
903 CHECK_RETURN("connection_profile_set_ethernet_eap_private_key_info", ret, CONNECTION_ERROR_INVALID_PARAMETER);
908 int utc_connection_profile_get_ethernet_eap_private_key_file_p(void)
913 if (all_features_not_supported) {
914 ret = connection_profile_get_ethernet_eap_private_key_file(NULL, NULL);
915 CHECK_RETURN("connection_profile_get_ethernet_eap_private_key_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
919 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
920 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
921 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
922 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
923 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
924 ret = connection_profile_get_ethernet_eap_private_key_file(profile_temp, &file);
925 CHECK_RETURN("connection_profile_get_ethernet_eap_private_key_file", ret, CONNECTION_ERROR_INVALID_OPERATION);
926 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
927 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
928 ret = connection_profile_get_ethernet_eap_private_key_file(profile_temp, &file);
929 CHECK_RETURN("connection_profile_get_ethernet_eap_private_key_file", ret, CONNECTION_ERROR_NONE);
934 int utc_connection_profile_get_ethernet_eap_private_key_file_n(void)
938 if (all_features_not_supported) {
939 ret = connection_profile_get_ethernet_eap_private_key_file(NULL, NULL);
940 CHECK_RETURN("connection_profile_get_ethernet_eap_private_key_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
944 ret = connection_profile_get_ethernet_eap_private_key_file(NULL, NULL);
945 CHECK_RETURN("connection_profile_get_ethernet_eap_private_key_file", ret, CONNECTION_ERROR_INVALID_PARAMETER);
950 int utc_connection_profile_set_ethernet_eap_anonymous_identity_p(void)
954 if (all_features_not_supported) {
955 ret = connection_profile_set_ethernet_eap_anonymous_identity(NULL, NULL);
956 CHECK_RETURN("connection_profile_set_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_NOT_SUPPORTED);
960 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
961 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
962 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
963 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_MD5);
964 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
965 ret = connection_profile_set_ethernet_eap_anonymous_identity(profile_temp, EAP_ANONYMOUS_IDENTITY);
966 CHECK_RETURN("connection_profile_set_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_INVALID_OPERATION);
967 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
968 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
969 ret = connection_profile_set_ethernet_eap_anonymous_identity(profile_temp, EAP_ANONYMOUS_IDENTITY);
970 CHECK_RETURN("connection_profile_set_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_NONE);
975 int utc_connection_profile_set_ethernet_eap_anonymous_identity_n(void)
979 if (all_features_not_supported) {
980 ret = connection_profile_set_ethernet_eap_anonymous_identity(NULL, NULL);
981 CHECK_RETURN("connection_profile_set_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_NOT_SUPPORTED);
985 ret = connection_profile_set_ethernet_eap_anonymous_identity(NULL, NULL);
986 CHECK_RETURN("connection_profile_set_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_INVALID_PARAMETER);
991 int utc_connection_profile_get_ethernet_eap_anonymous_identity_p(void)
996 if (all_features_not_supported) {
997 ret = connection_profile_get_ethernet_eap_anonymous_identity(NULL, NULL);
998 CHECK_RETURN("connection_profile_get_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1002 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
1003 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
1004 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
1005 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_MD5);
1006 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1007 ret = connection_profile_get_ethernet_eap_anonymous_identity(profile_temp, &file);
1008 CHECK_RETURN("connection_profile_get_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_INVALID_OPERATION);
1009 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
1010 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1011 ret = connection_profile_get_ethernet_eap_anonymous_identity(profile_temp, &file);
1012 CHECK_RETURN("connection_profile_get_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_NONE);
1017 int utc_connection_profile_get_ethernet_eap_anonymous_identity_n(void)
1021 if (all_features_not_supported) {
1022 ret = connection_profile_get_ethernet_eap_anonymous_identity(NULL, NULL);
1023 CHECK_RETURN("connection_profile_get_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1027 ret = connection_profile_get_ethernet_eap_anonymous_identity(NULL, NULL);
1028 CHECK_RETURN("connection_profile_get_ethernet_eap_anonymous_identity", ret, CONNECTION_ERROR_INVALID_PARAMETER);
1033 int utc_connection_profile_set_ethernet_eap_pac_file_p(void)
1037 if (all_features_not_supported) {
1038 ret = connection_profile_set_ethernet_eap_pac_file(NULL, NULL);
1039 CHECK_RETURN("connection_profile_set_ethernet_eap_pac_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1043 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
1044 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
1045 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
1046 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
1047 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1048 ret = connection_profile_set_ethernet_eap_pac_file(profile_temp, EAP_PAC_FILENAME);
1049 CHECK_RETURN("connection_profile_set_ethernet_eap_pac_file", ret, CONNECTION_ERROR_INVALID_OPERATION);
1050 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_FAST);
1051 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1052 ret = connection_profile_set_ethernet_eap_pac_file(profile_temp, EAP_PAC_FILENAME);
1053 CHECK_RETURN("connection_profile_set_ethernet_eap_pac_file", ret, CONNECTION_ERROR_NONE);
1058 int utc_connection_profile_set_ethernet_eap_pac_file_n(void)
1062 if (all_features_not_supported) {
1063 ret = connection_profile_set_ethernet_eap_pac_file(NULL, NULL);
1064 CHECK_RETURN("connection_profile_set_ethernet_eap_pac_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1068 ret = connection_profile_set_ethernet_eap_pac_file(NULL, NULL);
1069 CHECK_RETURN("connection_profile_set_ethernet_eap_pac_file", ret, CONNECTION_ERROR_INVALID_PARAMETER);
1074 int utc_connection_profile_get_ethernet_eap_pac_file_p(void)
1079 if (all_features_not_supported) {
1080 ret = connection_profile_get_ethernet_eap_pac_file(NULL, NULL);
1081 CHECK_RETURN("connection_profile_get_ethernet_eap_pac_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1085 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
1086 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
1087 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
1088 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
1089 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1090 ret = connection_profile_get_ethernet_eap_pac_file(profile_temp, &file);
1091 CHECK_RETURN("connection_profile_get_ethernet_eap_pac_file", ret, CONNECTION_ERROR_INVALID_OPERATION);
1092 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_FAST);
1093 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1094 ret = connection_profile_get_ethernet_eap_pac_file(profile_temp, &file);
1095 CHECK_RETURN("connection_profile_get_ethernet_eap_pac_file", ret, CONNECTION_ERROR_NONE);
1100 int utc_connection_profile_get_ethernet_eap_pac_file_n(void)
1104 if (all_features_not_supported) {
1105 ret = connection_profile_get_ethernet_eap_pac_file(NULL, NULL);
1106 CHECK_RETURN("connection_profile_get_ethernet_eap_pac_file", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1110 ret = connection_profile_get_ethernet_eap_pac_file(NULL, NULL);
1111 CHECK_RETURN("connection_profile_get_ethernet_eap_pac_file", ret, CONNECTION_ERROR_INVALID_PARAMETER);
1116 int utc_connection_profile_set_ethernet_eap_auth_type_p(void)
1120 if (all_features_not_supported) {
1121 ret = connection_profile_set_ethernet_eap_auth_type(NULL, CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAPV2);
1122 CHECK_RETURN("connection_profile_set_ethernet_eap_auth_type", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1126 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
1127 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
1128 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
1129 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_MD5);
1130 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1131 ret = connection_profile_set_ethernet_eap_auth_type(profile_temp, CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAPV2);
1132 CHECK_RETURN("connection_profile_set_ethernet_eap_auth_type", ret, CONNECTION_ERROR_INVALID_OPERATION);
1133 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_FAST);
1134 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1135 ret = connection_profile_set_ethernet_eap_auth_type(profile_temp, CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAPV2);
1136 CHECK_RETURN("connection_profile_set_ethernet_eap_auth_type", ret, CONNECTION_ERROR_NONE);
1141 int utc_connection_profile_set_ethernet_eap_auth_type_n(void)
1145 if (all_features_not_supported) {
1146 ret = connection_profile_set_ethernet_eap_auth_type(NULL, CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAPV2);
1147 CHECK_RETURN("connection_profile_set_ethernet_eap_auth_type", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1151 ret = connection_profile_set_ethernet_eap_auth_type(NULL, CONNECTION_ETHERNET_EAP_AUTH_TYPE_MSCHAPV2);
1152 CHECK_RETURN("connection_profile_set_ethernet_eap_auth_type", ret, CONNECTION_ERROR_INVALID_PARAMETER);
1157 int utc_connection_profile_get_ethernet_eap_auth_type_p(void)
1160 connection_ethernet_eap_auth_type_e type;
1162 if (all_features_not_supported) {
1163 ret = connection_profile_get_ethernet_eap_auth_type(NULL, NULL);
1164 CHECK_RETURN("connection_profile_get_ethernet_eap_auth_type", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1168 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
1169 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
1170 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
1171 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_FAST);
1172 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1173 ret = connection_profile_get_ethernet_eap_auth_type(profile_temp, &type);
1174 CHECK_RETURN("connection_profile_get_ethernet_eap_auth_type", ret, CONNECTION_ERROR_NONE);
1179 int utc_connection_profile_get_ethernet_eap_auth_type_n(void)
1183 if (all_features_not_supported) {
1184 ret = connection_profile_get_ethernet_eap_auth_type(NULL, NULL);
1185 CHECK_RETURN("connection_profile_get_ethernet_eap_auth_type", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1189 ret = connection_profile_get_ethernet_eap_auth_type(NULL, NULL);
1190 CHECK_RETURN("connection_profile_get_ethernet_eap_auth_type", ret, CONNECTION_ERROR_INVALID_PARAMETER);
1195 int utc_connection_profile_set_ethernet_eap_peap_version_p(void)
1199 if (all_features_not_supported) {
1200 ret = connection_profile_set_ethernet_eap_peap_version(NULL, CONNECTION_ETHERNET_EAP_PEAP_VERSION_0);
1201 CHECK_RETURN("connection_profile_set_ethernet_eap_peap_version", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1205 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
1206 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
1207 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
1208 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_MD5);
1209 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1210 ret = connection_profile_set_ethernet_eap_peap_version(profile_temp, CONNECTION_ETHERNET_EAP_PEAP_VERSION_0);
1211 CHECK_RETURN("connection_profile_set_ethernet_eap_peap_version", ret, CONNECTION_ERROR_INVALID_OPERATION);
1212 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
1213 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1214 ret = connection_profile_set_ethernet_eap_peap_version(profile_temp, CONNECTION_ETHERNET_EAP_PEAP_VERSION_0);
1215 CHECK_RETURN("connection_profile_set_ethernet_eap_peap_version", ret, CONNECTION_ERROR_NONE);
1220 int utc_connection_profile_set_ethernet_eap_peap_version_n(void)
1224 if (all_features_not_supported) {
1225 ret = connection_profile_set_ethernet_eap_peap_version(NULL, CONNECTION_ETHERNET_EAP_PEAP_VERSION_0);
1226 CHECK_RETURN("connection_profile_set_ethernet_eap_peap_version", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1230 ret = connection_profile_set_ethernet_eap_peap_version(NULL, CONNECTION_ETHERNET_EAP_PEAP_VERSION_0);
1231 CHECK_RETURN("connection_profile_set_ethernet_eap_peap_version", ret, CONNECTION_ERROR_INVALID_PARAMETER);
1236 int utc_connection_profile_get_ethernet_eap_peap_version_p(void)
1239 connection_ethernet_eap_peap_version_e version;
1241 if (all_features_not_supported) {
1242 ret = connection_profile_get_ethernet_eap_peap_version(NULL, NULL);
1243 CHECK_RETURN("connection_profile_get_ethernet_eap_peap_version", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1247 test_get_profile_by_type(&profile_temp, CONNECTION_PROFILE_TYPE_ETHERNET);
1248 ret = connection_profile_enable_ethernet_eap(profile_temp, TRUE);
1249 CHECK_RETURN("connection_profile_enable_ethernet_eap", ret, CONNECTION_ERROR_NONE);
1250 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_TLS);
1251 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1252 ret = connection_profile_get_ethernet_eap_peap_version(profile_temp, &version);
1253 CHECK_RETURN("connection_profile_get_ethernet_eap_peap_version", ret, CONNECTION_ERROR_INVALID_OPERATION);
1254 ret = connection_profile_set_ethernet_eap_type(profile_temp, CONNECTION_ETHERNET_EAP_TYPE_PEAP);
1255 CHECK_RETURN("connection_profile_set_ethernet_eap_type", ret, CONNECTION_ERROR_NONE);
1256 ret = connection_profile_get_ethernet_eap_peap_version(profile_temp, &version);
1257 CHECK_RETURN("connection_profile_get_ethernet_eap_peap_version", ret, CONNECTION_ERROR_NONE);
1262 int utc_connection_profile_get_ethernet_eap_peap_version_n(void)
1266 if (all_features_not_supported) {
1267 ret = connection_profile_get_ethernet_eap_peap_version(NULL, NULL);
1268 CHECK_RETURN("connection_profile_get_ethernet_eap_peap_version", ret, CONNECTION_ERROR_NOT_SUPPORTED);
1272 ret = connection_profile_get_ethernet_eap_peap_version(NULL, NULL);
1273 CHECK_RETURN("connection_profile_get_ethernet_eap_peap_version", ret, CONNECTION_ERROR_INVALID_PARAMETER);