Kaydet (Commit) 7add9c24 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

gpg4libre: Handle error when retrieving public key

Change-Id: I9543e47fb3302a5ca146a606305b24733f015a5d
üst 40c9ebbb
......@@ -211,7 +211,10 @@ void CertificateImpl::setCertificate(GpgME::Context* ctx, const GpgME::Key& key)
// extract key data, store into m_aBits
GpgME::Data data_out;
ctx->exportPublicKeys(key.keyID(), data_out);
GpgME::Error err = ctx->exportPublicKeys(key.keyID(), data_out);
if (err)
throw RuntimeException("The GpgME library failed to retrieve the public key");
assert(data_out.seek(0,SEEK_SET) == 0);
int len=0, curr=0; char buf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment