[Mono-bugs] [Bug 530212] New: Unable to access named keystores.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Aug 12 01:26:03 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=530212
Summary: Unable to access named keystores.
Classification: Mono
Product: Mono: Class Libraries
Version: 2.0.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System.Security
AssignedTo: spouliot at novell.com
ReportedBy: kunnis at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64;
Trident/4.0; GTB6; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR
3.0.04506.648; .NET CLR 3.5.21022; MS-RTC LM 8; .NET CLR 3.0.4506.2152; .NET
CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
In System.Security.Cryptography.X509Certificates.StoreName has a list of all of
the named keystores. You can not access the named keystores by this method.
The keystore for StoreName.Root is actually named "Trusted" (defined in the
bottom of this file:
http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/Mono.Security/Mono.Security.X509/X509Stores.cs?view=markup
)
http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509store.x509store.aspx
says you should be able to access the named store, by calling:
X509Store(StoreName.Root), but that returns an empty Store.
There is already one mapping in constructor: public X509Store (StoreName
storeName, StoreLocation storeLocation)
(
http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/System/System.Security.Cryptography.X509Certificates/X509Store.cs?revision=92794&view=markup
)
for the CertificateAuthority cert. I think there should be more mappings,
including one to map StoreName.Root to the name "Trusted", along with the rest
of the named stores.
Reproducible: Always
Steps to Reproduce:
1. Run mozroots --import --sync This will create the 140 default trusted
CAs.
2. Write an application with this in the Main():
System.Security.Cryptography.X509Certificates.X509Store st = new
X509Store(StoreName.Root); //Defaults to the local user store, which mozroots
populates by default.
Console.WriteLine(st.Certificates.Count);
3. Run the application.
Actual Results:
Displays 0 certs in the container.
Expected Results:
Expect the 140 certs loaded in step 1.
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list