×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    10

    how to send https request using socket example?

    Hi all,
    I am using socket example in sdk, I want to send https request using that, can anybody help me how to send?
    For sending http request I am using "Get http://www.google.co.in HTTP/1.0\r\n\r\n"
    How to send https request? Is there any change required, if url is so big do we need to do any url encoding?

    I will be greatful if anybody can help me on this issue....

    waiting for reply from experts,

    hareesh.

  2. #2
    Regular Contributor
    Join Date
    Mar 2004
    Location
    Novi Sad - Serbia
    Posts
    63

    HTTPS connection

    Hi jntu_hareesh (and everybody else),

    Have you found some solution to your problem?

    Do you (or anybody) know how I can establish HTTPS connection and send some data to server?

    I use RHTTPSession, RHTTPTransaction, MHTTPDataSupplier,... classes for HTTP communication.
    Is there any way I can use this classes to establish HTTPS connection and not to use CSecureSocket class?

    Thanx in advance.

  3. #3
    Regular Contributor
    Join Date
    Aug 2005
    Location
    India
    Posts
    50

    Re: how to send https request using socket example?

    Hi,
    To send a HTTPS request you have to make a secure connection to the server. The procedure is first to connect to the server with a normal RSocket.
    Once you are connected then you have make a CSecureSocket with the help of CSecureClass by pasiing the RSocket.
    iTlsSocket = CSecureSocket::NewL(iSocket, KSSLProtocol());

    After this we have to do the handshake.

    iTlsSocket->StartClientHandshake(iStatus);

    This handshake do the certificate verification of the server and other things necessary for secure connection

    Once this is done with the help of iTLSSocket you can send and receive HTTP request. The request you will send will be normal and Symbain APIs will take care of the encryption.

    thanks,
    Santosh Shetty

  4. #4
    Regular Contributor
    Join Date
    Mar 2004
    Location
    Novi Sad - Serbia
    Posts
    63

    Re: how to send https request using socket example?

    Thx for you reply but I found a solution already.

    I was working on Series 60 device and used SDK 7.0s. I used new HTTP classes and found that passing HTTPS URL is just enough to make it to work over HTTPS.

    Thx anyway for your answer,
    Sasa

  5. #5
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    92

    Re: how to send https request using socket example?

    I am able to use https using RConnection/RSocket and HTTP classes. All I had to do is change the URL. However, the problem I have is the access point prompt dialog keeps coming up on each request the client is sending. When I use http this is not happening. I am setting ECommDbDialogPrefDoNotPrompt and the iapID in the TCommDbConnPref.

    Do I need to use CSecureSocket? Or is there another property in the RHTTPConnectionInfo to set?

    Thanks!

  6. #6
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,752

    Re: how to send https request using socket example?

    Search for RHttpSession in the Wiki. TSS000203 can help you for example. CS000825 and CS000837 can be interesting too.

  7. #7
    Regular Contributor
    Join Date
    Jan 2007
    Location
    Bangalore
    Posts
    285

    Re: how to send https request using socket example?

    Use CSecureSocket to Connect

    After Connect:

    _LIT(KTLS,"TLS1.0");
    iTlsSocket = CSecureSocket::NewL(iSocket, KTLS());
    #ifdef EKA2
    iTlsSocket->SetOpt(KSoSSLDomainName,KSolInetSSL,iServerName);
    #endif
    iTlsSocket->FlushSessionCache();
    iTlsSocket->StartClientHandshake(iStatus);
    iEngineState = EWrite;
    SetActive();

  8. #8
    Regular Contributor
    Join Date
    Mar 2006
    Posts
    92

    Re: how to send https request using socket example?

    Thanks! Will try and get it working.

  9. #9
    Registered User
    Join Date
    Oct 2007
    Posts
    16

    Re: how to send https request using socket example?

    Hi gmsk19,

    Can you plz send the complete example? I m novice to HTTPS, and I did not find any clear example on forum.nokia.com

  10. #10
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,170

    Re: how to send https request using socket example?

    You could propably find it by going to main page, clicking the documentation link on left side, and then going through to networking documentation & examples stuff

Posting Permissions

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