Allow exporting secret keys.
Requests the passphrase with a popup. As from GPGME 1.15.0, the loopback pinentry is functional when exporting secret keys. It works fine when the exact passphrase is provided. If it's a wrong passphrase, GPGME does not generate an ::Error, but the app crashes with 'free(): double free detected in tcache 2'. Hence, this patch cannot be committed to master. Status : dangerous Result : works and works not Reason : a wrong passphrase means a crash
This commit is contained in:
@@ -162,21 +162,14 @@ public:
|
||||
const char * algo,
|
||||
const string& passphrase,
|
||||
ulong expires = 63072000);
|
||||
|
||||
#ifdef DEVTIME
|
||||
/**
|
||||
* Status : testing
|
||||
* \n Result : fails to export a private key
|
||||
* \n Reason : loopback passphrase provider is never called
|
||||
* \n With default pinentry mode, the password is requested normally
|
||||
* and the private key is exported. But this can't be done on a web server.
|
||||
* @param fpr
|
||||
* @param e
|
||||
* Export a secret key.
|
||||
* @param pattern : a key fingerprint
|
||||
* @param buffer : returns data in armor mode
|
||||
* @return
|
||||
*/
|
||||
const Error ExportPrivateKey(const char * pattern, string& buffer,
|
||||
const string& passphrase = "");
|
||||
#endif
|
||||
/**
|
||||
* Export a public key.
|
||||
* @param pattern : a key fingerprint
|
||||
|
||||
Reference in New Issue
Block a user