cryptoservices/certificateandkeymgmt/tcertstore/scripts/cancel2.script
changeset 8 35751d3474b7
child 19 ece3df019add
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 //
       
     2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the License "Symbian Foundation License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 
       
    17 START_TESTCASE                SEC-CERTMAN-CANCEL2-0001
       
    18 
       
    19 //! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0001
       
    20 
       
    21 //! @SYMTestCaseDesc          Cancel2.txt
       
    22 
       
    23 //!                           Cancellation tests for the certificate addition, deletion, trust&application setting with notification
       
    24 
       
    25 //!                           to the client process.
       
    26 
       
    27 //!                           
       
    28 
       
    29 //!                           Note: The in-source test tag is only added to the new tests for PREQ226. The tests without test tag is the existing tests
       
    30 
       
    31 //!                           in the certstore component, which are used to set up the environment needed by the PREQ226 tests.
       
    32 
       
    33 //!                           
       
    34 
       
    35 //!                           Setup ///////////////////////////////////////////////////////////////////////
       
    36 
       
    37 //! @SYMTestActions           1) No Test,Opening a CertificateAppInfoManager
       
    38 
       
    39 //!                           2) No Test,Adding client A1
       
    40 
       
    41 //!                           3) No Test,Adding client A2
       
    42 
       
    43 //!                           4) No Test,Adding client A3
       
    44 
       
    45 //!                           5) No Test,Adding client A4
       
    46 
       
    47 //!                           6) No Test,Deleting the CertificateAppInfoManager
       
    48 
       
    49 //!                           7) Import a RSA key rsacertkey1
       
    50 
       
    51 //!                           8) Opening a writable certificate store manager
       
    52 
       
    53 //!                           9) Deleting all certs
       
    54 
       
    55 //!                           10) Deleting the writable certificate store manager
       
    56 
       
    57 //!                           11) Enabling cancellation testing
       
    58 
       
    59 RUN_TEST_STEP                 -1    CTestHandler        initappmanager      
       
    60 
       
    61 RUN_TEST_STEP                 -1    CTestHandler        addclient              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-002
       
    62 
       
    63 RUN_TEST_STEP                 -1    CTestHandler        addclient              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-003
       
    64 
       
    65 RUN_TEST_STEP                 -1    CTestHandler        addclient              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-004
       
    66 
       
    67 RUN_TEST_STEP                 -1    CTestHandler        addclient              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-005
       
    68 
       
    69 RUN_TEST_STEP                 -1    CTestHandler        deleteappmanager    
       
    70 
       
    71 RUN_TEST_STEP                 -1    CTestHandler        importkey              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-007
       
    72 
       
    73 RUN_TEST_STEP                 -1    CTestHandler        init                   cancel2.ini   SEC-CERTMAN-CANCEL2-0001-008
       
    74 
       
    75 RUN_TEST_STEP                 -1    CTestHandler        deletecert             cancel2.ini   SEC-CERTMAN-CANCEL2-0001-009
       
    76 
       
    77 RUN_TEST_STEP                 -1    CTestHandler        delete              
       
    78 
       
    79 RUN_TEST_STEP                 -1    CTestHandler        startcancellation   
       
    80 
       
    81 END_TESTCASE                  SEC-CERTMAN-CANCEL2-0001
       
    82 
       
    83 
       
    84 
       
    85 
       
    86 
       
    87 START_TESTCASE                SEC-CERTMAN-CANCEL2-0002
       
    88 
       
    89 //! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0002
       
    90 
       
    91 //! @SYMTestCaseDesc          Initialisation //////////////////////////////////////////////////////////////
       
    92 
       
    93 //! @SYMTestActions           1) Opening a writable certificate store manager
       
    94 
       
    95 RUN_TEST_STEP                 -1    CTestHandler        init                   cancel2.ini   SEC-CERTMAN-CANCEL2-0002-001
       
    96 
       
    97 END_TESTCASE                  SEC-CERTMAN-CANCEL2-0002
       
    98 
       
    99 
       
   100 
       
   101 
       
   102 
       
   103 // Add certs ///////////////////////////////////////////////////////////////////
       
   104 
       
   105 
       
   106 
       
   107 START_TESTCASE                UCTSSEC-CT-WMODEUCTADDCCANCELWN1.1
       
   108 
       
   109 //! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTADDCCANCELWN1.1
       
   110 
       
   111 //! @file                     
       
   112 
       
   113 //! @SYMTestCaseDesc          The test is to test cancellation of X509 CA certificate addition with notification.
       
   114 
       
   115 //! @SYMPREQ                  226
       
   116 
       
   117 //! @SYMTestCasePriority      High
       
   118 
       
   119 //! @SYMTestExpectedResults   KErrNone
       
   120 
       
   121 //! @SYMTestActions           1) 1.1, Cancel X509 CA certificate CAX1 addition with notification
       
   122 
       
   123 RUN_TEST_STEP                 -1    CTestHandler        addcert                cancel2.ini   UCTSSEC-CT-WMODEUCTADDCCANCELWN1.1-001
       
   124 
       
   125 END_TESTCASE                  UCTSSEC-CT-WMODEUCTADDCCANCELWN1.1
       
   126 
       
   127 
       
   128 
       
   129 
       
   130 
       
   131 START_TESTCASE                UCTSSEC-CT-WMODEUCTADDCCANCELWN1.2
       
   132 
       
   133 //! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTADDCCANCELWN1.2
       
   134 
       
   135 //! @file                     
       
   136 
       
   137 //! @SYMTestCaseDesc          The test is to test cancellation of WTLS CA certificate addition with notification.
       
   138 
       
   139 //! @SYMPREQ                  226
       
   140 
       
   141 //! @SYMTestCasePriority      High
       
   142 
       
   143 //! @SYMTestExpectedResults   KErrNone
       
   144 
       
   145 //! @SYMTestActions           1) 1.2, Cancel WTLS CA certificate CAW1 addition with notification
       
   146 
       
   147 RUN_TEST_STEP                 -1    CTestHandler        addcert                cancel2.ini   UCTSSEC-CT-WMODEUCTADDCCANCELWN1.2-001
       
   148 
       
   149 END_TESTCASE                  UCTSSEC-CT-WMODEUCTADDCCANCELWN1.2
       
   150 
       
   151 
       
   152 
       
   153 
       
   154 
       
   155 START_TESTCASE                UCTSSEC-CT-WMODEUCTADDCCANCELWN1.3
       
   156 
       
   157 //! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTADDCCANCELWN1.3
       
   158 
       
   159 //! @file                     
       
   160 
       
   161 //! @SYMTestCaseDesc          The test is to test cancellation of X509 user certificate addition with notification.
       
   162 
       
   163 //! @SYMPREQ                  226
       
   164 
       
   165 //! @SYMTestCasePriority      High
       
   166 
       
   167 //! @SYMTestExpectedResults   KErrNone
       
   168 
       
   169 //! @SYMTestActions           1) 1.3, Cancel X509 user certificate rsacert1 addition with notification
       
   170 
       
   171 RUN_TEST_STEP                 -1    CTestHandler        addcert                cancel2.ini   UCTSSEC-CT-WMODEUCTADDCCANCELWN1.3-001
       
   172 
       
   173 END_TESTCASE                  UCTSSEC-CT-WMODEUCTADDCCANCELWN1.3
       
   174 
       
   175 
       
   176 
       
   177 
       
   178 
       
   179 START_TESTCASE                SEC-CERTMAN-CANCEL2-0006
       
   180 
       
   181 //! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0006
       
   182 
       
   183 //! @SYMTestCaseDesc          List certs //////////////////////////////////////////////////////////////////
       
   184 
       
   185 //! @SYMTestActions           1) List CA certificates
       
   186 
       
   187 //!                           2) List user certificates
       
   188 
       
   189 //!                           3) List user certificates filtered by key usage
       
   190 
       
   191 //!                           4) List user certificates filtered by key usage
       
   192 
       
   193 //!                           5) List certificates filtered by Issuer DN
       
   194 
       
   195 //!                           6) List certificates filtered by Issuer DN
       
   196 
       
   197 //!                           7) List certificates filtered by Issuer DN
       
   198 
       
   199 RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-001
       
   200 
       
   201 RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-002
       
   202 
       
   203 RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-003
       
   204 
       
   205 RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-004
       
   206 
       
   207 RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-005
       
   208 
       
   209 RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-006
       
   210 
       
   211 RUN_TEST_STEP                 -1    CTestHandler        listcacert             cancel2.ini   SEC-CERTMAN-CANCEL2-0006-007
       
   212 
       
   213 END_TESTCASE                  SEC-CERTMAN-CANCEL2-0006
       
   214 
       
   215 
       
   216 
       
   217 
       
   218 
       
   219 START_TESTCASE                SEC-CERTMAN-CANCEL2-0007
       
   220 
       
   221 //! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0007
       
   222 
       
   223 //! @SYMTestCaseDesc          Retrieve certs
       
   224 
       
   225 //! @SYMTestActions           1) Retrieve CAX1 cert
       
   226 
       
   227 //!                           2) Retrieve CAW1 cert
       
   228 
       
   229 RUN_TEST_STEP                 -1    CTestHandler        retrieve               cancel2.ini   SEC-CERTMAN-CANCEL2-0007-001
       
   230 
       
   231 RUN_TEST_STEP                 -1    CTestHandler        retrieve               cancel2.ini   SEC-CERTMAN-CANCEL2-0007-002
       
   232 
       
   233 END_TESTCASE                  SEC-CERTMAN-CANCEL2-0007
       
   234 
       
   235 
       
   236 
       
   237 
       
   238 
       
   239 // Applications and trust //////////////////////////////////////////////////////
       
   240 
       
   241 
       
   242 
       
   243 START_TESTCASE                UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1
       
   244 
       
   245 //! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1
       
   246 
       
   247 //! @file                     
       
   248 
       
   249 //! @SYMTestCaseDesc          The test is to test cancellation of setting X509 CA certificate application with notification.
       
   250 
       
   251 //! @SYMPREQ                  226
       
   252 
       
   253 //! @SYMTestCasePriority      High
       
   254 
       
   255 //! @SYMTestExpectedResults   KErrNone
       
   256 
       
   257 //! @SYMTestActions           1) 4.1 Cancel applications setting to the CAX1 certificate with notification
       
   258 
       
   259 //!                           2) Get applications for CAX1
       
   260 
       
   261 RUN_TEST_STEP                 -1    CTestHandler        setapplications        cancel2.ini   UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1-001
       
   262 
       
   263 RUN_TEST_STEP                 -1    CTestHandler        getapplications        cancel2.ini   UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1-002
       
   264 
       
   265 END_TESTCASE                  UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1
       
   266 
       
   267 
       
   268 
       
   269 
       
   270 
       
   271 START_TESTCASE                UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1
       
   272 
       
   273 //! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1
       
   274 
       
   275 //! @file                     
       
   276 
       
   277 //! @SYMTestCaseDesc          The test is to test cancellation of setting X509 CA certificates trust with notification.
       
   278 
       
   279 //! @SYMPREQ                  226
       
   280 
       
   281 //! @SYMTestCasePriority      High
       
   282 
       
   283 //! @SYMTestExpectedResults   KErrNone
       
   284 
       
   285 //! @SYMTestActions           1) 3.1, Cancel the trust setting for CAX1 with notification
       
   286 
       
   287 //!                           2) Get the trust for CAX1
       
   288 
       
   289 RUN_TEST_STEP                 -1    CTestHandler        settrust               cancel2.ini   UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1-001
       
   290 
       
   291 RUN_TEST_STEP                 -1    CTestHandler        gettrusters            cancel2.ini   UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1-002
       
   292 
       
   293 END_TESTCASE                  UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1
       
   294 
       
   295 
       
   296 
       
   297 
       
   298 
       
   299 // Delete certs ////////////////////////////////////////////////////////////////
       
   300 
       
   301 
       
   302 
       
   303 START_TESTCASE                UCTSSEC-CT-WMODEUCTDELCCANCELWN2.1
       
   304 
       
   305 //! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTDELCCANCELWN2.1
       
   306 
       
   307 //! @file                     
       
   308 
       
   309 //! @SYMTestCaseDesc          The test is to test cancellation of X509 CA certificates deletion with notification.
       
   310 
       
   311 //! @SYMPREQ                  226
       
   312 
       
   313 //! @SYMTestCasePriority      High
       
   314 
       
   315 //! @SYMTestExpectedResults   KErrNone
       
   316 
       
   317 //! @SYMTestActions           1) 2.1, Cancel CAX1 certs deletion with notification
       
   318 
       
   319 RUN_TEST_STEP                 -1    CTestHandler        deletecert             cancel2.ini   UCTSSEC-CT-WMODEUCTDELCCANCELWN2.1-001
       
   320 
       
   321 END_TESTCASE                  UCTSSEC-CT-WMODEUCTDELCCANCELWN2.1
       
   322 
       
   323 
       
   324 
       
   325 
       
   326 
       
   327 START_TESTCASE                SEC-CERTMAN-CANCEL2-0011
       
   328 
       
   329 //! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0011
       
   330 
       
   331 //! @SYMTestCaseDesc          Cleanup /////////////////////////////////////////////////////////////////////
       
   332 
       
   333 //! @SYMTestActions           1) Disabling cancellation testing
       
   334 
       
   335 //!                           2) Deleting all certs
       
   336 
       
   337 //!                           3) Deleting the writable certificate store manager
       
   338 
       
   339 //!                           4) No Test,Opening a CertificateAppInfoManager
       
   340 
       
   341 //!                           5) No Test,Deleting the client A1
       
   342 
       
   343 //!                           6) No Test,Deleting the client A2
       
   344 
       
   345 //!                           7) No Test,Deleting the client A3
       
   346 
       
   347 //!                           8) No Test,Deleting the client A4
       
   348 
       
   349 //!                           9) No Test,Deleting the CertificateAppInfoManager
       
   350 
       
   351 RUN_TEST_STEP                 -1    CTestHandler        stopcancellation    
       
   352 
       
   353 RUN_TEST_STEP                 -1    CTestHandler        deletecert             cancel2.ini   SEC-CERTMAN-CANCEL2-0011-002
       
   354 
       
   355 RUN_TEST_STEP                 -1    CTestHandler        delete              
       
   356 
       
   357 RUN_TEST_STEP                 -1    CTestHandler        initappmanager      
       
   358 
       
   359 RUN_TEST_STEP                 -1    CTestHandler        removeclient           cancel2.ini   SEC-CERTMAN-CANCEL2-0011-005
       
   360 
       
   361 RUN_TEST_STEP                 -1    CTestHandler        removeclient           cancel2.ini   SEC-CERTMAN-CANCEL2-0011-006
       
   362 
       
   363 RUN_TEST_STEP                 -1    CTestHandler        removeclient           cancel2.ini   SEC-CERTMAN-CANCEL2-0011-007
       
   364 
       
   365 RUN_TEST_STEP                 -1    CTestHandler        removeclient           cancel2.ini   SEC-CERTMAN-CANCEL2-0011-008
       
   366 
       
   367 RUN_TEST_STEP                 -1    CTestHandler        deleteappmanager    
       
   368 
       
   369 END_TESTCASE                  SEC-CERTMAN-CANCEL2-0011
       
   370 
       
   371 
       
   372 
       
   373 
       
   374