Remove unused function.
We don't need CheckPassphrase() anymore.
This commit is contained in:
@@ -347,32 +347,6 @@ const Error GpgMEWorker::CreateSubKey(GpgME::Key& k,
|
||||
return e;
|
||||
}
|
||||
|
||||
const Error GpgMEWorker::CheckPassphrase(const char* fpr,
|
||||
const string& passphrase)
|
||||
{
|
||||
Error e;
|
||||
Context * ctx = Context::createForProtocol(Protocol::OpenPGP);
|
||||
LoopbackPassphraseProvider * ppp = new LoopbackPassphraseProvider(passphrase);
|
||||
ctx->setPinentryMode(Context::PinentryMode::PinentryLoopback);
|
||||
ctx->setPassphraseProvider(ppp);
|
||||
|
||||
Key k = FindKey(fpr, e, true);
|
||||
if (e.code() != 0)
|
||||
return e;
|
||||
e = ctx->addSigningKey(k);
|
||||
if (e.code() != 0)
|
||||
return e;
|
||||
Data plain("dummy");
|
||||
Data signature;
|
||||
SigningResult result = ctx->sign(plain, signature, SignatureMode::Detached);
|
||||
e = result.error();
|
||||
|
||||
delete ppp;
|
||||
delete ctx;
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
const Error GpgMEWorker::ExportPrivateKey(const char * pattern, string& buffer,
|
||||
const string& passphrase)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user