Results 1 to 8 of 8

Thread: Using SSLSocket

  1. #1
    Join Date
    Dec 2009
    Posts
    16
    Rep Power
    0

    Default Using SSLSocket

    I hav a ques whether SSLSocket is only for Web application and wether certificate is mandatory for it..if so can anyone plz explain me that with a simple example......

  2. #2
    cst
    cst is offline Member
    Join Date
    Nov 2009
    Posts
    7
    Rep Power
    0

    Default

    SSL is not only for web applications, I used it for p2p chat. You can create SSLServerSocket and SSLSocket just like you would do normal Sockets. But in order to do so you need to setup a SSLContext(read about this) and for that you need to have a certificate or a keypair, preferably in a keystore.

  3. #3
    Join Date
    Dec 2009
    Posts
    16
    Rep Power
    0

    Default SSLSocket

    tanx..cst..but can u please reply me with a simple code..i had just tried ..but got only run time error..

    i had creaated a keystore...but i is nt working fr me..

  4. #4
    cst
    cst is offline Member
    Join Date
    Nov 2009
    Posts
    7
    Rep Power
    0

    Default

    search this forum for ssl and you will find what you need

  5. #5
    Join Date
    Dec 2009
    Posts
    16
    Rep Power
    0

    Default Using Eclipse

    thanks cst...i had solved that problem and i connected client with server using SSL normally in command prompt.....


    but i hav to work for my project on Eclipse .. but i dont know how to run the same in Eclipse..Please tell me that...

  6. #6
    cst
    cst is offline Member
    Join Date
    Nov 2009
    Posts
    7
    Rep Power
    0

    Default

    In Eclipse you have the run button, it is green and looks like "play", the console in eclipse is on the bottom by default

  7. #7
    Join Date
    Dec 2009
    Posts
    16
    Rep Power
    0

    Default Not working..

    i had tried ..but it is not working and i am getting the exception as no certificate available..

  8. #8
    cst
    cst is offline Member
    Join Date
    Nov 2009
    Posts
    7
    Rep Power
    0

    Default

    It is working because you are getting an exception, which means you are doing something wrong, you should know which part of your code throws an exception, and what to do to fix it, do you have the keystore in proper path?

Posting Permissions

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