[UTC][NFC][Non-ACR][Fix TC logic for manufacturer security issue]
authorjh8801.jung <jh8801.jung@samsung.com>
Wed, 16 Aug 2017 12:24:43 +0000 (21:24 +0900)
committerJihun Park <jihun87.park@samsung.com>
Thu, 17 Aug 2017 01:56:34 +0000 (01:56 +0000)
Signed-off-by: jh8801.jung <jh8801.jung@samsung.com>
Change-Id: Ia0e5fd0b0508fccceec97d6dc6175516b5ea2769

src/utc/nfc/utc-network-nfc-hce.c
src/utc/nfc/utc-network-nfc.c

index 19d262397b5f0c7d0877b848026206afbea3ab03..b20f2a67ea3c7e8bac8aa3a9fbb427931f3813f4 100755 (executable)
@@ -146,6 +146,9 @@ int utc_nfc_manager_unset_hce_event_cb_n(void)
 /**
  * @testcase           utc_nfc_se_set_default_route_p
  * @since_tizen                2.3
+ * @remarks            This API can return a security error depending on the security level of the manufacturer.
+ *                     If you want to know about security level in detail, See the GSMA specification.\n
+ *                     (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
  * @description                
  */
 int utc_nfc_se_set_default_route_p(void)
@@ -157,7 +160,8 @@ int utc_nfc_se_set_default_route_p(void)
                assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
        }
        else{
-               assert_eq(ret, NFC_ERROR_NONE);
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
        }
 
        return 0;
index 9b24efd6dabc57dc2a9c5be3c71827d68ff864c5..2ffd5ba788586b5fc64d6f11986489fa67177a7a 100755 (executable)
@@ -1588,6 +1588,9 @@ void utc_ce_cleanup(void)
 /**
  * @testcase           utc_nfc_se_enable_card_emulation_p
  * @since_tizen                2.3
+ * @remarks             This API can return a security error depending on the security level of the manufacturer.
+ *                      If you want to know about security level in detail, See the GSMA specification.\n
+ *                      (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
  * @description                
  */
 int utc_nfc_se_enable_card_emulation_p(void)
@@ -1599,7 +1602,9 @@ int utc_nfc_se_enable_card_emulation_p(void)
        if(!nfc_supported){
                assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
        }else{
-               assert(ret == NFC_ERROR_NONE || ret == NFC_ERROR_ILLEGAL_STATE);
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_ILLEGAL_STATE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
        }
 
        return 0;
@@ -1629,6 +1634,9 @@ int utc_nfc_se_enable_card_emulation_n(void)
 /**
  * @testcase           utc_nfc_se_disable_card_emulation_p
  * @since_tizen                2.3
+ * @remarks             This API can return a security error depending on the security level of the manufacturer.
+ *                      If you want to know about security level in detail, See the GSMA specification.\n
+ *                      (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
  * @description                
  */
 int utc_nfc_se_disable_card_emulation_p(void)
@@ -1640,7 +1648,8 @@ int utc_nfc_se_disable_card_emulation_p(void)
        if(!nfc_supported){
                assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
        }else{
-               assert_eq(ret, NFC_ERROR_NONE);
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
        }
 
        return 0;
@@ -2014,6 +2023,9 @@ int utc_nfc_manager_unset_se_transaction_event_cb_n(void)
 /**
  * @testcase           utc_nfc_manager_enable_transaction_fg_dispatch_p
  * @since_tizen                2.3
+ * @remarks             This API can return a security error depending on the security level of the manufacturer.
+ *                      If you want to know about security level in detail, See the GSMA specification.\n
+ *                      (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
  * @description                
  */
 int utc_nfc_manager_enable_transaction_fg_dispatch_p(void)
@@ -2025,7 +2037,9 @@ int utc_nfc_manager_enable_transaction_fg_dispatch_p(void)
        if(!nfc_supported){
                assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
        }else{
-               assert(ret == NFC_ERROR_NONE || ret == NFC_ERROR_ILLEGAL_STATE);
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_ILLEGAL_STATE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
        }
 
        return 0;
@@ -2055,6 +2069,9 @@ int utc_nfc_manager_enable_transaction_fg_dispatch_n(void)
 /**
  * @testcase           utc_nfc_manager_disable_transaction_fg_dispatch_p
  * @since_tizen                2.3
+ * @remarks             This API can return a security error depending on the security level of the manufacturer.
+ *                      If you want to know about security level in detail, See the GSMA specification.\n
+ *                      (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
  * @description                
  */
 int utc_nfc_manager_disable_transaction_fg_dispatch_p(void)
@@ -2066,7 +2083,8 @@ int utc_nfc_manager_disable_transaction_fg_dispatch_p(void)
        if(!nfc_supported){
                assert_eq(ret, NFC_ERROR_NOT_SUPPORTED);
        }else{
-          assert_eq(ret, NFC_ERROR_NONE);
+               assert(ret == NFC_ERROR_NONE
+                       || ret == NFC_ERROR_SECURITY_RESTRICTED);
        }
 
        return 0;