60 security preferences. |
60 security preferences. |
61 */ |
61 */ |
62 { |
62 { |
63 } |
63 } |
64 |
64 |
65 void CSecureSocketController::StartSecureHandshakeL(TRequestStatus& aStatus, const TDesC8& aHostName) |
65 void CSecureSocketController::StartSecureHandshakeL(TRequestStatus& aStatus, const TDesC8& aHostName, const TDesC& aProtocolVersion) |
66 /** |
66 /** |
67 Start a secure handshake to upgrade the socket to a secure connection. |
67 Start a secure handshake to upgrade the socket to a secure connection. |
68 @param aStatus The request status, this will complete with KErrNone |
68 @param aStatus The request status, this will complete with KErrNone |
69 if the secure handshake completed succesfully. |
69 if the secure handshake completed succesfully. |
70 @param aHostName The server host name, used for domain name checking |
70 @param aHostName The server host name, used for domain name checking |
71 against certificates. |
71 against certificates. |
72 */ |
72 */ |
73 { |
73 { |
74 // Create the secure layer |
74 // Create the secure layer |
75 _LIT(KTxtTls, "tls1.0"); |
|
76 if( iTlsSocket == NULL ) |
75 if( iTlsSocket == NULL ) |
77 iTlsSocket = CSecureSocket::NewL(iSocket, KTxtTls()); |
76 { |
78 |
77 iTlsSocket = CSecureSocket::NewL(iSocket, aProtocolVersion); |
|
78 } |
79 // Get the security preferences, dialog prompt and security policy |
79 // Get the security preferences, dialog prompt and security policy |
80 TBool dialogPref = ETrue; |
80 TBool dialogPref = ETrue; |
81 MSecurityPolicy* securityPolicy = NULL; |
81 MSecurityPolicy* securityPolicy = NULL; |
82 iCommsInfoProvider.SecurityPreferences(dialogPref, securityPolicy); |
82 iCommsInfoProvider.SecurityPreferences(dialogPref, securityPolicy); |
83 |
83 |