mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
s/AES/AES128/ in diagnostics and --list-config
This commit is contained in:
parent
5379d3527d
commit
fcb5f7d08f
5
NEWS
5
NEWS
@ -7,6 +7,11 @@ Noteworthy changes in version 2.1.0beta2 (unreleased)
|
||||
* Fixed a bug where SCdaemon sends a signal to Gpg-agent running in
|
||||
non-daemon mode.
|
||||
|
||||
* Print "AES128" instead of "AES". This change introduces a little
|
||||
incompatibility for tools using "gpg --list-config". We hope that
|
||||
these tools are written robust enough to accept this new algorithm
|
||||
name as well.
|
||||
|
||||
|
||||
Noteworthy changes in version 2.1.0beta1 (2010-10-26)
|
||||
-----------------------------------------------------
|
||||
|
@ -283,7 +283,7 @@ do_unprotect (const char *passphrase,
|
||||
the OpenPGP algorithm numbers map one-to-one to the Libgcrypt
|
||||
numbers. */
|
||||
log_info (_("protection algorithm %d (%s) is not supported\n"),
|
||||
protect_algo, gcry_cipher_algo_name (protect_algo));
|
||||
protect_algo, gnupg_cipher_algo_name (protect_algo));
|
||||
return gpg_error (GPG_ERR_CIPHER_ALGO);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
2010-12-02 Werner Koch <wk@g10code.com>
|
||||
|
||||
* miscellaneous.c (gnupg_cipher_algo_name): New. Replace all
|
||||
users of gcry_cipher_algo_name by this one.
|
||||
|
||||
* logging.c (fun_cookie_s) [W32CE]: Add field USE_WRITEFILE.
|
||||
(fun_writer) [W32CE]: Make use of it.
|
||||
(set_file_fd) [W32CE]: Implement special filename "GPG2:".
|
||||
|
@ -769,7 +769,7 @@ proc_type_encrypt (audit_ctx_t ctx)
|
||||
{
|
||||
algo = gcry_cipher_map_name (item->string);
|
||||
if (algo)
|
||||
writeout_rem (ctx, _("algorithm: %s"), gcry_cipher_algo_name (algo));
|
||||
writeout_rem (ctx, _("algorithm: %s"), gnupg_cipher_algo_name (algo));
|
||||
else if (item->string && !strcmp (item->string, "1.2.840.113549.3.2"))
|
||||
writeout_rem (ctx, _("unsupported algorithm: %s"), "RC2");
|
||||
else if (item->string)
|
||||
@ -909,14 +909,14 @@ proc_type_decrypt (audit_ctx_t ctx)
|
||||
algo = item? item->intvalue : 0;
|
||||
writeout_li (ctx, algo?"Yes":"No", "%s", _("Encryption algorithm supported"));
|
||||
if (algo)
|
||||
writeout_rem (ctx, _("algorithm: %s"), gcry_cipher_algo_name (algo));
|
||||
writeout_rem (ctx, _("algorithm: %s"), gnupg_cipher_algo_name (algo));
|
||||
|
||||
item = find_log_item (ctx, AUDIT_BAD_DATA_CIPHER_ALGO, 0);
|
||||
if (item && item->string)
|
||||
{
|
||||
algo = gcry_cipher_map_name (item->string);
|
||||
if (algo)
|
||||
writeout_rem (ctx, _("algorithm: %s"), gcry_cipher_algo_name (algo));
|
||||
writeout_rem (ctx, _("algorithm: %s"), gnupg_cipher_algo_name (algo));
|
||||
else if (item->string && !strcmp (item->string, "1.2.840.113549.3.2"))
|
||||
writeout_rem (ctx, _("unsupported algorithm: %s"), "RC2");
|
||||
else if (item->string)
|
||||
|
@ -95,6 +95,23 @@ setup_libgcrypt_logging (void)
|
||||
gcry_set_outofcore_handler (my_gcry_outofcore_handler, NULL);
|
||||
}
|
||||
|
||||
/* A wrapper around gcry_cipher_algo_name to return the string
|
||||
"AES-128" instead of "AES". Given that we have an alias in
|
||||
libgcrypt for it, it does not harm to too much to return this other
|
||||
string. Some users complained that we print "AES" but "AES192"
|
||||
and "AES256". We can't fix that in libgcrypt but it is pretty
|
||||
safe to do it in an application. */
|
||||
const char *
|
||||
gnupg_cipher_algo_name (int algo)
|
||||
{
|
||||
const char *s;
|
||||
|
||||
s = gcry_cipher_algo_name (algo);
|
||||
if (!strcmp (s, "AES"))
|
||||
s = "AES128";
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
/* Decide whether the filename is stdout or a real filename and return
|
||||
* an appropriate string. */
|
||||
|
@ -255,6 +255,9 @@ char *xasprintf (const char *fmt, ...) JNLIB_GCC_A_PRINTF(1,2);
|
||||
/* This is now an alias to estream_asprintf. */
|
||||
char *xtryasprintf (const char *fmt, ...) JNLIB_GCC_A_PRINTF(1,2);
|
||||
|
||||
/* Replacement for gcry_cipher_algo_name. */
|
||||
const char *gnupg_cipher_algo_name (int algo);
|
||||
|
||||
const char *print_fname_stdout (const char *s);
|
||||
const char *print_fname_stdin (const char *s);
|
||||
void print_utf8_buffer2 (estream_t fp, const void *p, size_t n, int delim);
|
||||
|
@ -1,3 +1,7 @@
|
||||
2010-12-02 Werner Koch <wk@g10code.com>
|
||||
|
||||
* misc.c (openpgp_cipher_algo_name): Use gnupg_cipher_algo_name.
|
||||
|
||||
2010-11-23 Werner Koch <wk@g10code.com>
|
||||
|
||||
* Makefile.am (gpg2_LDFLAGS, gpgv2_LDFLAGS): Add extra_bin_ldflags.
|
||||
|
@ -409,7 +409,7 @@ openpgp_cipher_test_algo( int algo )
|
||||
const char *
|
||||
openpgp_cipher_algo_name (int algo)
|
||||
{
|
||||
return gcry_cipher_algo_name (map_cipher_openpgp_to_gcry (algo));
|
||||
return gnupg_cipher_algo_name (map_cipher_openpgp_to_gcry (algo));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -86,7 +86,7 @@ init_dek (DEK dek)
|
||||
case GCRY_CIPHER_DES:
|
||||
case GCRY_CIPHER_RFC2268_40:
|
||||
log_error ("cipher algorithm `%s' not allowed: too weak\n",
|
||||
gcry_cipher_algo_name (dek->algo));
|
||||
gnupg_cipher_algo_name (dek->algo));
|
||||
return gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM);
|
||||
default:
|
||||
break;
|
||||
|
@ -553,7 +553,7 @@ my_strusage( int level )
|
||||
case 33: p = _("\nSupported algorithms:\n"); break;
|
||||
case 34:
|
||||
if (!ciphers)
|
||||
ciphers = build_list ("Cipher: ", gcry_cipher_algo_name,
|
||||
ciphers = build_list ("Cipher: ", gnupg_cipher_algo_name,
|
||||
our_cipher_test_algo );
|
||||
p = ciphers;
|
||||
break;
|
||||
|
@ -1,3 +1,7 @@
|
||||
2010-12-02 Werner Koch <wk@g10code.com>
|
||||
|
||||
* no-libgcrypt.c (gcry_cipher_algo_name): New.
|
||||
|
||||
2010-11-23 Werner Koch <wk@g10code.com>
|
||||
|
||||
* Makefile.am (gpgconf_LDFLAGS): Add extra_bin_ldflags.
|
||||
|
@ -152,3 +152,10 @@ gcry_create_nonce (void *buffer, size_t length)
|
||||
|
||||
log_fatal ("unexpected call to gcry_create_nonce\n");
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
gcry_cipher_algo_name (int algo)
|
||||
{
|
||||
return "?";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user