mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
Fix preference setting in new keys
This commit is contained in:
parent
8e5010a958
commit
31bbe71ad6
@ -1,3 +1,10 @@
|
|||||||
|
2010-04-26 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* utf8conv.c (load_libiconv) [W32CE]: No libiconv warning
|
||||||
|
|
||||||
|
* init.c (init_common_subsystems) [W32CE]: Register the sleep
|
||||||
|
function before es_init.
|
||||||
|
|
||||||
2010-04-20 Werner Koch <wk@g10code.com>
|
2010-04-20 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* estream.c (es_deinit): New.
|
* estream.c (es_deinit): New.
|
||||||
|
@ -73,13 +73,21 @@ init_common_subsystems (int *argcp, char ***argvp)
|
|||||||
# ifdef HAVE_PTH
|
# ifdef HAVE_PTH
|
||||||
pth_init ();
|
pth_init ();
|
||||||
# else
|
# else
|
||||||
{
|
{
|
||||||
WSADATA wsadat;
|
WSADATA wsadat;
|
||||||
|
|
||||||
WSAStartup (0x202, &wsadat);
|
WSAStartup (0x202, &wsadat);
|
||||||
}
|
}
|
||||||
# endif /*!HAVE_PTH*/
|
# endif /*!HAVE_PTH*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_W32CE_SYSTEM
|
||||||
|
/* Register the sleep exit function before the estream init so that
|
||||||
|
the sleep will be called after the estream registered atexit
|
||||||
|
function which flushes the left open estream streams and in
|
||||||
|
particular es_stdout. */
|
||||||
|
atexit (sleep_on_exit);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Initialize the Estream library. */
|
/* Initialize the Estream library. */
|
||||||
es_init ();
|
es_init ();
|
||||||
@ -87,7 +95,6 @@ init_common_subsystems (int *argcp, char ***argvp)
|
|||||||
/* Special hack for Windows CE: We extract some options from arg
|
/* Special hack for Windows CE: We extract some options from arg
|
||||||
to setup the standard handles. */
|
to setup the standard handles. */
|
||||||
#ifdef HAVE_W32CE_SYSTEM
|
#ifdef HAVE_W32CE_SYSTEM
|
||||||
atexit (sleep_on_exit);
|
|
||||||
parse_std_file_handles (argcp, argvp);
|
parse_std_file_handles (argcp, argvp);
|
||||||
#else
|
#else
|
||||||
(void)argcp;
|
(void)argcp;
|
||||||
|
@ -62,6 +62,10 @@ static int (* __stdcall iconv_close) (iconv_t cd);
|
|||||||
static int
|
static int
|
||||||
load_libiconv (void)
|
load_libiconv (void)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_W32CE_SYSTEM
|
||||||
|
return -1; /* FIXME No libiconv yet - Need to investigate whether it
|
||||||
|
is at all required. */
|
||||||
|
#else
|
||||||
static int done;
|
static int done;
|
||||||
|
|
||||||
if (!done)
|
if (!done)
|
||||||
@ -94,6 +98,7 @@ load_libiconv (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return iconv_open? 0: -1;
|
return iconv_open? 0: -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif /*HAVE_W32_SYSTEM*/
|
#endif /*HAVE_W32_SYSTEM*/
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2010-04-26 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* keygen.c (keygen_set_std_prefs): Explicitly include Z0 in the
|
||||||
|
default preferences if no compression algorithms are available.
|
||||||
|
Remove a possible trailing space in the dummy_string.
|
||||||
|
|
||||||
2010-04-23 Werner Koch <wk@g10code.com>
|
2010-04-23 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* pubkey-enc.c (get_it): Use the agent for decryption.
|
* pubkey-enc.c (get_it): Use the agent for decryption.
|
||||||
|
@ -132,7 +132,7 @@ decrypt_message_fd (int input_fd, int output_fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_W32CE_SYSTEM
|
#ifdef HAVE_W32CE_SYSTEM
|
||||||
#warning Ned to fix this
|
#warning Need to fix this
|
||||||
opt.outfp = NULL;
|
opt.outfp = NULL;
|
||||||
#else
|
#else
|
||||||
opt.outfp = fdopen (dup (output_fd), "wb");
|
opt.outfp = fdopen (dup (output_fd), "wb");
|
||||||
|
25
g10/keygen.c
25
g10/keygen.c
@ -315,6 +315,7 @@ keygen_set_std_prefs (const char *string,int personal)
|
|||||||
string=opt.def_preference_list;
|
string=opt.def_preference_list;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
int any_compress = 0;
|
||||||
dummy_string[0]='\0';
|
dummy_string[0]='\0';
|
||||||
|
|
||||||
/* The rationale why we use the order AES256,192,128 is
|
/* The rationale why we use the order AES256,192,128 is
|
||||||
@ -375,13 +376,31 @@ keygen_set_std_prefs (const char *string,int personal)
|
|||||||
strcat (dummy_string, "H11 ");
|
strcat (dummy_string, "H11 ");
|
||||||
|
|
||||||
if(!check_compress_algo(COMPRESS_ALGO_ZLIB))
|
if(!check_compress_algo(COMPRESS_ALGO_ZLIB))
|
||||||
strcat(dummy_string,"Z2 ");
|
{
|
||||||
|
strcat(dummy_string,"Z2 ");
|
||||||
|
any_compress = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if(!check_compress_algo(COMPRESS_ALGO_BZIP2))
|
if(!check_compress_algo(COMPRESS_ALGO_BZIP2))
|
||||||
strcat(dummy_string,"Z3 ");
|
{
|
||||||
|
strcat(dummy_string,"Z3 ");
|
||||||
|
any_compress = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if(!check_compress_algo(COMPRESS_ALGO_ZIP))
|
if(!check_compress_algo(COMPRESS_ALGO_ZIP))
|
||||||
strcat(dummy_string,"Z1");
|
{
|
||||||
|
strcat(dummy_string,"Z1 ");
|
||||||
|
any_compress = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* In case we have no compress algo at all, declare that
|
||||||
|
we prefer no compresssion. */
|
||||||
|
if (!any_compress)
|
||||||
|
strcat(dummy_string,"Z0 ");
|
||||||
|
|
||||||
|
/* Remove the trailing space. */
|
||||||
|
if (*dummy_string && dummy_string[strlen (dummy_string)-1] == ' ')
|
||||||
|
dummy_string[strlen (dummy_string)-1] = 0;
|
||||||
|
|
||||||
string=dummy_string;
|
string=dummy_string;
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "status.h"
|
#include "status.h"
|
||||||
#include "pkglue.h"
|
#include "pkglue.h"
|
||||||
|
|
||||||
|
#if 0 /* Not anymore used - kept for reference. */
|
||||||
static int
|
static int
|
||||||
do_check( PKT_secret_key *sk, const char *tryagain_text, int mode,
|
do_check( PKT_secret_key *sk, const char *tryagain_text, int mode,
|
||||||
int *canceled )
|
int *canceled )
|
||||||
@ -256,7 +257,7 @@ do_check( PKT_secret_key *sk, const char *tryagain_text, int mode,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /*0*/
|
||||||
|
|
||||||
|
|
||||||
/****************
|
/****************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user