mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Merged in my changes, after disk crash. Fortunately the CVS was not
affected - but everything else and it seems that there is no backup of the BTS data is available :-(
This commit is contained in:
parent
6be3bee320
commit
b725d8ec27
47 changed files with 7477 additions and 7394 deletions
|
@ -1,3 +1,43 @@
|
|||
2002-04-06 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* keyring.c (keyring_get_keyblock): Disable the keylist mode here.
|
||||
|
||||
* encode.c (encode_simple, encode_crypt): Only test on compressed
|
||||
files if a compress level was not explicity set.
|
||||
|
||||
* keygen.c (keygen_set_std_prefs): Removed Blowfish and Twofish
|
||||
from the list of default preferences, swapped the preferences of
|
||||
RMD160 and SHA1. Don't include a preference to 3DES unless the
|
||||
IDEA kludge gets used.
|
||||
|
||||
* free-packet.c (free_packet): call free_encrypted also for
|
||||
PKT_ENCRYPTED_MDC.
|
||||
|
||||
* compress.c (release_context): New.
|
||||
(handle_compressed): Allocate the context and setup a closure to
|
||||
release the context. This is required because there is no
|
||||
guarabntee that the filter gets popped from the chain at the end
|
||||
of the function. Problem noted by Timo and probably also the
|
||||
cause for a couple of other reports.
|
||||
(compress_filter): Use the release function if set.
|
||||
|
||||
* tdbio.c [__CYGWIN32__]: Don't rename ftruncate. Noted by
|
||||
Disastry.
|
||||
|
||||
* parse-packet.c (parse_signature): Put parens around a bit test.
|
||||
|
||||
* exec.c (make_tempdir): Double backslash for TMP directory
|
||||
creation under Windows. Better strlen the DIRSEP_S constants for
|
||||
allocation measurements.
|
||||
|
||||
* decrypt.c (decrypt_messages): Release the passphrase aquired
|
||||
by get_last_passphrase.
|
||||
|
||||
2002-04-02 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Removed OPTIONS an pubring.asc - they
|
||||
are no longer of any use.
|
||||
|
||||
2002-04-03 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* keyserver.c (parse_keyserver_options): fix auto-key-retrieve to
|
||||
|
@ -37,6 +77,16 @@
|
|||
|
||||
* hkp.c (write_quoted): quote backslashes from keyserver searches
|
||||
|
||||
2002-03-26 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* keygen.c (ask_keysize): Removed the warning for key sizes > 1536.
|
||||
|
||||
2002-03-25 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* keyedit.c (sign_uids): Use 2 strings and not a %s so that
|
||||
translations can be done the right way.
|
||||
* helptext.c: Fixed small typo.
|
||||
|
||||
2002-03-23 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* import.c (append_uid, merge_sigs): it is okay to import
|
||||
|
@ -95,6 +145,10 @@
|
|||
* sign.c (clearsign_file): Allow --not-dash-escaped to work with
|
||||
v3 keys.
|
||||
|
||||
2002-03-14 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* main.h: Changed the default algorithms to CAST5 and SHA1.
|
||||
|
||||
2002-03-13 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* import.c (chk_self_sigs): Show which user ID a bad self-sig
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/include -I$(top_srcdir)/intl
|
||||
EXTRA_DIST = OPTIONS pubring.asc options.skel
|
||||
EXTRA_DIST = options.skel
|
||||
# it seems that we can't use this with automake 1.5
|
||||
#OMIT_DEPENDENCIES = zlib.h zconf.h
|
||||
LDFLAGS = @LDFLAGS@ @DYNLINK_LDFLAGS@
|
||||
|
|
|
@ -266,12 +266,21 @@ compress_filter( void *opaque, int control,
|
|||
zfx->opaque = NULL;
|
||||
m_free(zfx->outbuf); zfx->outbuf = NULL;
|
||||
}
|
||||
if (zfx->release)
|
||||
zfx->release (zfx);
|
||||
}
|
||||
else if( control == IOBUFCTRL_DESC )
|
||||
*(char**)buf = "compress_filter";
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
release_context (compress_filter_context_t *ctx)
|
||||
{
|
||||
m_free (ctx);
|
||||
}
|
||||
|
||||
/****************
|
||||
* Handle a compressed packet
|
||||
*/
|
||||
|
@ -279,26 +288,19 @@ int
|
|||
handle_compressed( void *procctx, PKT_compressed *cd,
|
||||
int (*callback)(IOBUF, void *), void *passthru )
|
||||
{
|
||||
compress_filter_context_t cfx;
|
||||
compress_filter_context_t *cfx;
|
||||
int rc;
|
||||
|
||||
memset( &cfx, 0, sizeof cfx );
|
||||
if( cd->algorithm < 1 || cd->algorithm > 2 )
|
||||
return G10ERR_COMPR_ALGO;
|
||||
cfx.algo = cd->algorithm;
|
||||
|
||||
iobuf_push_filter( cd->buf, compress_filter, &cfx );
|
||||
cfx = m_alloc_clear (sizeof *cfx);
|
||||
cfx->algo = cd->algorithm;
|
||||
cfx->release = release_context;
|
||||
iobuf_push_filter( cd->buf, compress_filter, cfx );
|
||||
if( callback )
|
||||
rc = callback(cd->buf, passthru );
|
||||
else
|
||||
rc = proc_packets(procctx, cd->buf);
|
||||
#if 0
|
||||
iobuf_pop_filter( cd->buf, compress_filter, &cfx );
|
||||
if( cd->len )
|
||||
iobuf_set_limit( cd->buf, 0 ); /* disable the readlimit */
|
||||
else
|
||||
iobuf_clear_eof( cd->buf );
|
||||
#endif
|
||||
cd->buf = NULL;
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ decrypt_messages(int nfiles, char **files)
|
|||
g10_errstr(rc));
|
||||
p = get_last_passphrase();
|
||||
set_next_passphrase(p);
|
||||
m_free (p);
|
||||
files++;
|
||||
m_free(output);
|
||||
write_status( STATUS_FILE_DONE );
|
||||
|
|
|
@ -86,7 +86,7 @@ encode_simple( const char *filename, int mode )
|
|||
memset( &tfx, 0, sizeof tfx);
|
||||
init_packet(&pkt);
|
||||
|
||||
if (is_file_compressed(filename, &rc))
|
||||
if (opt.compress == -1 && is_file_compressed(filename, &rc))
|
||||
{
|
||||
if (opt.verbose)
|
||||
log_info(_("`%s' already compressed\n"), filename);
|
||||
|
@ -290,7 +290,7 @@ encode_crypt( const char *filename, STRLIST remusr )
|
|||
}
|
||||
}
|
||||
|
||||
if (is_file_compressed(filename, &rc2))
|
||||
if (opt.compress == -1 && is_file_compressed(filename, &rc2))
|
||||
{
|
||||
if (opt.verbose)
|
||||
log_info(_("`%s' already compressed\n"), filename);
|
||||
|
|
|
@ -148,6 +148,7 @@ decrypt_data( void *procctx, PKT_encrypted *ed, DEK *dek )
|
|||
/*log_hexdump("MDC calculated:", md_read( dfx.mdc_hash, 0), datalen);*/
|
||||
/*log_hexdump("MDC message :", dfx.defer, 20);*/
|
||||
}
|
||||
|
||||
|
||||
leave:
|
||||
cipher_close(dfx.cipher_hd);
|
||||
|
|
10
g10/exec.c
10
g10/exec.c
|
@ -64,7 +64,7 @@ static int make_tempdir(struct exec_info *info)
|
|||
#elif defined (__MINGW32__) || defined (__CYGWIN32__)
|
||||
tmp=m_alloc(256);
|
||||
if(GetTempPath(256,tmp)==0)
|
||||
strcpy(tmp,"c:\temp");
|
||||
strcpy(tmp,"c:\\temp");
|
||||
else
|
||||
{
|
||||
int len=strlen(tmp);
|
||||
|
@ -83,7 +83,7 @@ static int make_tempdir(struct exec_info *info)
|
|||
}
|
||||
}
|
||||
|
||||
info->tempdir=m_alloc(strlen(tmp)+1+10+1);
|
||||
info->tempdir=m_alloc(strlen(tmp)+strlen(DIRSEP_S)+10+1);
|
||||
|
||||
sprintf(info->tempdir,"%s" DIRSEP_S "gpg-XXXXXX",tmp);
|
||||
|
||||
|
@ -98,13 +98,15 @@ static int make_tempdir(struct exec_info *info)
|
|||
{
|
||||
info->madedir=1;
|
||||
|
||||
info->tempfile_in=m_alloc(strlen(info->tempdir)+1+10+1);
|
||||
info->tempfile_in=m_alloc(strlen(info->tempdir)
|
||||
+strlen(DIRSEP_S)+6+strlen(EXTSEP_S)+3+1);
|
||||
sprintf(info->tempfile_in,"%s" DIRSEP_S "datain" EXTSEP_S "%s",
|
||||
info->tempdir,info->binary?"bin":"txt");
|
||||
|
||||
if(!info->writeonly)
|
||||
{
|
||||
info->tempfile_out=m_alloc(strlen(info->tempdir)+1+11+1);
|
||||
info->tempfile_out=m_alloc(strlen(info->tempdir)
|
||||
+strlen(DIRSEP_S)+7+strlen(EXTSEP_S)+3+1);
|
||||
sprintf(info->tempfile_out,"%s" DIRSEP_S "dataout" EXTSEP_S "%s",
|
||||
info->tempdir,info->binary?"bin":"txt");
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ struct unarmor_pump_s;
|
|||
typedef struct unarmor_pump_s *UnarmorPump;
|
||||
|
||||
|
||||
typedef struct {
|
||||
struct compress_filter_context_s {
|
||||
int status;
|
||||
void *opaque; /* (used for z_stream) */
|
||||
byte *inbuf;
|
||||
|
@ -77,7 +77,9 @@ typedef struct {
|
|||
unsigned outbufsize;
|
||||
int algo; /* compress algo */
|
||||
int algo1hack;
|
||||
} compress_filter_context_t;
|
||||
void (*release)(struct compress_filter_context_s*);
|
||||
};
|
||||
typedef struct compress_filter_context_s compress_filter_context_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -390,6 +390,7 @@ free_packet( PACKET *pkt )
|
|||
free_compressed( pkt->pkt.compressed);
|
||||
break;
|
||||
case PKT_ENCRYPTED:
|
||||
case PKT_ENCRYPTED_MDC:
|
||||
free_encrypted( pkt->pkt.encrypted );
|
||||
break;
|
||||
case PKT_PLAINTEXT:
|
||||
|
|
10
g10/g10.c
10
g10/g10.c
|
@ -832,7 +832,7 @@ main( int argc, char **argv )
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
if ( strchr (opt.homedir,'\\') ) {
|
||||
char *d, *buf = m_alloc (strlen (opt.homedir)+1);
|
||||
const char *s = opt.homedir;
|
||||
|
@ -841,13 +841,13 @@ main( int argc, char **argv )
|
|||
*d = 0;
|
||||
opt.homedir = buf;
|
||||
}
|
||||
#endif
|
||||
#undef USE_SHM_COPROCESSING
|
||||
#ifdef USE_SHM_COPROCESSING
|
||||
#endif
|
||||
#undef USE_SHM_COPROCESSING /* huh? */
|
||||
#ifdef USE_SHM_COPROCESSING
|
||||
if( opt.shm_coprocess ) {
|
||||
init_shm_coprocessing(requested_shm_size, 1 );
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* initialize the secure memory. */
|
||||
secmem_init( 16384 );
|
||||
maybe_setuid = 0;
|
||||
|
|
|
@ -230,7 +230,7 @@ static struct helptexts { const char *key; const char *help; } helptexts[] = {
|
|||
{ "keyedit.updpref.okay", N_(
|
||||
"Change the preferences of all user IDs (or just of the selected ones)\n"
|
||||
"to the current list of preferences. The timestamp of all affected\n"
|
||||
"self-signatures fill be advanced by one second.\n"
|
||||
"self-signatures will be advanced by one second.\n"
|
||||
)},
|
||||
|
||||
|
||||
|
|
|
@ -371,10 +371,19 @@ sign_uids( KBNODE keyblock, STRLIST locusr, int *ret_modified,
|
|||
|
||||
/* Fixme: see whether there is a revocation in which
|
||||
* case we should allow to sign it again. */
|
||||
tty_printf(_("\"%s\" was already %ssigned by key %08lX\n"),
|
||||
uidnode->pkt->pkt.user_id->name,
|
||||
(!node->pkt->pkt.signature->flags.exportable &&
|
||||
local)?"locally ":"",(ulong)sk_keyid[1] );
|
||||
/* Note: I kept the %s and the empty string in the
|
||||
else branch so that not too many translations
|
||||
get broken. */
|
||||
if (!node->pkt->pkt.signature->flags.exportable && local)
|
||||
tty_printf(_(
|
||||
"\"%s\" was already locally signed by key %08lX\n"),
|
||||
uidnode->pkt->pkt.user_id->name,
|
||||
(ulong)sk_keyid[1] );
|
||||
else
|
||||
tty_printf(_(
|
||||
"\"%s\" was already %ssigned by key %08lX\n"),
|
||||
uidnode->pkt->pkt.user_id->name,
|
||||
"",(ulong)sk_keyid[1] );
|
||||
sprintf (buf, "%08lX%08lX",
|
||||
(ulong)sk->keyid[0], (ulong)sk->keyid[1] );
|
||||
write_status_text (STATUS_ALREADY_SIGNED, buf);
|
||||
|
|
10
g10/keygen.c
10
g10/keygen.c
|
@ -219,9 +219,9 @@ keygen_set_std_prefs (const char *string)
|
|||
|
||||
if (!string || !ascii_strcasecmp (string, "default")) {
|
||||
if ( !check_cipher_algo(CIPHER_ALGO_IDEA) )
|
||||
string = "S7 S10 S3 S4 S2 S1 H3 H2 Z2 Z1";
|
||||
string = "S7 S3 S2 S1 H2 H3 Z2 Z1";
|
||||
else
|
||||
string = "S7 S10 S3 S4 S2 H3 H2 Z2 Z1";
|
||||
string = "S7 S3 H2 H3 Z2 Z1";
|
||||
|
||||
/* If we have it, IDEA goes *after* 3DES so it won't be used
|
||||
unless we're encrypting along with a V3 key. Ideally, we
|
||||
|
@ -348,6 +348,7 @@ keygen_upd_std_prefs( PKT_signature *sig, void *opaque )
|
|||
/****************
|
||||
* Add preference to the self signature packet.
|
||||
* This is only called for packets with version > 3.
|
||||
|
||||
*/
|
||||
int
|
||||
keygen_add_std_prefs( PKT_signature *sig, void *opaque )
|
||||
|
@ -865,11 +866,6 @@ ask_keysize( int algo )
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if( nbits > 1536 && !cpr_enabled() && algo != PUBKEY_ALGO_RSA ) {
|
||||
if( cpr_get_answer_is_yes("keygen.size.large.okay",_(
|
||||
"Do you really need such a large keysize? ")) )
|
||||
break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -354,6 +354,7 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
|
|||
int in_cert = 0;
|
||||
int pk_no = 0;
|
||||
int uid_no = 0;
|
||||
int save_mode;
|
||||
|
||||
if (ret_kb)
|
||||
*ret_kb = NULL;
|
||||
|
@ -377,6 +378,7 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
|
|||
init_packet (pkt);
|
||||
hd->found.n_packets = 0;;
|
||||
lastnode = NULL;
|
||||
save_mode = set_packet_list_mode(0);
|
||||
while ((rc=parse_packet (a, pkt)) != -1) {
|
||||
hd->found.n_packets++;
|
||||
if (rc == G10ERR_UNKNOWN_PACKET) {
|
||||
|
@ -444,6 +446,7 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
|
|||
pkt = m_alloc (sizeof *pkt);
|
||||
init_packet(pkt);
|
||||
}
|
||||
set_packet_list_mode(save_mode);
|
||||
|
||||
if (rc == -1 && keyblock)
|
||||
rc = 0; /* got the entire keyblock */
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
#include "cipher.h"
|
||||
#include "keydb.h"
|
||||
|
||||
#define DEFAULT_CIPHER_ALGO CIPHER_ALGO_BLOWFISH
|
||||
#define DEFAULT_CIPHER_ALGO CIPHER_ALGO_CAST5
|
||||
#define DEFAULT_PUBKEY_ALGO PUBKEY_ALGO_ELGAMAL
|
||||
#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_RMD160
|
||||
#define DEFAULT_DIGEST_ALGO DIGEST_ALGO_SHA1
|
||||
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -96,7 +96,7 @@ lock-once
|
|||
# support).
|
||||
#
|
||||
# Example HKP keyserver:
|
||||
# x-hkp://wwwkeys.nl.pgp.net
|
||||
# x-hkp://keyserver.cryptnet.net
|
||||
#
|
||||
# Example email keyserver:
|
||||
# mailto:pgp-public-keys@keys.nl.pgp.net
|
||||
|
@ -118,9 +118,9 @@ lock-once
|
|||
# Most servers do synchronize with each other and DNS round-robin may
|
||||
# give you a quasi-random server each time.
|
||||
|
||||
#keyserver x-hkp://keyserver.cryptnet.net
|
||||
#keyserver mailto:pgp-public-keys@keys.nl.pgp.net
|
||||
#keyserver ldap://keyserver.pgp.com
|
||||
#keyserver x-hkp://wwwkeys.nl.pgp.net
|
||||
|
||||
# Options for keyserver functions
|
||||
#
|
||||
|
|
|
@ -1254,7 +1254,7 @@ parse_signature( IOBUF inp, int pkttype, unsigned long pktlen,
|
|||
if(p && *p==0)
|
||||
sig->flags.exportable=0;
|
||||
|
||||
/* Find all revokation keys. Back to hashed area only. */
|
||||
/* Find all revocation keys. Back to hashed area only. */
|
||||
if(sig->sig_class==0x1F)
|
||||
{
|
||||
struct revocation_key *revkey;
|
||||
|
@ -1267,7 +1267,7 @@ parse_signature( IOBUF inp, int pkttype, unsigned long pktlen,
|
|||
&len,&seq)))
|
||||
{
|
||||
if(len==sizeof(struct revocation_key) &&
|
||||
revkey->class&0x80) /* 0x80 bit must be set */
|
||||
(revkey->class&0x80)) /* 0x80 bit must be set */
|
||||
{
|
||||
sig->revkey=m_realloc(sig->revkey,
|
||||
sizeof(struct revocation_key *)*(sig->numrevkeys+1));
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "trustdb.h"
|
||||
#include "tdbio.h"
|
||||
|
||||
#ifdef HAVE_DOSISH_SYSTEM
|
||||
#if defined(HAVE_DOSISH_SYSTEM) && !defined(__CYGWIN32__)
|
||||
#define ftruncate chsize
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue