diff options
author | David Shaw <[email protected]> | 2004-02-26 02:03:27 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-02-26 02:03:27 +0000 |
commit | f2148f03c55bf5a814aeb61b7d853ba12b6132b3 (patch) | |
tree | dc4e1c8fe2bf64930ca4ed53e7faa2908cf50bb9 | |
parent | * gpgkeys_ldap.c (send_key): List pgpCertID as one of the deleted (diff) | |
download | gnupg-f2148f03c55bf5a814aeb61b7d853ba12b6132b3.tar.gz gnupg-f2148f03c55bf5a814aeb61b7d853ba12b6132b3.zip |
* delkey.c (do_delete_key): Allow deleting a public key with a secret
present if --expert is set.
* plaintext.c (handle_plaintext): Make bytecount static so it works with
multiple literal packets inside a message.
* encode.c, helptext.c (keygen.algo, keygen.algo.elg_se), keygen.c
(ask_algo), sig-check.c (do_check_messages), skclist.c (build_sk_list):
Rename "ElGamal" to "Elgamal" as that is the proper spelling nowadays.
Suggested by Jon Callas.
Diffstat (limited to '')
-rw-r--r-- | g10/ChangeLog | 13 | ||||
-rw-r--r-- | g10/delkey.c | 5 | ||||
-rw-r--r-- | g10/encode.c | 2 | ||||
-rw-r--r-- | g10/helptext.c | 27 | ||||
-rw-r--r-- | g10/keygen.c | 6 | ||||
-rw-r--r-- | g10/plaintext.c | 9 | ||||
-rw-r--r-- | g10/sig-check.c | 2 | ||||
-rw-r--r-- | g10/skclist.c | 4 |
8 files changed, 35 insertions, 33 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 03aa220ed..3f0d6308e 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,16 @@ +2004-02-25 David Shaw <[email protected]> + + * delkey.c (do_delete_key): Allow deleting a public key with a + secret present if --expert is set. + + * plaintext.c (handle_plaintext): Make bytecount static so it + works with multiple literal packets inside a message. + + * encode.c, helptext.c (keygen.algo, keygen.algo.elg_se), keygen.c + (ask_algo), sig-check.c (do_check_messages), skclist.c + (build_sk_list): Rename "ElGamal" to "Elgamal" as that is the + proper spelling nowadays. Suggested by Jon Callas. + 2004-02-24 David Shaw <[email protected]> * plaintext.c: Copyright. diff --git a/g10/delkey.c b/g10/delkey.c index 54cbc7136..44e50f3b5 100644 --- a/g10/delkey.c +++ b/g10/delkey.c @@ -1,5 +1,6 @@ /* delkey.c - delete keys - * Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, + * 2004 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -98,7 +99,7 @@ do_delete_key( const char *username, int secret, int *r_sec_avail ) pk = node->pkt->pkt.public_key; keyid_from_pk( pk, keyid ); rc = seckey_available( keyid ); - if( !rc ) { + if( !rc && !opt.expert ) { *r_sec_avail = 1; rc = -1; goto leave; diff --git a/g10/encode.c b/g10/encode.c index f841dc97b..67b7ace52 100644 --- a/g10/encode.c +++ b/g10/encode.c @@ -802,7 +802,7 @@ write_pubkey_enc_from_list( PK_LIST pk_list, DEK *dek, IOBUF out ) * algorithm number PK->PUBKEY_ALGO and pass it to pubkey_encrypt * which returns the encrypted value in the array ENC->DATA. * This array has a size which depends on the used algorithm - * (e.g. 2 for ElGamal). We don't need frame anymore because we + * (e.g. 2 for Elgamal). We don't need frame anymore because we * have everything now in enc->data which is the passed to * build_packet() */ diff --git a/g10/helptext.c b/g10/helptext.c index 0150c549c..ebaa48501 100644 --- a/g10/helptext.c +++ b/g10/helptext.c @@ -1,5 +1,6 @@ /* helptext.c - English help texts - * Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, + * 2004 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -71,29 +72,17 @@ static struct helptexts { const char *key; const char *help; } helptexts[] = { { "keygen.algo", N_( "Select the algorithm to use.\n" "\n" -"DSA (aka DSS) is the digital signature algorithm which can only be used\n" -"for signatures. This is the suggested algorithm because verification of\n" -"DSA signatures are much faster than those of ElGamal.\n" +"DSA (aka DSS) is the Digital Signature Algorithm and can only be used\n" +"for signatures.\n" "\n" -"ElGamal is an algorithm which can be used for signatures and encryption.\n" -"OpenPGP distinguishs between two flavors of this algorithms: an encrypt only\n" -"and a sign+encrypt; actually it is the same, but some parameters must be\n" -"selected in a special way to create a safe key for signatures: this program\n" -"does this but other OpenPGP implementations are not required to understand\n" -"the signature+encryption flavor.\n" +"Elgamal is an encrypt-only algorithm.\n" "\n" -"The first (primary) key must always be a key which is capable of signing;\n" -"this is the reason why the encryption only ElGamal key is not available in\n" -"this menu." +"RSA may be used for signatures or encryption.\n" +"\n" +"The first (primary) key must always be a key which is capable of signing." )}, -{ "keygen.algo.elg_se", N_( -"Although these keys are defined in RFC2440 they are not suggested\n" -"because they are not supported by all programs and signatures created\n" -"with them are quite large and very slow to verify." -)}, - { "keygen.algo.rsa_se", N_( "In general it is not a good idea to use the same key for signing and\n" "encryption. This algorithm should only be used in certain domains.\n" diff --git a/g10/keygen.c b/g10/keygen.c index dea3aceea..46490e3db 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -1041,7 +1041,7 @@ check_valid_days( const char *s ) /**************** - * Returns: 0 to create both a DSA and a ElGamal key. + * Returns: 0 to create both a DSA and a Elgamal key. * and only if key flags are to be written the desired usage. */ static int @@ -1053,10 +1053,10 @@ ask_algo (int addmode, unsigned int *r_usage) *r_usage = 0; tty_printf(_("Please select what kind of key you want:\n")); if( !addmode ) - tty_printf(_(" (%d) DSA and ElGamal (default)\n"), 1 ); + tty_printf(_(" (%d) DSA and Elgamal (default)\n"), 1 ); tty_printf( _(" (%d) DSA (sign only)\n"), 2 ); if( addmode ) - tty_printf( _(" (%d) ElGamal (encrypt only)\n"), 3 ); + tty_printf( _(" (%d) Elgamal (encrypt only)\n"), 3 ); tty_printf( _(" (%d) RSA (sign only)\n"), 4 ); if (addmode) tty_printf( _(" (%d) RSA (encrypt only)\n"), 5 ); diff --git a/g10/plaintext.c b/g10/plaintext.c index e9b9918cb..43c0c4be1 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -41,7 +41,6 @@ #include "i18n.h" - /**************** * Handle a plaintext packet. If MFX is not NULL, update the MDs * Note: we should use the filter stuff here, but we have to add some @@ -54,7 +53,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, { char *fname = NULL; FILE *fp = NULL; - off_t count=0; + static off_t count=0; int rc = 0; int c; int convert = pt->mode == 't'; @@ -169,7 +168,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, #endif if( fp ) { - if(opt.max_output && (count++)>opt.max_output) + if(opt.max_output && (++count)>opt.max_output) { log_error("Error writing to `%s': %s\n", fname,"exceeded --max-output limit\n"); @@ -235,7 +234,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, #endif if( fp ) { - if(opt.max_output && (count++)>opt.max_output) + if(opt.max_output && (++count)>opt.max_output) { log_error("Error writing to `%s': %s\n", fname,"exceeded --max-output limit\n"); @@ -298,7 +297,7 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, while( (c = iobuf_get(pt->buf)) != -1 ) { if( fp ) { - if(opt.max_output && (count++)>opt.max_output) + if(opt.max_output && (++count)>opt.max_output) { log_error("Error writing to `%s': %s\n", fname,"exceeded --max-output limit\n"); diff --git a/g10/sig-check.c b/g10/sig-check.c index 606035d29..eb3664134 100644 --- a/g10/sig-check.c +++ b/g10/sig-check.c @@ -144,7 +144,7 @@ do_check_messages( PKT_public_key *pk, PKT_signature *sig, *r_revoked = 0; if( pk->version == 4 && pk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) { log_info(_("key %08lX: this is a PGP generated " - "ElGamal key which is NOT secure for signatures!\n"), + "Elgamal key which is NOT secure for signatures!\n"), (ulong)keyid_from_pk(pk,NULL)); return G10ERR_PUBKEY_ALGO; } diff --git a/g10/skclist.c b/g10/skclist.c index 1f7a3919a..d20afc210 100644 --- a/g10/skclist.c +++ b/g10/skclist.c @@ -122,7 +122,7 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list, 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"); + "Elgamal key which is NOT secure for signatures!\n"); free_secret_key( sk ); sk = NULL; } else if( random_is_faked() && !is_insecure( sk ) ) { @@ -177,7 +177,7 @@ build_sk_list( STRLIST locusr, SK_LIST *ret_sk_list, if( sk->version == 4 && (use & PUBKEY_USAGE_SIG) && sk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) { log_info(_("skipped `%s': this is a PGP generated " - "ElGamal key which is not secure for signatures!\n"), + "Elgamal key which is not secure for signatures!\n"), locusr->d ); free_secret_key( sk ); sk = NULL; } |