aboutsummaryrefslogtreecommitdiffstats
path: root/g10/passphrase.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-08-08 19:27:00 +0000
committerWerner Koch <[email protected]>1998-08-08 19:27:00 +0000
commit6ccf4e0f80547ecaf2df19443093d9a53e7dc57e (patch)
treea5ea0d7ce2a6eb8a7f74ccfaf3921b08e7ec4997 /g10/passphrase.c
parentnew (diff)
downloadgnupg-6ccf4e0f80547ecaf2df19443093d9a53e7dc57e.tar.gz
gnupg-6ccf4e0f80547ecaf2df19443093d9a53e7dc57e.zip
ready for a new release
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r--g10/passphrase.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c
index 920d508cd..b9f41510f 100644
--- a/g10/passphrase.c
+++ b/g10/passphrase.c
@@ -32,6 +32,7 @@
#include "keydb.h"
#include "main.h"
#include "i18n.h"
+#include "status.h"
static int pwfd = -1;
static char *next_pw = NULL;
@@ -129,6 +130,12 @@ passphrase_to_dek( u32 *keyid, int cipher_algo, STRING2KEY *s2k, int mode )
tty_printf("\n");
free_public_key( pk );
}
+ else if( keyid && !next_pw ) {
+ char buf[20];
+ sprintf( buf, "%08lX%08lX", (ulong)keyid[0], (ulong)keyid[1] );
+ write_status_text( STATUS_NEED_PASSPHRASE, buf );
+ }
+
if( next_pw ) {
pw = next_pw;
next_pw = NULL;
@@ -157,10 +164,11 @@ passphrase_to_dek( u32 *keyid, int cipher_algo, STRING2KEY *s2k, int mode )
else if( opt.batch )
log_fatal("Can't query password in batchmode\n");
else {
- pw = tty_get_hidden("Enter pass phrase: " );
+ pw = cpr_get_hidden(N_("passphrase.enter"), _("Enter pass phrase: ") );
tty_kill_prompt();
- if( mode == 2 ) {
- char *pw2 = tty_get_hidden("Repeat pass phrase: " );
+ if( mode == 2 && !cpr_enabled() ) {
+ char *pw2 = cpr_get_hidden(N_("passphrase.repeat"),
+ _("Repeat pass phrase: ") );
tty_kill_prompt();
if( strcmp(pw, pw2) ) {
m_free(pw2);
@@ -205,7 +213,7 @@ hash_passphrase( DEK *dek, char *pw, STRING2KEY *s2k, int create )
if( s2k->mode == 3 ) {
count = (16ul + (s2k->count & 15)) << ((s2k->count >> 4) + 6);
- log_info("s2k iteration count=%lu\n", count );
+ log_debug("s2k iteration count=%lu\n", count );
}
for(;;) {
md_write( md, s2k->salt, 8 );