networksecurity/tls/ts_tls/scripts/tls_psk_wlan.script
changeset 51 78fceed50f62
equal deleted inserted replaced
42:88121cf79045 51:78fceed50f62
       
     1 //
       
     2 // Copyright (c) 2010 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 PRINT TLS PSK tests
       
    18 
       
    19 LOAD_SUITE TS_tls.dll
       
    20 
       
    21 PAUSE_AT_END
       
    22 RUN_SCRIPT z:\TestData\scripts\esock_test_unloadesockForced.script
       
    23 //ced z:\testdata\configs\Tls_ethernet.xml
       
    24 RUN_UTILS  MkDir c:\private
       
    25 RUN_UTILS  MkDir c:\private\10202be9
       
    26 RUN_UTILS  MkDir c:\private\10202be9\persists
       
    27 RUN_UTILS  MakeReadWrite c:\private\10202be9\persists\cccccc00.cre
       
    28 
       
    29 RUN_UTILS CopyFile z:\testdata\configs\cccccc00_tls_psk.cre c:\private\10202be9\persists\cccccc00.cre
       
    30 RUN_SCRIPT z:\TestData\scripts\esock_test_loadesock.script
       
    31 RUN_UTILS CopyFile  z:\TestData\Configs\tls_t_secdlg_in.dat c:\t_secdlg_in.dat
       
    32 RUN_UTILS MakeReadWrite c:\t_secdlg_in.dat
       
    33 RUN_TEST_STEP 100000, TS_TLS, t_tls_DialogMode
       
    34 TEST_COMPLETE TLS_test_1
       
    35 
       
    36 RUN_UTILS MkDir c:\Private\101f72a6\
       
    37 RUN_UTILS Delete c:\Private\101f72a6\cacerts.dat
       
    38 RUN_UTILS Delete c:\Private\101f72a6\certclients.dat
       
    39 RUN_UTILS Delete c:\Private\101f72a6\keys.dat
       
    40 RUN_UTILS CopyFile z:\testdata\configs\cacerts_psk.dat c:\private\101f72a6\cacerts.dat
       
    41 RUN_UTILS CopyFile z:\testdata\configs\certclients_psk.dat c:\private\101f72a6\certclients.dat 
       
    42 RUN_UTILS CopyFile z:\testdata\configs\keys_psk.dat c:\private\101f72a6\keys.dat
       
    43 
       
    44 
       
    45 
       
    46 
       
    47 
       
    48 // TLS handshake with TLS_PSK_WITH_AES_128_CBC_SHA cipher suit
       
    49 // Preconditions:
       
    50 // There is a TLS test server that can perform TLS handshakes using the cipher suit specific to this test.  
       
    51 // Test Actions:
       
    52 // Repeat sequence below including and not including identity hint in server hello message.
       
    53 // Launch test client that uses instance of symbian CSecureSocket to negotiate handshake with TLS test server. 
       
    54 // Set appropriate values to instance of TConnectSettings associated to instance of CSecureSocket.
       
    55 // Instruct test client to connect to TLS test server.
       
    56 // Set test environment in a way that TLS_PSK_WITH_AES_128_CBC_SHA is set in “ServerHello” message.
       
    57 // Check that instance CSecureSocket was able to execute complete success handshake with test server 
       
    58 // using the cipher suit specified. 
       
    59 
       
    60 RUN_UTILS Delete c:\t_secdlg_out.dat
       
    61 print Tests for TLS_PSK_WITH_AES_128_CBC_SHA
       
    62 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_PSK_WITH_AES_128_CBC_SHA.ini
       
    63 TEST_COMPLETE TLS_PSK_test_2
       
    64 RUN_UTILS Delete c:\t_secdlg_out.dat
       
    65 print Tests for TLS_PSK_WITH_AES_128_CBC_SHA NoCallBack
       
    66 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_PSK_WITH_AES_128_CBC_SHA_NOCALLBACK.ini
       
    67 TEST_COMPLETE TLS_PSK_test_3
       
    68 
       
    69 
       
    70 
       
    71 
       
    72 
       
    73 
       
    74 // TLS handshake with TLS_PSK_WITH_3DES_EDE_CBC_SHA cipher suit
       
    75 // Preconditions:
       
    76 // There is a TLS test server that can perform TLS handshakes using the cipher suit specific to this test.  
       
    77 // Test Actions:
       
    78 // Repeat sequence below including and not including identity hint in server hello message.
       
    79 // Launch test client that uses instance of symbian CSecureSocket to negotiate handshake with TLS test server. 
       
    80 // Set appropriate values to instance of TConnectSettings associated to instance of CSecureSocket.
       
    81 // Instruct test client to connect to TLS test server.
       
    82 // Set test environment in a way that TLS_PSK_WITH_3DES_EDE_CBC_SHA is set in “ServerHello” message.
       
    83 // Check that instance CSecureSocket was able to execute complete success handshake with test server 
       
    84 // using the cipher suit specified. 
       
    85 
       
    86 RUN_UTILS Delete c:\t_secdlg_out.dat
       
    87 print Tests for TLS_PSK_WITH_3DES_EDE_CBC_SHA
       
    88 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_PSK_WITH_3DES_EDE_CBC_SHA.ini
       
    89 TEST_COMPLETE TLS_PSK_test_4
       
    90 
       
    91 
       
    92 
       
    93 
       
    94 
       
    95 // TLS handshake with TLS_PSK_WITH_RC4_128_SHA cipher suit
       
    96 // Preconditions:
       
    97 // There is a TLS test server that can perform TLS handshakes using the cipher suit specific to this test.  
       
    98 // Test Actions:
       
    99 // Repeat sequence below including and not including identity hint in server hello message.
       
   100 // Launch test client that uses instance of symbian CSecureSocket to negotiate handshake with TLS test server. 
       
   101 // Set appropriate values to instance of TConnectSettings associated to instance of CSecureSocket.
       
   102 // Instruct test client to connect to TLS test server.
       
   103 // Set test environment in a way that TLS_PSK_WITH_RC4_128_SHA is set in “ServerHello” message.
       
   104 // Check that instance CSecureSocket was able to execute complete success handshake with test server 
       
   105 // using the cipher suit specified. 
       
   106 
       
   107 RUN_UTILS Delete c:\t_secdlg_out.dat
       
   108 print Tests for TLS_PSK_WITH_RC4_128_SHA
       
   109 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_PSK_WITH_RC4_128_SHA.ini
       
   110 TEST_COMPLETE TLS_PSK_test_5
       
   111 
       
   112 
       
   113 
       
   114 
       
   115 
       
   116 // TLS handshake with TLS_PSK_WITH_AES_256_CBC_SHA cipher suit
       
   117 // Preconditions:
       
   118 // There is a TLS test server that can perform TLS handshakes using the cipher suit specific to this test.  
       
   119 // Test Actions:
       
   120 // Repeat sequence below including and not including identity hint in server hello message.
       
   121 // Launch test client that uses instance of symbian CSecureSocket to negotiate handshake with TLS test server. 
       
   122 // Set appropriate values to instance of TConnectSettings associated to instance of CSecureSocket.
       
   123 // Instruct test client to connect to TLS test server.
       
   124 // Set test environment in a way that TLS_PSK_WITH_AES_256_CBC_SHA is set in “ServerHello” message.
       
   125 // Check that instance CSecureSocket was able to execute complete success handshake with test server 
       
   126 // using the cipher suit specified. 
       
   127 
       
   128 RUN_UTILS Delete c:\t_secdlg_out.dat
       
   129 print Tests for TLS_PSK_WITH_AES_256_CBC_SHA
       
   130 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_PSK_WITH_AES_256_CBC_SHA.ini
       
   131 TEST_COMPLETE TLS_PSK_test_6
       
   132 
       
   133 
       
   134 
       
   135 
       
   136 
       
   137 // TLS handshake with Null cipher suites
       
   138 // Preconditions:
       
   139 // There is a TLS test server that can perform TLS handshakes using the cipher suit specific to this test.  
       
   140 // Test Actions:
       
   141 // Repeat sequence below including and not including identity hint in server hello message.
       
   142 // Launch test client that uses instance of symbian CSecureSocket to negotiate handshake with TLS test server. 
       
   143 // Set appropriate values to instance of TConnectSettings associated to instance of CSecureSocket.
       
   144 // Instruct test client to connect to TLS test server.
       
   145 // Set test environment in a way that TLS_NULL_CIPHER_NOCLIENT_AUT_RSA_MD5 is set in “ServerHello” message.
       
   146 // Check that instance CSecureSocket was able to execute complete success handshake with test server 
       
   147 // using the cipher suit specified.
       
   148 
       
   149 RUN_UTILS Delete c:\t_secdlg_out.dat
       
   150 print Tests for TLS_RSA_WITH_NULL_MD5
       
   151 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_RSA_WITH_NULL_MD5.ini
       
   152 TEST_COMPLETE TLS_PSK_test_7
       
   153 RUN_UTILS Delete c:\t_secdlg_out.dat
       
   154 print Tests for TLS_RSA_WITH_NULL_SHA
       
   155 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_RSA_WITH_NULL_SHA.ini
       
   156 TEST_COMPLETE TLS_PSK_test_8
       
   157 
       
   158 
       
   159 
       
   160 
       
   161 // To ensure that TLS provider can send server name extensions in TLS handshake.  
       
   162 // Preconditions:
       
   163 // There is a TLS test server that can perform TLS handshakes using server name extensions.    
       
   164 // Test Actions:
       
   165 // Launch test client that uses instance of symbian CSecureSocket to negotiate handshake with 
       
   166 // TLS test server. 
       
   167 // Set appropriate values to instance of TConnectSettings associated to instance of CSecureSocket.
       
   168 // Instruct test client to connect to TLS test server.
       
   169 // Set test environment in a way that server name extensions is set in “ServerHello” message.
       
   170 // Check that instance CSecureSocket was able to execute complete success handshake with test 
       
   171 //server using the cipher suit specified. 
       
   172 
       
   173 RUN_UTILS Delete c:\t_secdlg_out.dat 
       
   174 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_SNE_SINGLE_SERVER.ini
       
   175 TEST_COMPLETE TLS_PSK_test_9
       
   176 RUN_UTILS Delete c:\t_secdlg_out.dat
       
   177 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_SNE_MULTIPLE_SERVER.ini
       
   178 TEST_COMPLETE TLS_PSK_test_10
       
   179 RUN_UTILS Delete c:\t_secdlg_out.dat
       
   180 RUN_TEST_STEP 100000 TS_TLS, TLSPSK, z:\testdata\configs\TLS_SNE_SINGLE_SERVER_NEG.ini
       
   181 TEST_COMPLETE TLS_PSK_test_11
       
   182 
       
   183 RUN_UTILS Delete c:\t_secdlg_out.dat
       
   184 RUN_UTILS Delete c:\private\101f72a6\cacerts.dat
       
   185 RUN_UTILS Delete c:\private\101f72a6\certclients.dat
       
   186 RUN_UTILS Delete c:\private\101f72a6\keys.dat
       
   187 
       
   188 RUN_SCRIPT Z:\TestData\Scripts\esock_test_stopallinterfaces.script
       
   189 RUN_SCRIPT Z:\TestData\scripts\esock_test_unloadesockForced.script