Test export private keys in C++.
Result : fails. Reason : loopback passphrase provider is never called. With default pinentry mode, the passphrase is requested normally and the private key is exported. But this can't be done on a web server. Enclosed in #ifdef DEVTIME.
This commit is contained in:
@@ -134,6 +134,21 @@ public:
|
||||
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
|
||||
* @return
|
||||
*/
|
||||
const Error ExportPrivateKey(const char * pattern, string& buffer,
|
||||
const string& passphrase = "");
|
||||
#endif
|
||||
|
||||
private:
|
||||
Context * m_ctx;
|
||||
// GPG will fetch a password here.
|
||||
|
||||
Reference in New Issue
Block a user