How to integrate SSL with winsock
How to integrate SSL with winsock
How to integrate SSL with winsock
How to integrate SSL with winsock
How to integrate SSL with winsock
How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock
How to integrate SSL with winsock How to integrate SSL with winsock
How to integrate SSL with winsock
Go Back  Xtreme Visual Basic Talk > > > How to integrate SSL with winsock


Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2008, 10:54 AM
shaoun1000 shaoun1000 is offline
Regular
 
Join Date: Feb 2008
Posts: 67
Default How to integrate SSL with winsock


Hello,
I am trying to send mail using winsock in visual basic 6. I need winsock to pass data through secure SSL connection. That is, i want to send mail using smtp.gmail.com. When i tried to send mail using auth login the gmail smtp refuse because i have not initiated SSL. I need to integrate SSL with winsock. I search, there is some solution but those are too hard and they are not like winsock control. All are created using winsock dll and does not provide full features of winsock. Anyone, pls help me.

Kindest regards...
Shaoun
Reply With Quote
  #2  
Old 04-12-2008, 05:46 PM
dilettante's Avatar
dilettanteHow to integrate SSL with winsock dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,529
Default

My first suggestion would be to back up and use CDO for Windows. It replaces all of your own SMTP logic as well as handling SSL. Many people don't want to use it though, for whatever reasons. The only good one I can think of is to support Win9x.

My second suggestion is to fork over the cash for a commercial SSL socket component.

Lastly, you might take a look at two PSC projects:
SSL Class With Events

A Secure Sockets Layer (SSLv2) Client
The first is newer, based on the second one according to the comments there, and has a few improvements over it. But the second one had corrections/improvements added later that did not get ported over to the newer one!

They're both pretty raggedy, like most PSC code I've seen. The core ideas appear sound however.

Somebody with a clue should create a UserControl that rewrites and then wraps this logic with a Winsock control to produce a handy SSLSock control correcting the flaws in both of these projects. By sticking closely to the Winsock object model you'd have a near drop-in replacement lots of people might use, especially if you built it so that SSL could be switched on and off via a property setting.

I'd bet you could drop UDP support and a few little-used things like the deprecated PeekData() method and few people would ever complain. You might even get away with restricting it to Byte array send/receive, or maybe just Byte array and String?
Reply With Quote
  #3  
Old 04-13-2008, 12:46 AM
shaoun1000 shaoun1000 is offline
Regular
 
Join Date: Feb 2008
Posts: 67
Default

Hello sir,
Thanks for that valuable information. I checked all you specified.

Now, i have another idea. If i apply ssl encryption on the port that is used by winsock then logically winsock will use ssl. Is it right? Let us assume that i have a winsock in my program that use port: 25. And i have a ssl class that apply ssl on port number 25. Then as logic winsock will use ssl. Is it right?
Again, is it possible?
Waiting for reply.
Kindest regards...
Shaoun
Reply With Quote
  #4  
Old 04-13-2008, 12:17 PM
dilettante's Avatar
dilettanteHow to integrate SSL with winsock dilettante is offline
Underclocked lifestyle

Forum Leader
* Guru *
 
Join Date: Feb 2005
Location: Michigan, USA
Posts: 4,529
Default

I don't think so.

Your program is talking to the Winsock control. This talks to the Winsock API, which in turn talks to afd.sys, and so on.

There is no way for some "SSL class" to inject itself in that stream. More likely it will just use its own socket allocated through the Winsock API which will be entirely different.

Port numbers have nothing to do with it, and at most may result in a conflict and resulting runtime error.
Reply With Quote
  #5  
Old 04-14-2008, 02:39 AM
shaoun1000 shaoun1000 is offline
Regular
 
Join Date: Feb 2008
Posts: 67
Default

You are absolutely right Guru. I tried in different ways. Lastly i tried by encoding my string with the master key provided from the server and pass that through winsock. It failed. Why there is nothing in visual basic to deal with SSL? It's too booring.
Now, i am trying with CDO for windows. But i can't understand what should be loaded in my client machine to run my email sending application?

So, my question is: What should be needed to install to run my application using CDO for windows. And what is the best solution to create an email sending program in visual basic that use CDO?

Kindest regards...
Shaoun
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
How to integrate SSL with winsock
How to integrate SSL with winsock
How to integrate SSL with winsock How to integrate SSL with winsock
How to integrate SSL with winsock
How to integrate SSL with winsock
How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock How to integrate SSL with winsock
How to integrate SSL with winsock
How to integrate SSL with winsock
 
How to integrate SSL with winsock
How to integrate SSL with winsock
 
-->