aboutsummaryrefslogtreecommitdiffstats
path: root/agent/genkey.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2010-04-14 11:24:02 +0000
committerWerner Koch <[email protected]>2010-04-14 11:24:02 +0000
commit31d7bdfe771853a480203d7d4a661d476d2231a4 (patch)
tree470c4ed27b06188b1a1a000ce6fb2c41b260b96d /agent/genkey.c
parent2010-04-13 Marcus Brinkmann <[email protected]> (diff)
downloadgnupg-31d7bdfe771853a480203d7d4a661d476d2231a4.tar.gz
gnupg-31d7bdfe771853a480203d7d4a661d476d2231a4.zip
Whole lot of changes to support CE.
Diffstat (limited to 'agent/genkey.c')
-rw-r--r--agent/genkey.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/agent/genkey.c b/agent/genkey.c
index d86296390..9e2f32480 100644
--- a/agent/genkey.c
+++ b/agent/genkey.c
@@ -117,7 +117,8 @@ check_passphrase_pattern (ctrl_t ctrl, const char *pw)
fclose (infp);
return 1; /* Error - assume password should not be used. */
}
- rewind (infp);
+ fseek (infp, 0, SEEK_SET);
+ clearerr (infp);
i = 0;
argv[i++] = "--null";
@@ -134,7 +135,8 @@ check_passphrase_pattern (ctrl_t ctrl, const char *pw)
result = 0; /* Success; i.e. no match. */
/* Overwrite our temporary file. */
- rewind (infp);
+ fseek (infp, 0, SEEK_SET);
+ clearerr (infp);
for (i=((strlen (pw)+99)/100)*100; i > 0; i--)
putc ('\xff', infp);
fflush (infp);