×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    3

    CSecureSocket :: StartClientHandshake gives system error (-39)

    Hi,

    I am new to Symbian S60 Platform. I am trying to implement a HTTPS based application which can establish a SSL connection with the server and download some documents onto the emulator.

    I am using the sample CSecureSocket example given in Nokia Wiki forum (http://wiki.forum.nokia.com/index.ph...Socket_example)

    I compiled and ran the code on the emulator but it gives system wide error (-39) while performing SSL handshake in iTlsSocket->StartClientHandshake( iStatus );


    Please let me know the solution.

    Thanks
    Regards
    Pranav Jadhav
    Graduate Student
    Stony Brook University

    The sample code is below :

    // ---! Secure connection !---

    void CSecureSocketCore::ConnectL()
    {
    iSndBuffer.SetLength( 0 );
    iRcvBuffer.SetLength( 0 );
    iTotalBytesRead = 0;

    _LIT( KIPAddress, " 63.245.209.11");


    //==konstantine_entrance : mycode
    // from Chat example

    TInetAddr addr;
    TUint32 aAddr;

    iState = EMakingSecureConnection;

    if ( addr.Input( KIPAddress ) == KErrNone )
    {
    // server name is already a valid ip address
    aAddr = addr.Address();
    iAddress.SetPort( iPort );
    iAddress.SetAddress( aAddr );
    iAddress.SetFamily( KAfInet );

    // Open a TCP socket
    User::LeaveIfError( iSocket.Open( iSocketServer,
    KAfInet,
    KSockStream,
    KProtocolInetTcp ) );

    // Initiate socket connection
    iSocket.Connect( iAddress, iStatus );
    SetActive();
    //CActiveScheduler::Start();
    //User::LeaveIfError(iStatus.Int()); // errors caught by RunError()
    }
    }

    void CSecureSocketCore::MakeSecureConnectionL()
    {
    User::LeaveIfError(iStatus.Int()); // errors caught by RunError()

    iTlsSocket = CSecureSocket::NewL( iSocket, _L("SSL3.0"));

    iTlsSocket->FlushSessionCache();

    // start the handshake
    iTlsSocket->StartClientHandshake( iStatus );

    }

    void CSecureSocketCore::MakePageRequestL()
    {
    // The secure connection has now been made.
    // Send a get request for the page.
    User::LeaveIfError(iStatus.Int());

    //_LIT8( KPage , "https://mozilla.org");
    _LIT8( KPage , "https://webmail.cs.sunysb.edu");

    // Create a GET request
    iSndBuffer+=KSimpleGet;
    iSndBuffer+=KPage();
    iSndBuffer+=KNewLine;

    // Send the request
    iTlsSocket->Send( iSndBuffer, iStatus, iBytesSent );
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: CSecureSocket :: StartClientHandshake gives system error (-39)

    Common negative numbers are here: http://wiki.forum.nokia.com/index.php/Error_codes
    Anyway, if you happen to try this on S60 3rd/5th edition, you should check the other CSecureSocket-related article in the Wiki - just search for CSecureSocket.

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    3

    Re: CSecureSocket :: StartClientHandshake gives system error (-39)

    The problem was solved after going through the page on
    KIS000322 - Secure sockets need additionatl configuration on S60 3rd Edition

    ThankYou!

Similar Threads

  1. CSecureSocket - StartClientHandShake fails
    By chengguangguo in forum Symbian Networking & Messaging (Closed)
    Replies: 21
    Last Post: 2008-11-06, 10:23
  2. Is there anybody know file system filter in S60_3rd?
    By zhangwei_Nirvana in forum Symbian
    Replies: 5
    Last Post: 2008-04-26, 07:06
  3. HELP !auto-reply sms system (using 8250 & VB6)
    By dancingqueeneng in forum PC Suite API and PC Connectivity SDK
    Replies: 4
    Last Post: 2007-02-08, 07:08
  4. Problem with CSecureSocket StartClientHandShake
    By chengguangguo in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-02-20, 05:27
  5. System Help with nokia pc connectivity SDK
    By gotka in forum PC Suite API and PC Connectivity SDK
    Replies: 4
    Last Post: 2004-07-06, 09:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×