networksecurity/tls/ts_tls/T_TLS_cntrl.cpp
branchRCL_3
changeset 22 8d540f55e491
parent 21 abbed5a4b42a
equal deleted inserted replaced
21:abbed5a4b42a 22:8d540f55e491
     1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   213 			if (!iTestStep->GetBoolFromConfig(KSectionName, KCfgEAPKeyDerivation, iEAPKeyDerivation ))
   213 			if (!iTestStep->GetBoolFromConfig(KSectionName, KCfgEAPKeyDerivation, iEAPKeyDerivation ))
   214 				{
   214 				{
   215 				iEAPKeyDerivation = KDefEAPKeyDerivation;
   215 				iEAPKeyDerivation = KDefEAPKeyDerivation;
   216 				}
   216 				}
   217 			iTestStep->Log( _L("EAPKeyDerivation: %D"), iEAPKeyDerivation);
   217 			iTestStep->Log( _L("EAPKeyDerivation: %D"), iEAPKeyDerivation);
       
   218 #ifdef HTTP_ALLOW_UNTRUSTED_CERTIFICATES
       
   219 			// iTLSDialogMode;
       
   220             if (!iTestStep->GetBoolFromConfig(KSectionName, KCfgSSLDialogMode, iTLSDialogMode ))
       
   221                 {
       
   222                 iTLSDialogMode = KDefSSLDialogMode;
       
   223                 }
       
   224             iTestStep->Log( _L("TLSDialogMode: %D"), iTLSDialogMode);
       
   225             
       
   226             // iTLSDialogModeValue;
       
   227             if (!iTestStep->GetIntFromConfig(KSectionName, KCfgSSLDialogModeValue, iTLSDialogModeValue ))
       
   228                 {
       
   229                 iTLSDialogModeValue = KDefSSLDialogModeValue;
       
   230                 }
       
   231             iTestStep->Log( _L("TLSDialogModeValue: %D"), iTLSDialogModeValue);
       
   232             
       
   233             // iExpectedErrorCode (-7548: KErrSSLAlertUnknownCA)
       
   234             if (!iTestStep->GetIntFromConfig(KSectionName, KCfgExpectedErrorCode, iExpectedErrorCode ))
       
   235                 {
       
   236                 iExpectedErrorCode = KDefErrorValue;
       
   237                 }
       
   238             iTestStep->Log( _L("ExpectedErrorCode: %D"), iExpectedErrorCode);
       
   239 #endif  // HTTP_ALLOW_UNTRUSTED_CERTIFICATES
   218 
   240 
   219 			// On to next state 
   241 			// On to next state 
   220 			iRunState = EFindFreeTest;			
   242 			iRunState = EFindFreeTest;			
   221 
   243 
   222 			iTimer.After( iStatus, KControllerDelayTime );
   244 			iTimer.After( iStatus, KControllerDelayTime );
   251 						TInt maxConnections = KMaxSSLConnections;
   273 						TInt maxConnections = KMaxSSLConnections;
   252 						if ( maxConnections != 1 )
   274 						if ( maxConnections != 1 )
   253 							{
   275 							{
   254 							iTestStep->Log( _L("Using test object %d"), i );
   276 							iTestStep->Log( _L("Using test object %d"), i );
   255 							}
   277 							}
   256 
   278 #ifdef HTTP_ALLOW_UNTRUSTED_CERTIFICATES
   257 						iTLSTest[i]->ConnectL( iAddress, iPortNum, iPage, iCipherSuites, 
   279 						iTLSTest[i]->ConnectL( iAddress, iPortNum, iPage, iCipherSuites, 
   258 							iCipher, iSimpleGet, iTestEndDelay, iDNSName, iProtocol, iUseGenericSocket, iEAPKeyDerivation );
   280                                                     iCipher, iSimpleGet, iTestEndDelay, iDNSName, iProtocol, iUseGenericSocket, iEAPKeyDerivation, iTLSDialogMode, iTLSDialogModeValue, iExpectedErrorCode ); //ajit
       
   281 #else
       
   282 						iTLSTest[i]->ConnectL( iAddress, iPortNum, iPage, iCipherSuites, 
       
   283 						                            iCipher, iSimpleGet, iTestEndDelay, iDNSName, iProtocol, iUseGenericSocket, iEAPKeyDerivation ); //ajit
       
   284 #endif  // HTTP_ALLOW_UNTRUSTED_CERTIFICATES
   259 
   285 
   260 						iRunState = EWaitForComplete;
   286 						iRunState = EWaitForComplete;
   261 						break; // break from the for loop
   287 						break; // break from the for loop
   262 					}
   288 					}
   263 				} // 'for' statement
   289 				} // 'for' statement