Answered by:
Is a StreamSocket client compatible to openssl-enabled server?

Question
-
Hi,
I'm wondering if a client using StreamSocket class could connect to a server running openssl via TCP? Does a call of ConnectAsyc() take care of ssl stuffs like handshake etc.? I have no experience on StreamSocket, but I assume it follows the standard SSL protocol. Could anybody confirm my assumption? Also about DatagramSocket, I assume it's fully compatible to BSD UDP socket or winsock, i.e., a client using DatagramSocket could talk to a server running BSD socket or winsock. Am I right?
Thanks!
Friday, September 14, 2012 11:40 AM
Answers
-
Hi ofox.cn,
I used ssl connection of StreamSocket to connect MS lync server and it able to initiate for SSL/TLS connection request.
There is no option in case of DatagramSocket for enabling SSL/TLS connection. SSL/TLS connection only used in TCP communication.
- Marked as answer by Min ZhuMember Tuesday, October 9, 2012 7:15 AM
Wednesday, September 19, 2012 1:59 PM
All replies
-
Hi,
I think this thread can help you.
http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/2662cac1-fbb6-4ac4-8553-06375d798720To get SSL/TLS connection you can use SocketProtectionLevel enum class under streamsocket->connectAsync() instead of Openssl. This give you almost similar cryptographic encryption of Openssl.
Best regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us
Monday, September 17, 2012 6:39 AM -
Thanks, Jesse!
Yes, I knew the level enum per my search previously, that's why I was mentioning class StreamSocket and method connectAsync() in my original post.
Actually my question is whether the class StreamSocket in metro could be compatible to a legacy server running openssl+winsock where 'compatible' means StreamSocket client could setup a secure connection and talk to openssl server. The similar situation goes to DatagramSocket client vs. winsock(UDP) server. Could you confirm please?
Tuesday, September 18, 2012 2:07 AM -
Hi ofox.cn,
I used ssl connection of StreamSocket to connect MS lync server and it able to initiate for SSL/TLS connection request.
There is no option in case of DatagramSocket for enabling SSL/TLS connection. SSL/TLS connection only used in TCP communication.
- Marked as answer by Min ZhuMember Tuesday, October 9, 2012 7:15 AM
Wednesday, September 19, 2012 1:59 PM -
Mokarrom, Thank you! Great to know that. Based on your info, I would believe StreamSocket follows the standard SSL protocol and could talk to an openssl-enabled server.
Regarding DatagramSocket vs. UDP, I didn't mean SSL in this context. I just meant the compatibility of DatagramSocket client vs. legacy UDP(e.g., winsock) server. Now I would likely believe they are good to talk each other in a standard UDP way.
If these assumptions are not true, plz drop a msg to let me know. Thanks a lot!
Thursday, September 20, 2012 2:28 AM