74 |
gpgme_error_t err; |
gpgme_error_t err; |
75 |
gpgme_data_t ciph = NULL; |
gpgme_data_t ciph = NULL; |
76 |
gpgme_data_t plain = NULL; |
gpgme_data_t plain = NULL; |
77 |
|
int is_utf8=0; |
78 |
|
|
79 |
err = gpg_data_new_from_clipboard (&ciph, 0); |
err = gpg_data_utf8_new_from_clipboard (&ciph, 0, &is_utf8); |
80 |
if (err) |
if (err) |
81 |
return err; |
return err; |
82 |
|
|
87 |
} |
} |
88 |
|
|
89 |
err = gpgme_op_decrypt_verify (ctx, ciph, plain); |
err = gpgme_op_decrypt_verify (ctx, ciph, plain); |
90 |
|
if (is_utf8) |
91 |
gpg_data_release_and_set_clipboard (plain, 0); |
gpg_data_release_utf8_to_clipboard (plain); |
92 |
|
else |
93 |
|
gpg_data_release_to_clipboard (plain, 0); |
94 |
gpgme_data_release (ciph); |
gpgme_data_release (ciph); |
95 |
return err; |
return err; |
96 |
} |
} |
280 |
goto leave; |
goto leave; |
281 |
} |
} |
282 |
|
|
|
#if 0 |
|
|
if (status_bad_mdc) { /* XXX: Bad MDC */ |
|
|
const char *s = |
|
|
_("WARNING: encrypted message has been manipulated!\n" |
|
|
"\n" |
|
|
"Do *NOT* trust any text or data output from this file!\n" |
|
|
"It is likely that the data was corrupted in transport\n" |
|
|
"but it might be also possible that this is part of an attack."); |
|
|
msg_box (hwnd, s, _("*** IMPORTANT ***"), MB_INFO); |
|
|
} |
|
|
#endif |
|
|
|
|
283 |
show_msg (GetDesktopWindow (), 1500, _("GnuPG Status: Finished")); |
show_msg (GetDesktopWindow (), 1500, _("GnuPG Status: Finished")); |
284 |
|
|
285 |
sigres = gpgme_op_verify_result (ctx); |
sigres = gpgme_op_verify_result (ctx); |