Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / December 2006

Tip: Looking for answers? Try searching our database.

X509Store returning removed certificates from store

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sandeepkg@gmail.com - 10 Dec 2006 13:48 GMT
Hi,

I have code like this to enumerate certificates from user's personal
store:

           X509Store personalStore = new X509Store(StoreName.My,
StoreLocation.CurrentUser);
           personalStore.Open(OpenFlags.OpenExistingOnly |
OpenFlags.ReadOnly);
           // read all certificates from personalStore.Certificates

To add or remove certificates from "My" store I invoke the shell's
certificate manager dialog using the API CryptUIDlgCertMgr of the
CRYPTUI.DLL

If I add new certificates to store using the CryptUIDlgCertMgr UI then
it is reflected in the collection that I get from X509Store. But if I
delete a certificate from same UI then it is still there in the
collection that I get from X509Store.

Any idea what I am missing here?

Thanks,
Sandeep
sandeepkg@gmail.com - 28 Dec 2006 09:33 GMT
Ok, I got the problem here. A CertificateAuthority type of certificate
with same name was also getting added while I was adding my certificate
to the personal store. This is not visible in shell certificate
dialog's personal store and hence always comes up in my code. Now I
filter my certificates based on the "Basic Constraints" key usage not
being of type certificate authority.

> Hi,
>
[quoted text clipped - 20 lines]
> Thanks,
> Sandeep

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.