Alex Rivera | Logout

C# Asynchronous Tcp Server with SSL. How can I get mutual authentication with iOS NSStream?

Asked 2012-09-30T01:34:14.653
8

This is my first post at stackoverflow.com, so if i do something wrong just let me know. So onto the problem.

I have a C# server currently running System.Net.Socket Sockets similar to the sample code Microsoft provided here.

I also have an Objective-C iPad client running NSInputStream/NSOutputStream bound to CFReadStream/CFWriteStream.

At present with only username/password authentication sent via an XML Serialized Object the client and server can communicate without any issues.

The problem I now have is that the communication has to be secure, and talking to clients, SSL encryption would be acceptable. However, I don't think they would accept just the "Server Certificate" as good enough. So I am trying to get the iPad client to use a "Client Certificate". I would like to enable true mutual authentication.

If I can't achieve mutual authentication, a third party VPN Software could be the better solution to secure the communication.

I haven't completed the conversion yet, but I have found a few articles that give me good examples of this, but there are no examples that fit my situation for client side certificates on the iPad. The samples that i have found are:

C# SSL Tcp Server

Apple Developer site that shows how to use SSL, but no client certificate

iPad SSL Stream without client certificate.

Edit
Report

1 Answer

1

Check out CFSocket and/or CkoSocket

answered 2012-11-30T19:22:07.097

Your Answer