How to retrieve certificate from my store personal? [closed]
- by shariphwar
I want to use the following code by java program. How to convert the following C# code to java code or how to write just like this code by java programming language?
Access certificate by C#
X509Store store = null;
X509Certificate2Collection _recipients = null;
// select the right store
//if (lstRecipients.Text=="Personal")
store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
// else
// store = new X509Store(StoreName.AddressBook, StoreLocation.CurrentUser);
// open store and show certificate picker
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection tempCollection = X509Certificate2UI.SelectFromCollection(store.Certificates, "Crypter", "Select a Certificate for Encryption", X509SelectionFlag.MultiSelection);
store.Close();