1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

new release

This commit is contained in:
Werner Koch 1998-05-04 18:49:26 +00:00
parent 2cd12c5c8f
commit 42b03f6ebd
38 changed files with 341 additions and 254 deletions

View file

@ -527,14 +527,15 @@ generate_keypair()
tty_printf(_("You need a Passphrase to protect your secret key.\n\n") );
dek = m_alloc_secure( sizeof *dek );
s2k = m_alloc_secure( sizeof *s2k );
for(;;) {
dek->algo = CIPHER_ALGO_BLOWFISH;
s2k->mode = 1;
s2k->hash_algo = DIGEST_ALGO_RMD160;
rc = make_dek_from_passphrase( dek , 2, s2k );
if( rc == -1 ) {
dek = passphrase_to_dek( NULL, CIPHER_ALGO_BLOWFISH, s2k, 2 );
if( !dek ) {
tty_printf(_("passphrase not correctly repeated; try again.\n"));
}
else if( !dek->keylen ) {
m_free(dek); dek = NULL;
m_free(s2k); s2k = NULL;
tty_printf(_(
@ -543,16 +544,6 @@ generate_keypair()
"using this program with the option \"--change-passphrase\"\n\n"));
break;
}
else if( rc == G10ERR_PASSPHRASE ) {
tty_printf(_("passphrase not correctly repeated; try again.\n"));
}
else if( rc ) {
m_free(dek); dek = NULL;
m_free(s2k); s2k = NULL;
m_free(uid);
log_error("Error getting the passphrase: %s\n", g10_errstr(rc) );
return;
}
else
break; /* okay */
}