1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

* getkey.c (merge_selfsigs_main): Make sure the revocation key list starts

clean as this function may be called more than once (e.g. from functions
in --edit).

* g10.c, encode.c (encode_crypt), sign.c (sign_file,
sign_symencrypt_file): Make --compress-algo work like the documentation
says.  It should be like --cipher-algo and --digest-algo in that it can
override the preferences calculation and impose the setting the user
wants.  No --compress-algo setting allows the usual preferences
calculation to take place.

* main.h, compress.c (compress_filter): use new DEFAULT_COMPRESS_ALGO
define, and add a sanity check for compress algo value.
This commit is contained in:
David Shaw 2002-05-09 19:57:08 +00:00
parent 4cb36096ec
commit 0c3ac11549
7 changed files with 85 additions and 44 deletions

View file

@ -407,18 +407,20 @@ encode_crypt( const char *filename, STRLIST remusr )
/* register the compress filter */
if( do_compress ) {
int compr_algo = select_algo_from_prefs( pk_list, PREFTYPE_ZIP );
if( !compr_algo )
; /* don't use compression */
else {
if( compr_algo == 1 )
zfx.algo = 1;
if( compr_algo == 2 )
zfx.algo = 2;
/* Any other compr_algo will fall back to
opt.def_compress_algo in the compress_filter. */
int compr_algo = opt.def_compress_algo;
if(compr_algo==-1)
{
if((compr_algo=select_algo_from_prefs( pk_list, PREFTYPE_ZIP))==-1)
compr_algo=DEFAULT_COMPRESS_ALGO;
}
/* algo 0 means no compression */
if( compr_algo )
{
zfx.algo = compr_algo;
iobuf_push_filter( out, compress_filter, &zfx );
}
}
}
/* do the work */