networksecurity/tlsprovider/Test/scripts/testtokens.script
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     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 "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 //
       
    17 // Test that different ECOM-pluggable TLS tokens work correctly
       
    18 //
       
    19 // For this test, there is the default swtlstokentypeplugin, and
       
    20 // a test hwtlstokentypeplugin, which is "hardware", and should
       
    21 // be selected in preference to the swtoken. The hwtoken only
       
    22 // supports a limited range of ciphers.
       
    23 //
       
    24 
       
    25 LOAD_SUITE tlstest2
       
    26 
       
    27 RUN_UTILS MkDir c:\private\101f72a6\
       
    28 RUN_UTILS DeleteFile c:\private\101f72a6\CACerts.dat
       
    29 RUN_UTILS DeleteFile c:\private\101f72a6\certclients.dat
       
    30 RUN_UTILS DeleteFile c:\private\101f72a6\keys.dat
       
    31 RUN_UTILS CopyFile z:\testdata\configs\tlsprovtestdata\KeyAndCertStore\cacerts.dat c:\private\101f72a6\CACerts.dat
       
    32 RUN_UTILS CopyFile z:\testdata\configs\tlsprovtestdata\KeyAndCertStore\certclients.dat c:\private\101f72a6\certclients.dat
       
    33 RUN_UTILS CopyFile z:\testdata\configs\tlsprovtestdata\KeyAndCertStore\keys.dat c:\private\101f72a6\keys.dat
       
    34 
       
    35 RUN_UTILS MkDir c:\tlstest2
       
    36 
       
    37 //
       
    38 // Hardware token supports RSA cipher; check that our hardware token is called
       
    39 //
       
    40 
       
    41 //! @SYMTestCaseID 	SEC-TLSP-TOKENS-0001
       
    42 //! @SYMTestCaseDesc 	Hardware token supports RSA cipher; check that our hardware token is called
       
    43 
       
    44 START_TESTCASE SEC-TLSP-TOKENS-0001
       
    45 RUN_UTILS DeleteFile c:\tlstest2\hwtest.log
       
    46 RUN_TEST_STEP 100 tlstest2 EncryptStep z:\testdata\testtokens\testtokens.ini TLS_RSA_WITH_AES_256_CBC_SHA
       
    47 RUN_TEST_STEP 100 tlstest2 CheckFilesStep z:\testdata\testtokens\testtokens.ini testhwtokencalled
       
    48 END_TESTCASE SEC-TLSP-TOKENS-0001
       
    49 
       
    50 //
       
    51 // Hardware token doesn't support DH cipher; check hardware token not called
       
    52 //
       
    53 
       
    54 //! @SYMTestCaseID 	SEC-TLSP-TOKENS-0002
       
    55 //! @SYMTestCaseDesc 	Hardware token doesn't support DH cipher; check hardware token not called
       
    56 
       
    57 START_TESTCASE SEC-TLSP-TOKENS-0002
       
    58 RUN_UTILS DeleteFile c:\tlstest2\hwtest.log
       
    59 RUN_TEST_STEP 100 tlstest2 EncryptStep z:\testdata\testtokens\testtokens.ini TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
       
    60 RUN_TEST_STEP 100 tlstest2 CheckFilesStep z:\testdata\testtokens\testtokens.ini testswtokencalled
       
    61 END_TESTCASE SEC-TLSP-TOKENS-0002
       
    62 
       
    63 RUN_UTILS DeleteFile c:\tlstest2\hwtest.log
       
    64 RUN_UTILS DeleteDir c:\tlstest2