os/security/cryptoservices/certificateandkeymgmt/tcertstore/scripts/cancel2.script
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/cryptoservices/certificateandkeymgmt/tcertstore/scripts/cancel2.script	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,374 @@
     1.4 +//
     1.5 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Eclipse Public License v1.0"
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description: 
    1.18 +//
    1.19 +
    1.20 +START_TESTCASE                SEC-CERTMAN-CANCEL2-0001
    1.21 +
    1.22 +//! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0001
    1.23 +
    1.24 +//! @SYMTestCaseDesc          Cancel2.txt
    1.25 +
    1.26 +//!                           Cancellation tests for the certificate addition, deletion, trust&application setting with notification
    1.27 +
    1.28 +//!                           to the client process.
    1.29 +
    1.30 +//!                           
    1.31 +
    1.32 +//!                           Note: The in-source test tag is only added to the new tests for PREQ226. The tests without test tag is the existing tests
    1.33 +
    1.34 +//!                           in the certstore component, which are used to set up the environment needed by the PREQ226 tests.
    1.35 +
    1.36 +//!                           
    1.37 +
    1.38 +//!                           Setup ///////////////////////////////////////////////////////////////////////
    1.39 +
    1.40 +//! @SYMTestActions           1) No Test,Opening a CertificateAppInfoManager
    1.41 +
    1.42 +//!                           2) No Test,Adding client A1
    1.43 +
    1.44 +//!                           3) No Test,Adding client A2
    1.45 +
    1.46 +//!                           4) No Test,Adding client A3
    1.47 +
    1.48 +//!                           5) No Test,Adding client A4
    1.49 +
    1.50 +//!                           6) No Test,Deleting the CertificateAppInfoManager
    1.51 +
    1.52 +//!                           7) Import a RSA key rsacertkey1
    1.53 +
    1.54 +//!                           8) Opening a writable certificate store manager
    1.55 +
    1.56 +//!                           9) Deleting all certs
    1.57 +
    1.58 +//!                           10) Deleting the writable certificate store manager
    1.59 +
    1.60 +//!                           11) Enabling cancellation testing
    1.61 +
    1.62 +RUN_TEST_STEP                 -1    CTestHandler        initappmanager      
    1.63 +
    1.64 +RUN_TEST_STEP                 -1    CTestHandler        addclient              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-002
    1.65 +
    1.66 +RUN_TEST_STEP                 -1    CTestHandler        addclient              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-003
    1.67 +
    1.68 +RUN_TEST_STEP                 -1    CTestHandler        addclient              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-004
    1.69 +
    1.70 +RUN_TEST_STEP                 -1    CTestHandler        addclient              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-005
    1.71 +
    1.72 +RUN_TEST_STEP                 -1    CTestHandler        deleteappmanager    
    1.73 +
    1.74 +RUN_TEST_STEP                 -1    CTestHandler        importkey              cancel2.ini   SEC-CERTMAN-CANCEL2-0001-007
    1.75 +
    1.76 +RUN_TEST_STEP                 -1    CTestHandler        init                   cancel2.ini   SEC-CERTMAN-CANCEL2-0001-008
    1.77 +
    1.78 +RUN_TEST_STEP                 -1    CTestHandler        deletecert             cancel2.ini   SEC-CERTMAN-CANCEL2-0001-009
    1.79 +
    1.80 +RUN_TEST_STEP                 -1    CTestHandler        delete              
    1.81 +
    1.82 +RUN_TEST_STEP                 -1    CTestHandler        startcancellation   
    1.83 +
    1.84 +END_TESTCASE                  SEC-CERTMAN-CANCEL2-0001
    1.85 +
    1.86 +
    1.87 +
    1.88 +
    1.89 +
    1.90 +START_TESTCASE                SEC-CERTMAN-CANCEL2-0002
    1.91 +
    1.92 +//! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0002
    1.93 +
    1.94 +//! @SYMTestCaseDesc          Initialisation //////////////////////////////////////////////////////////////
    1.95 +
    1.96 +//! @SYMTestActions           1) Opening a writable certificate store manager
    1.97 +
    1.98 +RUN_TEST_STEP                 -1    CTestHandler        init                   cancel2.ini   SEC-CERTMAN-CANCEL2-0002-001
    1.99 +
   1.100 +END_TESTCASE                  SEC-CERTMAN-CANCEL2-0002
   1.101 +
   1.102 +
   1.103 +
   1.104 +
   1.105 +
   1.106 +// Add certs ///////////////////////////////////////////////////////////////////
   1.107 +
   1.108 +
   1.109 +
   1.110 +START_TESTCASE                UCTSSEC-CT-WMODEUCTADDCCANCELWN1.1
   1.111 +
   1.112 +//! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTADDCCANCELWN1.1
   1.113 +
   1.114 +//! @file                     
   1.115 +
   1.116 +//! @SYMTestCaseDesc          The test is to test cancellation of X509 CA certificate addition with notification.
   1.117 +
   1.118 +//! @SYMPREQ                  226
   1.119 +
   1.120 +//! @SYMTestCasePriority      High
   1.121 +
   1.122 +//! @SYMTestExpectedResults   KErrNone
   1.123 +
   1.124 +//! @SYMTestActions           1) 1.1, Cancel X509 CA certificate CAX1 addition with notification
   1.125 +
   1.126 +RUN_TEST_STEP                 -1    CTestHandler        addcert                cancel2.ini   UCTSSEC-CT-WMODEUCTADDCCANCELWN1.1-001
   1.127 +
   1.128 +END_TESTCASE                  UCTSSEC-CT-WMODEUCTADDCCANCELWN1.1
   1.129 +
   1.130 +
   1.131 +
   1.132 +
   1.133 +
   1.134 +START_TESTCASE                UCTSSEC-CT-WMODEUCTADDCCANCELWN1.2
   1.135 +
   1.136 +//! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTADDCCANCELWN1.2
   1.137 +
   1.138 +//! @file                     
   1.139 +
   1.140 +//! @SYMTestCaseDesc          The test is to test cancellation of WTLS CA certificate addition with notification.
   1.141 +
   1.142 +//! @SYMPREQ                  226
   1.143 +
   1.144 +//! @SYMTestCasePriority      High
   1.145 +
   1.146 +//! @SYMTestExpectedResults   KErrNone
   1.147 +
   1.148 +//! @SYMTestActions           1) 1.2, Cancel WTLS CA certificate CAW1 addition with notification
   1.149 +
   1.150 +RUN_TEST_STEP                 -1    CTestHandler        addcert                cancel2.ini   UCTSSEC-CT-WMODEUCTADDCCANCELWN1.2-001
   1.151 +
   1.152 +END_TESTCASE                  UCTSSEC-CT-WMODEUCTADDCCANCELWN1.2
   1.153 +
   1.154 +
   1.155 +
   1.156 +
   1.157 +
   1.158 +START_TESTCASE                UCTSSEC-CT-WMODEUCTADDCCANCELWN1.3
   1.159 +
   1.160 +//! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTADDCCANCELWN1.3
   1.161 +
   1.162 +//! @file                     
   1.163 +
   1.164 +//! @SYMTestCaseDesc          The test is to test cancellation of X509 user certificate addition with notification.
   1.165 +
   1.166 +//! @SYMPREQ                  226
   1.167 +
   1.168 +//! @SYMTestCasePriority      High
   1.169 +
   1.170 +//! @SYMTestExpectedResults   KErrNone
   1.171 +
   1.172 +//! @SYMTestActions           1) 1.3, Cancel X509 user certificate rsacert1 addition with notification
   1.173 +
   1.174 +RUN_TEST_STEP                 -1    CTestHandler        addcert                cancel2.ini   UCTSSEC-CT-WMODEUCTADDCCANCELWN1.3-001
   1.175 +
   1.176 +END_TESTCASE                  UCTSSEC-CT-WMODEUCTADDCCANCELWN1.3
   1.177 +
   1.178 +
   1.179 +
   1.180 +
   1.181 +
   1.182 +START_TESTCASE                SEC-CERTMAN-CANCEL2-0006
   1.183 +
   1.184 +//! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0006
   1.185 +
   1.186 +//! @SYMTestCaseDesc          List certs //////////////////////////////////////////////////////////////////
   1.187 +
   1.188 +//! @SYMTestActions           1) List CA certificates
   1.189 +
   1.190 +//!                           2) List user certificates
   1.191 +
   1.192 +//!                           3) List user certificates filtered by key usage
   1.193 +
   1.194 +//!                           4) List user certificates filtered by key usage
   1.195 +
   1.196 +//!                           5) List certificates filtered by Issuer DN
   1.197 +
   1.198 +//!                           6) List certificates filtered by Issuer DN
   1.199 +
   1.200 +//!                           7) List certificates filtered by Issuer DN
   1.201 +
   1.202 +RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-001
   1.203 +
   1.204 +RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-002
   1.205 +
   1.206 +RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-003
   1.207 +
   1.208 +RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-004
   1.209 +
   1.210 +RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-005
   1.211 +
   1.212 +RUN_TEST_STEP                 -1    CTestHandler        listcert               cancel2.ini   SEC-CERTMAN-CANCEL2-0006-006
   1.213 +
   1.214 +RUN_TEST_STEP                 -1    CTestHandler        listcacert             cancel2.ini   SEC-CERTMAN-CANCEL2-0006-007
   1.215 +
   1.216 +END_TESTCASE                  SEC-CERTMAN-CANCEL2-0006
   1.217 +
   1.218 +
   1.219 +
   1.220 +
   1.221 +
   1.222 +START_TESTCASE                SEC-CERTMAN-CANCEL2-0007
   1.223 +
   1.224 +//! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0007
   1.225 +
   1.226 +//! @SYMTestCaseDesc          Retrieve certs
   1.227 +
   1.228 +//! @SYMTestActions           1) Retrieve CAX1 cert
   1.229 +
   1.230 +//!                           2) Retrieve CAW1 cert
   1.231 +
   1.232 +RUN_TEST_STEP                 -1    CTestHandler        retrieve               cancel2.ini   SEC-CERTMAN-CANCEL2-0007-001
   1.233 +
   1.234 +RUN_TEST_STEP                 -1    CTestHandler        retrieve               cancel2.ini   SEC-CERTMAN-CANCEL2-0007-002
   1.235 +
   1.236 +END_TESTCASE                  SEC-CERTMAN-CANCEL2-0007
   1.237 +
   1.238 +
   1.239 +
   1.240 +
   1.241 +
   1.242 +// Applications and trust //////////////////////////////////////////////////////
   1.243 +
   1.244 +
   1.245 +
   1.246 +START_TESTCASE                UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1
   1.247 +
   1.248 +//! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1
   1.249 +
   1.250 +//! @file                     
   1.251 +
   1.252 +//! @SYMTestCaseDesc          The test is to test cancellation of setting X509 CA certificate application with notification.
   1.253 +
   1.254 +//! @SYMPREQ                  226
   1.255 +
   1.256 +//! @SYMTestCasePriority      High
   1.257 +
   1.258 +//! @SYMTestExpectedResults   KErrNone
   1.259 +
   1.260 +//! @SYMTestActions           1) 4.1 Cancel applications setting to the CAX1 certificate with notification
   1.261 +
   1.262 +//!                           2) Get applications for CAX1
   1.263 +
   1.264 +RUN_TEST_STEP                 -1    CTestHandler        setapplications        cancel2.ini   UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1-001
   1.265 +
   1.266 +RUN_TEST_STEP                 -1    CTestHandler        getapplications        cancel2.ini   UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1-002
   1.267 +
   1.268 +END_TESTCASE                  UCTSSEC-CT-WMODEUCTSAPPCCANCELWN4.1
   1.269 +
   1.270 +
   1.271 +
   1.272 +
   1.273 +
   1.274 +START_TESTCASE                UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1
   1.275 +
   1.276 +//! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1
   1.277 +
   1.278 +//! @file                     
   1.279 +
   1.280 +//! @SYMTestCaseDesc          The test is to test cancellation of setting X509 CA certificates trust with notification.
   1.281 +
   1.282 +//! @SYMPREQ                  226
   1.283 +
   1.284 +//! @SYMTestCasePriority      High
   1.285 +
   1.286 +//! @SYMTestExpectedResults   KErrNone
   1.287 +
   1.288 +//! @SYMTestActions           1) 3.1, Cancel the trust setting for CAX1 with notification
   1.289 +
   1.290 +//!                           2) Get the trust for CAX1
   1.291 +
   1.292 +RUN_TEST_STEP                 -1    CTestHandler        settrust               cancel2.ini   UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1-001
   1.293 +
   1.294 +RUN_TEST_STEP                 -1    CTestHandler        gettrusters            cancel2.ini   UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1-002
   1.295 +
   1.296 +END_TESTCASE                  UCTSSEC-CT-WMODEUCTSTRUSTCCANCELWN3.1
   1.297 +
   1.298 +
   1.299 +
   1.300 +
   1.301 +
   1.302 +// Delete certs ////////////////////////////////////////////////////////////////
   1.303 +
   1.304 +
   1.305 +
   1.306 +START_TESTCASE                UCTSSEC-CT-WMODEUCTDELCCANCELWN2.1
   1.307 +
   1.308 +//! @SYMTestCaseID            UCTSSEC-CT-WMODEUCTDELCCANCELWN2.1
   1.309 +
   1.310 +//! @file                     
   1.311 +
   1.312 +//! @SYMTestCaseDesc          The test is to test cancellation of X509 CA certificates deletion with notification.
   1.313 +
   1.314 +//! @SYMPREQ                  226
   1.315 +
   1.316 +//! @SYMTestCasePriority      High
   1.317 +
   1.318 +//! @SYMTestExpectedResults   KErrNone
   1.319 +
   1.320 +//! @SYMTestActions           1) 2.1, Cancel CAX1 certs deletion with notification
   1.321 +
   1.322 +RUN_TEST_STEP                 -1    CTestHandler        deletecert             cancel2.ini   UCTSSEC-CT-WMODEUCTDELCCANCELWN2.1-001
   1.323 +
   1.324 +END_TESTCASE                  UCTSSEC-CT-WMODEUCTDELCCANCELWN2.1
   1.325 +
   1.326 +
   1.327 +
   1.328 +
   1.329 +
   1.330 +START_TESTCASE                SEC-CERTMAN-CANCEL2-0011
   1.331 +
   1.332 +//! @SYMTestCaseID            SEC-CERTMAN-CANCEL2-0011
   1.333 +
   1.334 +//! @SYMTestCaseDesc          Cleanup /////////////////////////////////////////////////////////////////////
   1.335 +
   1.336 +//! @SYMTestActions           1) Disabling cancellation testing
   1.337 +
   1.338 +//!                           2) Deleting all certs
   1.339 +
   1.340 +//!                           3) Deleting the writable certificate store manager
   1.341 +
   1.342 +//!                           4) No Test,Opening a CertificateAppInfoManager
   1.343 +
   1.344 +//!                           5) No Test,Deleting the client A1
   1.345 +
   1.346 +//!                           6) No Test,Deleting the client A2
   1.347 +
   1.348 +//!                           7) No Test,Deleting the client A3
   1.349 +
   1.350 +//!                           8) No Test,Deleting the client A4
   1.351 +
   1.352 +//!                           9) No Test,Deleting the CertificateAppInfoManager
   1.353 +
   1.354 +RUN_TEST_STEP                 -1    CTestHandler        stopcancellation    
   1.355 +
   1.356 +RUN_TEST_STEP                 -1    CTestHandler        deletecert             cancel2.ini   SEC-CERTMAN-CANCEL2-0011-002
   1.357 +
   1.358 +RUN_TEST_STEP                 -1    CTestHandler        delete              
   1.359 +
   1.360 +RUN_TEST_STEP                 -1    CTestHandler        initappmanager      
   1.361 +
   1.362 +RUN_TEST_STEP                 -1    CTestHandler        removeclient           cancel2.ini   SEC-CERTMAN-CANCEL2-0011-005
   1.363 +
   1.364 +RUN_TEST_STEP                 -1    CTestHandler        removeclient           cancel2.ini   SEC-CERTMAN-CANCEL2-0011-006
   1.365 +
   1.366 +RUN_TEST_STEP                 -1    CTestHandler        removeclient           cancel2.ini   SEC-CERTMAN-CANCEL2-0011-007
   1.367 +
   1.368 +RUN_TEST_STEP                 -1    CTestHandler        removeclient           cancel2.ini   SEC-CERTMAN-CANCEL2-0011-008
   1.369 +
   1.370 +RUN_TEST_STEP                 -1    CTestHandler        deleteappmanager    
   1.371 +
   1.372 +END_TESTCASE                  SEC-CERTMAN-CANCEL2-0011
   1.373 +
   1.374 +
   1.375 +
   1.376 +
   1.377 +