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-25 David Shaw <dshaw@jabberwocky.com>
+
+ * 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 <dshaw@jabberwocky.com>
* plaintext.c: Copyright.
/* 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.
*
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;
* 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()
*/
/* 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.
*
{ "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"
/****************
- * 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
*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 );
#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
{
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';
#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");
#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");
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");
*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;
}
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 ) ) {
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;
}