mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* skclist.c (build_sk_list): Don't need to warn about PGP-generated
Elgamal signing keys since we no longer support any Elgamal signing keys. * sign.c (sign_file, clearsign_file): Use "writing to" instead of "writing to file" to match other strings. * pkclist.c (check_signatures_trust): Fix typo. Noted by Moray Allan. This is Debian bug #278708. * passphrase.c (ask_passphrase, passphrase_to_dek): "password" -> "passphrase". * keyedit.c (show_key_with_all_names): Show designated revoker as part of translatable string.
This commit is contained in:
parent
0934d10e0f
commit
6ab8378c00
@ -1,3 +1,21 @@
|
||||
2004-10-28 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* skclist.c (build_sk_list): Don't need to warn about
|
||||
PGP-generated Elgamal signing keys since we no longer support any
|
||||
Elgamal signing keys.
|
||||
|
||||
* sign.c (sign_file, clearsign_file): Use "writing to" instead of
|
||||
"writing to file" to match other strings.
|
||||
|
||||
* pkclist.c (check_signatures_trust): Fix typo. Noted by Moray
|
||||
Allan. This is Debian bug #278708.
|
||||
|
||||
* passphrase.c (ask_passphrase, passphrase_to_dek): "password" ->
|
||||
"passphrase".
|
||||
|
||||
* keyedit.c (show_key_with_all_names): Show designated revoker as
|
||||
part of translatable string.
|
||||
|
||||
2004-10-28 Werner Koch <wk@g10code.com>
|
||||
|
||||
* Makefile.am (other_libs): New. Also include LIBICONV. Noted by
|
||||
|
@ -1309,7 +1309,7 @@ keyedit_menu( const char *username, STRLIST locusr,
|
||||
|
||||
if ( opt.command_fd != -1 )
|
||||
;
|
||||
else if( opt.batch && !have_commands )
|
||||
else if( opt.batch && !have_commands )
|
||||
{
|
||||
log_error(_("can't do this in batch mode\n"));
|
||||
goto leave;
|
||||
@ -2226,29 +2226,35 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
|
||||
primary=pk;
|
||||
}
|
||||
|
||||
if(with_revoker) {
|
||||
if(with_revoker)
|
||||
{
|
||||
if( !pk->revkey && pk->numrevkeys )
|
||||
BUG();
|
||||
BUG();
|
||||
else
|
||||
for(i=0;i<pk->numrevkeys;i++) {
|
||||
u32 r_keyid[2];
|
||||
char *user;
|
||||
const char *algo=
|
||||
pubkey_algo_to_string(pk->revkey[i].algid);
|
||||
for(i=0;i<pk->numrevkeys;i++)
|
||||
{
|
||||
u32 r_keyid[2];
|
||||
char *user;
|
||||
const char *algo=
|
||||
pubkey_algo_to_string(pk->revkey[i].algid);
|
||||
|
||||
keyid_from_fingerprint(pk->revkey[i].fpr,
|
||||
MAX_FINGERPRINT_LEN,r_keyid);
|
||||
|
||||
user=get_user_id_string (r_keyid);
|
||||
tty_printf (_("This key may be revoked by %s key "),
|
||||
algo?algo:"?");
|
||||
tty_print_utf8_string (user, strlen (user));
|
||||
if ((pk->revkey[i].class&0x40))
|
||||
tty_printf (_(" (sensitive)"));
|
||||
tty_printf ("\n");
|
||||
m_free(user);
|
||||
}
|
||||
}
|
||||
keyid_from_fingerprint(pk->revkey[i].fpr,
|
||||
MAX_FINGERPRINT_LEN,r_keyid);
|
||||
|
||||
user=get_user_id_string_native(r_keyid);
|
||||
tty_printf(_("This key may be revoked by %s key %s"),
|
||||
algo?algo:"?",user);
|
||||
|
||||
if(pk->revkey[i].class&0x40)
|
||||
{
|
||||
tty_printf(" ");
|
||||
tty_printf(_("(sensitive)"));
|
||||
}
|
||||
|
||||
tty_printf ("\n");
|
||||
m_free(user);
|
||||
}
|
||||
}
|
||||
|
||||
keyid_from_pk(pk,NULL);
|
||||
tty_printf("%s%c %4u%c/%s ",
|
||||
|
@ -1050,7 +1050,7 @@ ask_passphrase (const char *description,
|
||||
}
|
||||
else if (opt.batch)
|
||||
{
|
||||
log_error(_("can't query password in batch mode\n"));
|
||||
log_error(_("can't query passphrase in batch mode\n"));
|
||||
pw = NULL;
|
||||
}
|
||||
else {
|
||||
@ -1207,10 +1207,11 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo,
|
||||
pw = m_alloc_secure( strlen(fd_passwd)+1 );
|
||||
strcpy( pw, fd_passwd );
|
||||
}
|
||||
else if( opt.batch ) {
|
||||
log_error(_("can't query password in batch mode\n"));
|
||||
else if( opt.batch )
|
||||
{
|
||||
log_error(_("can't query passphrase in batch mode\n"));
|
||||
pw = m_strdup( "" ); /* return an empty passphrase */
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Read the passphrase from the tty or the command-fd. */
|
||||
pw = cpr_get_hidden("passphrase.enter", _("Enter passphrase: ") );
|
||||
|
@ -518,7 +518,7 @@ check_signatures_trust( PKT_signature *sig )
|
||||
" designated revoker!\n"));
|
||||
else
|
||||
log_info(_("WARNING: This key has been revoked by its owner!\n"));
|
||||
log_info(_(" This could mean that the signature is forgery.\n"));
|
||||
log_info(_(" This could mean that the signature is forged.\n"));
|
||||
show_revocation_reason( pk, 0 );
|
||||
}
|
||||
else if ((trustlevel & TRUST_FLAG_SUB_REVOKED) )
|
||||
|
16
g10/sign.c
16
g10/sign.c
@ -774,13 +774,14 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
|
||||
}
|
||||
else
|
||||
out = iobuf_create( outfile );
|
||||
if( !out ) {
|
||||
if( !out )
|
||||
{
|
||||
log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) );
|
||||
rc = G10ERR_CREATE_FILE;
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
else if( opt.verbose )
|
||||
log_info(_("writing to file `%s'\n"), outfile );
|
||||
log_info(_("writing to `%s'\n"), outfile );
|
||||
}
|
||||
else if( (rc = open_outfile( fname, opt.armor? 1: detached? 2:0, &out )))
|
||||
goto leave;
|
||||
@ -910,7 +911,7 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
|
||||
if( !inp )
|
||||
{
|
||||
log_error(_("can't open `%s': %s\n"),
|
||||
sl->d, strerror(errno) );
|
||||
sl->d,strerror(errno));
|
||||
rc = G10ERR_OPEN_FILE;
|
||||
goto leave;
|
||||
}
|
||||
@ -1031,13 +1032,14 @@ clearsign_file( const char *fname, STRLIST locusr, const char *outfile )
|
||||
}
|
||||
else
|
||||
out = iobuf_create( outfile );
|
||||
if( !out ) {
|
||||
if( !out )
|
||||
{
|
||||
log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) );
|
||||
rc = G10ERR_CREATE_FILE;
|
||||
goto leave;
|
||||
}
|
||||
}
|
||||
else if( opt.verbose )
|
||||
log_info(_("writing to file `%s'\n"), outfile );
|
||||
log_info(_("writing to `%s'\n"), outfile );
|
||||
}
|
||||
else if( (rc = open_outfile( fname, 1, &out )) )
|
||||
goto leave;
|
||||
|
@ -107,42 +107,41 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list,
|
||||
SK_LIST sk_list = NULL;
|
||||
int rc;
|
||||
|
||||
if( !locusr ) { /* use the default one */
|
||||
if( !locusr )
|
||||
{ /* use the default one */
|
||||
PKT_secret_key *sk;
|
||||
|
||||
sk = m_alloc_clear( sizeof *sk );
|
||||
sk->req_usage = use;
|
||||
if( (rc = get_seckey_byname( sk, NULL, unlock )) ) {
|
||||
free_secret_key( sk ); sk = NULL;
|
||||
log_error("no default secret key: %s\n", g10_errstr(rc) );
|
||||
free_secret_key( sk ); sk = NULL;
|
||||
log_error("no default secret key: %s\n", g10_errstr(rc) );
|
||||
}
|
||||
else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) ) {
|
||||
else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) )
|
||||
{
|
||||
SK_LIST r;
|
||||
|
||||
if( sk->version == 4 && (use & PUBKEY_USAGE_SIG)
|
||||
&& sk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) {
|
||||
log_info("this is a PGP generated "
|
||||
"Elgamal key which is NOT secure for signatures!\n");
|
||||
free_secret_key( sk ); sk = NULL;
|
||||
}
|
||||
else if( random_is_faked() && !is_insecure( sk ) ) {
|
||||
if( random_is_faked() && !is_insecure( sk ) )
|
||||
{
|
||||
log_info(_("key is not flagged as insecure - "
|
||||
"can't use it with the faked RNG!\n"));
|
||||
free_secret_key( sk ); sk = NULL;
|
||||
}
|
||||
else {
|
||||
}
|
||||
else
|
||||
{
|
||||
r = m_alloc( sizeof *r );
|
||||
r->sk = sk; sk = NULL;
|
||||
r->next = sk_list;
|
||||
r->mark = 0;
|
||||
sk_list = r;
|
||||
}
|
||||
}
|
||||
else {
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
free_secret_key( sk ); sk = NULL;
|
||||
log_error("invalid default secret key: %s\n", g10_errstr(rc) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
STRLIST locusr_orig = locusr;
|
||||
for(; locusr; locusr = locusr->next ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user