Answered by:
How to handle client certificates in Windows Phone 8?

Question
-
Hi!
My task is to convert an existing windows forms app to windows phone 8. The app communicates with the server by sending encrypted json requests via an SSL Connection (and also SMIME)
I have a problem when it comes to the certificates. In the windows client, it inställs the public key (a pem file) to the appdata folder, and this file is then used when talking to the server:
request.ClientCertificates.Add(new System.Security.X509Certificates.X509Certificate(@"c:\temp\publickey.pem"));
The problem I have in phone 8 is that the entire process for using certificates seem to have changed?
I can't find any info on how I use this pem file with the HttpWebRequest to encrypt the request data...
kind regards
S
Friday, February 8, 2013 10:39 AM
Answers
-
Client certificates aren't supported on the phone at this time.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402533
- Proposed as answer by eschumac Friday, February 8, 2013 2:22 PM
- Marked as answer by Matt SmallMicrosoft employee Friday, February 8, 2013 4:19 PM
Friday, February 8, 2013 2:22 PM
All replies
-
Client certificates aren't supported on the phone at this time.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff402533
- Proposed as answer by eschumac Friday, February 8, 2013 2:22 PM
- Marked as answer by Matt SmallMicrosoft employee Friday, February 8, 2013 4:19 PM
Friday, February 8, 2013 2:22 PM -
Hi!
We are actually working on a very similar problem and have yet to find a solution for this problem.
We have an iOS app that we now want to deploy on Phone 8, and in the iOS app, when the app is installed, it writes a public key file (pem file) to the app storage, and then uses it when communicating to the server.
Is there a way to do this in Windows Phone 8, without actually having to install it on Phone 8 (which the above answer from eschumach state that is impossible). Is there a way to do https communication via httpwebrequest and somehow attach a pem file stored in local storage, just by using the framework classes, and not bother with the OS capabilities of handling certificates.
Without being able to use the pem file (and the p12 file we get from the server to be used for encrypting the JSON messages) there is no hope of porting this iOS app... so please, give us some hope, or at least a workaround!!
best regards
Henrik
Henrik
Saturday, February 9, 2013 7:13 PM -
Try looking at Bouncy Castle. Its also good to open your own threads rather than to reply to an answered thread.
- Edited by eschumac Sunday, February 10, 2013 3:10 AM
- Proposed as answer by Henrik Nordgren Sunday, February 10, 2013 9:52 PM
Sunday, February 10, 2013 3:10 AM -
Hi!
Thanks for this info! I didn't notice that the thread was replied, Im fairly new to the msdn forms. I'll be more careful in the future!
kind regards
Henrik
Henrik
Sunday, February 10, 2013 9:52 PM -
Hi Henrik!
Have you had any progress on this issue?
Sorry, for posting on this thread, since it's already answered, but I'm currently having the same issue...
Regards, Øyvind.
Tuesday, February 12, 2013 10:05 PM