diff --git a/src/gpgme-json.c b/src/gpgme-json.c index 9b7e867a..a755500d 100644 --- a/src/gpgme-json.c +++ b/src/gpgme-json.c @@ -1144,15 +1144,6 @@ op_decrypt (cjson_t request, cjson_t result) if (decrypt_result->is_mime) xjson_AddBoolToObject (result, "mime", 1); - err = make_data_object (result, output, chunksize, "plaintext", -1); - output = NULL; - - if (err) - { - error_object (result, "Plaintext output failed: %s", gpg_strerror (err)); - goto leave; - } - verify_result = gpgme_op_verify_result (ctx); if (verify_result && verify_result->signatures) { @@ -1165,6 +1156,15 @@ op_decrypt (cjson_t request, cjson_t result) goto leave; } + err = make_data_object (result, output, chunksize, "plaintext", -1); + output = NULL; + + if (err) + { + error_object (result, "Plaintext output failed: %s", gpg_strerror (err)); + goto leave; + } + leave: release_context (ctx); gpgme_data_release (input);