473,480 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Wrap SSL Around Existing Socket... Externally

Hello,

My boss asked me if it is possible to wrap SSL around an existing socket
which is running with a C++ program (I know it is, I have done it before). I
am wondering if it is possible to do this in a C# application so that when
the C# program is running in the background, it is able to intercept the
socket communications from the C++ program, encrypt them, and pass it on
through the C# SSL program I make to a receiving C# program to decode and
pass it back to the C++ client.

Is this possible? I am not even sure what direction to take or what
keywords to lookup for help on this subject. Please let me know if you need
clarification.

Thank you all!

Rob
May 11 '07 #1
4 3103
Do you mean encrypt a non-encrypted socket? That would require some sort of
proxy or encrypting NAT on each end (assuming the server excpects an
unencrypted socket).

--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"RobKinney1" wrote:
Hello,

My boss asked me if it is possible to wrap SSL around an existing socket
which is running with a C++ program (I know it is, I have done it before). I
am wondering if it is possible to do this in a C# application so that when
the C# program is running in the background, it is able to intercept the
socket communications from the C++ program, encrypt them, and pass it on
through the C# SSL program I make to a receiving C# program to decode and
pass it back to the C++ client.

Is this possible? I am not even sure what direction to take or what
keywords to lookup for help on this subject. Please let me know if you need
clarification.

Thank you all!

Rob

May 11 '07 #2
"Peter Ritchie [C# MVP]" wrote:
Hello Peter,

Thank you for replying!
Do you mean encrypt a non-encrypted socket? That would require some sort of
proxy or encrypting NAT on each end (assuming the server excpects an
unencrypted socket).
Yes, I believe this is correct. Is it possible for a C# program to
intercept these socket communications, then encrypt them before they leave
the local computer? (And then of course capture the communication on the
other end with a C# and unencrypt the data).

Rob
May 11 '07 #3
You'd have to write some sort of NDIS hook (requires WinSock 2).

The only thing I know of is RawEther .NET [1]. It would have to be an
external binary (i.e. the application itself can't hook it's own traffic) as
far as I know...

http://www.rawether.net/DotNet/default.htm
--
Browse http://connect.microsoft.com/VisualStudio/feedback/ and vote.
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C#
"RobKinney1" wrote:
"Peter Ritchie [C# MVP]" wrote:
Hello Peter,

Thank you for replying!
Do you mean encrypt a non-encrypted socket? That would require some sort of
proxy or encrypting NAT on each end (assuming the server excpects an
unencrypted socket).

Yes, I believe this is correct. Is it possible for a C# program to
intercept these socket communications, then encrypt them before they leave
the local computer? (And then of course capture the communication on the
other end with a C# and unencrypt the data).

Rob
May 11 '07 #4


"Peter Ritchie [C# MVP]" wrote:
You'd have to write some sort of NDIS hook (requires WinSock 2).

The only thing I know of is RawEther .NET [1]. It would have to be an
external binary (i.e. the application itself can't hook it's own traffic) as
far as I know...

http://www.rawether.net/DotNet/default.htm
Thank you very much! I will look into this this weekend. Looks like it is
time to roll up the sleeves...

Thanks again for pointing me in the right direction!

Rob
May 11 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1797
by: drs | last post by:
Hi, I have a program which opens a socket server in a thread. I need for the server to listen on the socket for a certain amount of time (say, ten seconds or so) and then close it, and am...
14
1852
by: Grant Edwards | last post by:
I want to subclass an IMAP connection so that most of the methods raise an exception if the returned status isn't 'OK'. This works, but there's got to be a way to do it that doesn't involve so...
10
11091
by: Dan V. | last post by:
Is it possible to have 2 divs beside each other and one not wrap around? I realize the 2 div's are floating left but I can only think of this as the best solution for now. I am trying to get...
3
6724
by: Fluffy Convict | last post by:
I am trying to write a script that changes a textarea wrap realtime, basically like you can switch to and from "wordwrap" in Microsofts Notepad. Because of a bug...
2
1753
by: Marten Van Keer | last post by:
Hi; I have two applications A and B *** Application B listens on a network stream with a callback function:
3
2964
by: imoon | last post by:
Hello EveryOne! I am working on TCP socket programmming Client/Server. I am using asynchronous methods.What it does - I have a server Application which can accept more...
2
7104
by: sa6113 | last post by:
I use this code : hostname = "192.168.1.4" username = "test" port = 22 password = '123456' # now connect try: sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1
4099
by: CFFAN | last post by:
<h3>Wrap Example</h3> <cfset inputText1="Inserts line break at the location of the first white space character (such as a space, tab, or new line) before the specified limit on a line. If a line has...
0
7052
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7092
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3000
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
565
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.