gnupg/g10 (ChangeLog keyedit.c passphrase.c pkclist.c sign.c
skclist.c)
cvs user dshaw
cvs at cvs.gnupg.org
Fri Oct 29 00:05:04 CEST 2004
Date: Friday, October 29, 2004 @ 00:09:09
Author: dshaw
Path: /cvs/gnupg/gnupg/g10
Modified: ChangeLog keyedit.c passphrase.c pkclist.c sign.c skclist.c
* 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.
--------------+
ChangeLog | 18 ++++++++++++++++++
keyedit.c | 50 ++++++++++++++++++++++++++++----------------------
passphrase.c | 9 +++++----
pkclist.c | 2 +-
sign.c | 16 +++++++++-------
skclist.c | 35 +++++++++++++++++------------------
6 files changed, 78 insertions(+), 52 deletions(-)
Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.634 gnupg/g10/ChangeLog:1.635
--- gnupg/g10/ChangeLog:1.634 Thu Oct 28 20:57:50 2004
+++ gnupg/g10/ChangeLog Fri Oct 29 00:09:09 2004
@@ -1,3 +1,21 @@
+2004-10-28 David Shaw <dshaw at 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 at g10code.com>
* Makefile.am (other_libs): New. Also include LIBICONV. Noted by
Index: gnupg/g10/keyedit.c
diff -u gnupg/g10/keyedit.c:1.155 gnupg/g10/keyedit.c:1.156
--- gnupg/g10/keyedit.c:1.155 Thu Oct 28 05:57:30 2004
+++ gnupg/g10/keyedit.c Fri Oct 29 00:09:09 2004
@@ -1309,7 +1309,7 @@
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 @@
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);
-
- 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);
- }
- }
+ 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_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 ",
Index: gnupg/g10/passphrase.c
diff -u gnupg/g10/passphrase.c:1.66 gnupg/g10/passphrase.c:1.67
--- gnupg/g10/passphrase.c:1.66 Thu Oct 28 05:57:30 2004
+++ gnupg/g10/passphrase.c Fri Oct 29 00:09:09 2004
@@ -1050,7 +1050,7 @@
}
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 @@
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: ") );
Index: gnupg/g10/pkclist.c
diff -u gnupg/g10/pkclist.c:1.106 gnupg/g10/pkclist.c:1.107
--- gnupg/g10/pkclist.c:1.106 Thu Oct 28 03:58:01 2004
+++ gnupg/g10/pkclist.c Fri Oct 29 00:09:09 2004
@@ -518,7 +518,7 @@
" 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) )
Index: gnupg/g10/sign.c
diff -u gnupg/g10/sign.c:1.133 gnupg/g10/sign.c:1.134
--- gnupg/g10/sign.c:1.133 Thu Oct 28 04:14:06 2004
+++ gnupg/g10/sign.c Fri Oct 29 00:09:09 2004
@@ -774,13 +774,14 @@
}
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 @@
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 @@
}
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;
Index: gnupg/g10/skclist.c
diff -u gnupg/g10/skclist.c:1.26 gnupg/g10/skclist.c:1.27
--- gnupg/g10/skclist.c:1.26 Thu Oct 28 03:58:01 2004
+++ gnupg/g10/skclist.c Fri Oct 29 00:09:09 2004
@@ -107,42 +107,41 @@
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 ) {
More information about the Gnupg-commits
mailing list