add GcrFileChooserDialog
@danw
Submitted by Dan Winship Link to original bug (#681070)
Description
spinning off from 679860
There should be a widget for selecting a file containing a CA/cert/key.
Since this file may be passed off to some helper program, we need to be able to restrict the allowable file formats. Eg, openvpn can only handle GCR_FORMAT_PEM_CERTIFICATE_X509 and GCR_FORMAT_PEM_PRIVATE_KEY, so we can't let the user select a DER or PKCS#12 file. (Maybe there should also be a helper widget for converting unsupported formats and re-saving in a supported format...)
Beyond that, I think we need to add some higher-level categorization as well... for instance, beyond just saying that we want a GCR_FORMAT_PEM_CERTIFICATE_X509, we might want to specify whether we're looking for a CA, a client certificate, or a server certificate, and only allow certificates with a matching purpose?
Or, eg, GCR_FORMAT_PEM_PRIVATE_KEY_RSA could mean either an X.509 private key or an OpenPGP private key, but it's very unlikely that you'd want to allow the user to select both kinds of keys in the same dialog, so we need to specify at a higher level which category of files we're looking for.
In some cases the user will need to provide a password to decrypt a file, and it seems that GTlsInteraction would work great for that, right? (And it also seems that probably we should provide GcrDialogPromptInteraction and GcrSystemPromptInteraction?)