Skip to content

Instantly share code, notes, and snippets.

@AlbertoMonteiro
Last active September 27, 2017 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlbertoMonteiro/181429137fb475503e873a907c23ebba to your computer and use it in GitHub Desktop.
Save AlbertoMonteiro/181429137fb475503e873a907c23ebba to your computer and use it in GitHub Desktop.
Selecionar somente certificados com intuito de realizar assinatura digital
var store = new X509Store("MY");
store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
var collection2 = store.Certificates.Find(X509FindType.FindByKeyUsage, X509KeyUsageFlags.DigitalSignature, false);
var scollection = X509Certificate2UI.SelectFromCollection(collection2, "Certificado(s) Digital(is) disponível(is)", "Selecione o certificado digital para uso no aplicativo", X509SelectionFlag.SingleSelection);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment