CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: SSL client

  1. #1
    Join Date
    Aug 2008
    Posts
    8

    SSL client

    Hi guys,

    I have taken quite some time to look for a sample Web Services client which uses SSL to communicate.

    My confusions are how to handle logics at client side dealing with certificate and CA certificate, and how to make such certificate and a CA certificate to make a test? Does anyone have any samples to recommend?

    thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: SSL client

    Quote Originally Posted by COMDeveloper1
    Hi guys,

    I have taken quite some time to look for a sample Web Services client which uses SSL to communicate.

    My confusions are how to handle logics at client side dealing with certificate and CA certificate, and how to make such certificate and a CA certificate to make a test? Does anyone have any samples to recommend?

    thanks!
    You require Self SSL tool to generate a certificate and test your application.
    Download "IIS Resources" from the below link
    http://www.microsoft.com/technet/pro....mspx?mfr=true

    Run Self SSL and type the following command in the console.

    Code:
    selfssl.exe /N:CN=<your machine name> /K:1024 /V:7 /S:1 /P:443

  3. #3
    Join Date
    Aug 2008
    Posts
    8

    Re: SSL client

    You resolved half of my confusion, another unresolved one is sample code to write an SSL client to access Web Services. I am surprised it is so hard to find one.

    My initialitive is to parse domain information of certificate from server, and if some specific domain name, accept server certificate and proceed, or else, do not proceed.

    Do you know where or where to find such a sample?

    Quote Originally Posted by MMH
    You require Self SSL tool to generate a certificate and test your application.
    Download "IIS Resources" from the below link
    http://www.microsoft.com/technet/pro....mspx?mfr=true

    Run Self SSL and type the following command in the console.

    Code:
    selfssl.exe /N:CN=<your machine name> /K:1024 /V:7 /S:1 /P:443

  4. #4
    Join Date
    Aug 2008
    Posts
    8

    Re: SSL client

    Hi MMH, I downloaded the toolkit but can not find any documents for selfssl.exe tool. Do you know where to find it?

    Quote Originally Posted by MMH
    You require Self SSL tool to generate a certificate and test your application.
    Download "IIS Resources" from the below link
    http://www.microsoft.com/technet/pro....mspx?mfr=true

    Run Self SSL and type the following command in the console.

    Code:
    selfssl.exe /N:CN=<your machine name> /K:1024 /V:7 /S:1 /P:443

  5. #5
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: SSL client

    When you install it, you will find the CHM document help alongwith the SelfSSL.exe

    IIS resources -> SelfSSL - > Self SLL Documentation

  6. #6
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: SSL client

    And just for my info, which webservice is it you are trying to consume? Is it WCF web service ?

  7. #7
    Join Date
    Aug 2008
    Posts
    8

    Re: SSL client

    Thanks, but when I opened the file iisTools.chm, and select SelfSSL, and it just contains overview and syntax section, no install or samples? -- beyond yours. :-)

    Yes, I want to host WCF as Windows Services and remote access by Web Services (the reason why I want to use WCF is because it is convenient to write and save time, and the reason why I write Web Services client other than WCF client is because some client are not using Windows OS and some clients do not have .Net CLR 3.0 installed.)

    Quote Originally Posted by MMH
    And just for my info, which webservice is it you are trying to consume? Is it WCF web service ?

  8. #8
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: SSL client

    Quote Originally Posted by COMDeveloper1
    Yes, I want to host WCF as Windows Services and remote access by Web Services (the reason why I want to use WCF is because it is convenient to write and save time, and the reason why I write Web Services client other than WCF client is because some client are not using Windows OS and some clients do not have .Net CLR 3.0 installed.)
    Creating WCF Web service is ok but consuming it from other client is some more painfull, meaning-

    As you said, some machine doesnt have 3.0, then only option left for you is to expose your WCF service endpoint as asmx so that your client not having 3.0 can also consume it...

    Also, there is a wonderful tool available on the net to test web services (SOAP UI). SOAP UI is a java client and you can very well configure it to suit your needs...

    Hope this helps..

  9. #9
    Join Date
    Aug 2008
    Posts
    8

    Re: SSL client

    Thanks MMH. Good advice, not almost forget all about Java...

    Anyway, do you have any SSL client samples, my confusion is how to write the callbacks dealing with server certificate acceptance...

    Quote Originally Posted by MMH
    Creating WCF Web service is ok but consuming it from other client is some more painfull, meaning-

    As you said, some machine doesnt have 3.0, then only option left for you is to expose your WCF service endpoint as asmx so that your client not having 3.0 can also consume it...

    Also, there is a wonderful tool available on the net to test web services (SOAP UI). SOAP UI is a java client and you can very well configure it to suit your needs...

    Hope this helps..

  10. #10
    Join Date
    Jan 2006
    Location
    18° 32' N / 73° 52' E
    Posts
    416

    Re: SSL client

    Quote Originally Posted by COMDeveloper1
    do you have any SSL client samples, my confusion is how to write the callbacks dealing with server certificate acceptance...
    Sorry, no samples for that.....

    but may be this can help you out...

    http://developers.de/media/p/893.aspx

    Regards,
    MMH

  11. #11
    Join Date
    Aug 2008
    Posts
    8

    Re: SSL client

    Good stuff, thanks MMH!

    Quote Originally Posted by MMH
    Sorry, no samples for that.....

    but may be this can help you out...

    http://developers.de/media/p/893.aspx

    Regards,
    MMH

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured