26 |
#include "wptTypes.h" |
#include "wptTypes.h" |
27 |
#include "wptAgent.h" |
#include "wptAgent.h" |
28 |
#include "wptNLS.h" |
#include "wptNLS.h" |
29 |
|
#include "wptCrypto.h" |
30 |
#include "wptGPG.h" |
#include "wptGPG.h" |
31 |
#include "wptCommonCtl.h" |
#include "wptCommonCtl.h" |
32 |
#include "wptRegistry.h" |
#include "wptRegistry.h" |
37 |
#include "wptContext.h" /* for passphrase_s */ |
#include "wptContext.h" /* for passphrase_s */ |
38 |
#include "wptDlgs.h" |
#include "wptDlgs.h" |
39 |
|
|
40 |
|
|
41 |
/* Sign the clipboard contents with the key @keyid and wrap |
/* Sign the clipboard contents with the key @keyid and wrap |
42 |
text lines to @wraplen (0 disable line wrapping). |
text lines to @wraplen (0 disable line wrapping). |
43 |
Return value: 0 on success. */ |
Return value: 0 on success. */ |
109 |
|
|
110 |
set_gpg_passphrase_cb (&pwd, ctx, GPG_CMD_SIGN, dlg, _("Signing")); |
set_gpg_passphrase_cb (&pwd, ctx, GPG_CMD_SIGN, dlg, _("Signing")); |
111 |
err = gpg_clip_sign (ctx, signer, n ); |
err = gpg_clip_sign (ctx, signer, n ); |
112 |
memset (pwd.pwd, 0, sizeof pwd.pwd); |
wipememory (pwd.pwd, sizeof (pwd.pwd)); |
113 |
if (gpgme_err_code (err) == GPG_ERR_BAD_PASSPHRASE) |
if (gpgme_err_code (err) == GPG_ERR_BAD_PASSPHRASE) |
114 |
agent_del_cache (pwd.keyid); |
agent_del_cache (pwd.keyid); |
115 |
if (err) |
if (err) |
136 |
|
|
137 |
switch( msg ) { |
switch( msg ) { |
138 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
139 |
#ifndef LANG_DE |
SetWindowText (dlg, _("Signing")); |
140 |
SetWindowText( dlg, _("Signing") ); |
|
|
#endif |
|
141 |
kc = keycache_get_ctx (KEYCACHE_PUB); |
kc = keycache_get_ctx (KEYCACHE_PUB); |
142 |
if (!kc) |
if (!kc) |
143 |
BUG( NULL ); |
BUG( NULL ); |