Hi,

I was just wondering if there is a way to get the collection of SSL certificates from the windows certificate store / registry. For example, if i have a server that requires client side authentication, how can i programatically obtain the certificate in the client? Using poco's netssl classes, i need to traverse the the windows default certificate store / registry, is this possible?

I see the only way that a context can be constructed currently is by specifying the location of both the CA .pem file and the client.pem file, but what happens if i have imported these into the certificate store? If i have 2 client certificates for the same host, I would need to select 1 of them based on an alias or something.

FYI - in C#, this can be achieved by the following code, the result of which can then be passed into the SslStream.AuthenticateAsClient() method....

                X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
                store.Open(OpenFlags.ReadOnly);
                X509Certificate2Collection myCerts = (X509Certificate2Collection)store.Certificates;

Many thanks

Paul

+++++++++++++++++++++++++++++++++++++++++++
Paul Weiss
my-Channels - Technologies working together
Tel: +44 (0)207 375 7402
Mob: +44 (0)777 156 0644
Fax: +44 (0)207 3751575

http://www.my-channels.com/
+++++++++++++++++++++++++++++++++++++++++++ 


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________