none
X509Store - Add and Remove Certs RRS feed

  • Question

  • All

    After reviewing the X509Certificates namespace and looking/testing the differences between the full and compact framework I have come to the conclusion that while I can view the Certificates in any X509Store the compact framework does not allow me any managed API to modify that store.

    i.e. The CF X509Store class has stripped out the Add() and Remove() methods (and their variants) and using the X509Store.Certificates property provides a COPY of the certs collection so modification is pointless.

    As a result, the only way to alter the X509Stores in code is to access the un-managed API using PInvoke.

    Am I correct? Or have I overlooked the managed API that allows me this access?

    Thanks
    Bryan

    Friday, March 13, 2009 6:23 PM

Answers

  • Hi Bryan,

    Yes, you are right. That's a limitation of .NET Compact Framework so you have to fall back on native API. As you know .NET CF is not as powerful as its desktop counterpart, in order to reduce the footprint on resource constrained devices. The following page lists its

    Differences with the .NET Framework 

    Regards,
    Chunsheng Tang
    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by Bryan Roth Monday, March 16, 2009 12:59 PM
    Monday, March 16, 2009 8:22 AM
    Moderator

All replies

  • Hi Bryan,

    Yes, you are right. That's a limitation of .NET Compact Framework so you have to fall back on native API. As you know .NET CF is not as powerful as its desktop counterpart, in order to reduce the footprint on resource constrained devices. The following page lists its

    Differences with the .NET Framework 

    Regards,
    Chunsheng Tang
    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    • Marked as answer by Bryan Roth Monday, March 16, 2009 12:59 PM
    Monday, March 16, 2009 8:22 AM
    Moderator
  • Chunsheng

    Yes I am aware of all of the differences and limitations of the CF when compared to the Desktop version and the reasons why. However, there are several cases where I am completely confounded as to why MS decided to leave out functionality, and the Add() and Remove() methods of the X509Store is another one of those.

    My personal favorite is leaving the method signature for BeginInvoke() and EndInvoke() on Delegates and throwing if they are used??? If they had left them out I could have used extension methods to cover them in the CF case. I digress..


    Thanks
    Bryan
    Monday, March 16, 2009 12:59 PM
  • Maybe you'd like to post your suggestions to http://connect.microsoft.com .
    Please mark the post that helps you, and unmark that does not. This benefits our community members.
    Tuesday, March 17, 2009 3:32 AM
    Moderator