12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 |
* General Public License for more details. |
* General Public License for more details. |
|
* |
|
|
* You should have received a copy of the GNU General Public License |
|
|
* along with WinPT; if not, write to the Free Software Foundation, |
|
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
15 |
*/ |
*/ |
|
|
|
16 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
17 |
#include <config.h> |
#include <config.h> |
18 |
#endif |
#endif |
42 |
if (!pass) |
if (!pass) |
43 |
return gpg_error (GPG_ERR_INV_ARG); |
return gpg_error (GPG_ERR_INV_ARG); |
44 |
|
|
|
/* XXX: check for passphrase.enter. */ |
|
45 |
if (!WriteFile (hd, pass, strlen (pass), &n, NULL)) |
if (!WriteFile (hd, pass, strlen (pass), &n, NULL)) |
46 |
log_debug ("sym_passphrase_cb: WriteFile() failed ec=%d\n", w32_errno); |
log_debug ("sym_passphrase_cb: WriteFile() failed ec=%d\n", w32_errno); |
47 |
if (!WriteFile (hd, "\n", 1, &n, NULL)) |
if (!WriteFile (hd, "\n", 1, &n, NULL)) |
74 |
if (rc) |
if (rc) |
75 |
goto leave; |
goto leave; |
76 |
rc = gpgme_data_new (&ciph); |
rc = gpgme_data_new (&ciph); |
77 |
|
if (rc) |
78 |
|
goto leave; |
79 |
gpgme_set_armor (ctx, 1); |
gpgme_set_armor (ctx, 1); |
80 |
gpgme_set_textmode (ctx, 1); |
gpgme_set_textmode (ctx, 1); |
81 |
|
|