applayerpluginsandutils/httpprotocolplugins/httpclient/chttpconnectionmanager.cpp
branchRCL_3
changeset 5 337070b4fa18
parent 3 5ee1d9ce5878
child 6 fa2fd8b2d6cc
equal deleted inserted replaced
3:5ee1d9ce5878 5:337070b4fa18
    16 #include "chttpconnectionmanager.h"
    16 #include "chttpconnectionmanager.h"
    17 
    17 
    18 #include <authority8.h>
    18 #include <authority8.h>
    19 #include <httperr.h>
    19 #include <httperr.h>
    20 #include <x509cert.h>
    20 #include <x509cert.h>
       
    21 #include <sslerr.h>
    21 
    22 
    22 #include "msocketfactory.h"
    23 #include "msocketfactory.h"
    23 #include "msocketconnector.h"
    24 #include "msocketconnector.h"
    24 #include "moutputstream.h"
    25 #include "moutputstream.h"
    25 #include "minputstream.h"
    26 #include "minputstream.h"
   583 					iConnectionInfo->IsSecure(), 
   584 					iConnectionInfo->IsSecure(), 
   584 					iConnectionInfo->IsNonPersistent()
   585 					iConnectionInfo->IsNonPersistent()
   585 					);
   586 					);
   586 			}
   587 			}
   587 #endif
   588 #endif
   588 		if ( ( aError == KErrEof || aError == KErrCancel  ) )
   589 		if ((aError == KErrSSLAlertUnexpectedMessage || aError == KErrSSLAlertHandshakeFailure) && !iSecureRetry)
       
   590  		    {
       
   591  		    //TSW error id - TKOO-7YUCA3
       
   592  		    //some websites dont support tls1.0 & retry secure negotiation with ssl3.0 & error value modified to KErrEof for retrying
       
   593 		    iSecureRetry = ETrue; 
       
   594             aError = KErrEof;
       
   595  		    }
       
   596  		if (  aError == KErrEof || aError == KErrCancel  ) 
   589  			{
   597  			{
   590 			if ( IsPendingWriteInConnectedState() && !iCurrentRequest->NeedDisconnectNotification() )
   598 			if ( IsPendingWriteInConnectedState() && !iCurrentRequest->NeedDisconnectNotification() )
   591  				{
   599  				{
   592 				// Server shut down the connect before the current transaction had 
   600 				// Server shut down the connect before the current transaction had 
   593  				// a chance to send any of its data - attempt re-connect to server.	
   601  				// a chance to send any of its data - attempt re-connect to server.	
  1208 	}
  1216 	}
  1209 
  1217 
  1210 void CHttpConnectionManager::SecureClientCnf()
  1218 void CHttpConnectionManager::SecureClientCnf()
  1211 	{
  1219 	{
  1212 	__ASSERT_DEBUG( iState == EUpgrading, User::Invariant() );
  1220 	__ASSERT_DEBUG( iState == EUpgrading, User::Invariant() );
       
  1221 	
       
  1222 	iSecureRetry = EFalse; //reset the flag
       
  1223 
  1213 
  1224 
  1214 #if defined (_DEBUG) && defined (_LOGGING)
  1225 #if defined (_DEBUG) && defined (_LOGGING)
  1215 	__FLOG_0(_T8("!! Secure connection establised"));
  1226 	__FLOG_0(_T8("!! Secure connection establised"));
  1216 
  1227 
  1217 	if( iTunnel )
  1228 	if( iTunnel )