mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Remove the deprecated gcry_set_log_handler.
* common/miscellaneous.c (my_gcry_logger): Remove. (setup_libgcrypt_logging): Do not call the deprecated gcry_set_log_handler. * kbx/kbxutil.c (my_gcry_logger): Remove. * tools/no-libgcrypt.c (gcry_set_log_handler): Remove stub.
This commit is contained in:
parent
f325d3277e
commit
54741685ce
@ -36,27 +36,6 @@
|
||||
#include "iobuf.h"
|
||||
#include "i18n.h"
|
||||
|
||||
/* Used by libgcrypt for logging. */
|
||||
static void
|
||||
my_gcry_logger (void *dummy, int level, const char *fmt, va_list arg_ptr)
|
||||
{
|
||||
(void)dummy;
|
||||
|
||||
/* Map the log levels. */
|
||||
switch (level)
|
||||
{
|
||||
case GCRY_LOG_CONT: level = GPGRT_LOGLVL_CONT; break;
|
||||
case GCRY_LOG_INFO: level = GPGRT_LOGLVL_INFO; break;
|
||||
case GCRY_LOG_WARN: level = GPGRT_LOGLVL_WARN; break;
|
||||
case GCRY_LOG_ERROR:level = GPGRT_LOGLVL_ERROR; break;
|
||||
case GCRY_LOG_FATAL:level = GPGRT_LOGLVL_FATAL; break;
|
||||
case GCRY_LOG_BUG: level = GPGRT_LOGLVL_BUG; break;
|
||||
case GCRY_LOG_DEBUG:level = GPGRT_LOGLVL_DEBUG; break;
|
||||
default: level = GPGRT_LOGLVL_ERROR; break;
|
||||
}
|
||||
log_logv (level, fmt, arg_ptr);
|
||||
}
|
||||
|
||||
|
||||
/* This function is called by libgcrypt on a fatal error. */
|
||||
static void
|
||||
@ -100,7 +79,6 @@ my_gcry_outofcore_handler (void *opaque, size_t req_n, unsigned int flags)
|
||||
void
|
||||
setup_libgcrypt_logging (void)
|
||||
{
|
||||
gcry_set_log_handler (my_gcry_logger, NULL);
|
||||
gcry_set_fatalerror_handler (my_gcry_fatalerror_handler, NULL);
|
||||
gcry_set_outofcore_handler (my_gcry_outofcore_handler, NULL);
|
||||
}
|
||||
|
@ -132,29 +132,6 @@ my_strusage( int level )
|
||||
}
|
||||
|
||||
|
||||
/* Used by gcry for logging */
|
||||
static void
|
||||
my_gcry_logger (void *dummy, int level, const char *fmt, va_list arg_ptr)
|
||||
{
|
||||
(void)dummy;
|
||||
|
||||
/* Map the log levels. */
|
||||
switch (level)
|
||||
{
|
||||
case GCRY_LOG_CONT: level = GPGRT_LOGLVL_CONT; break;
|
||||
case GCRY_LOG_INFO: level = GPGRT_LOGLVL_INFO; break;
|
||||
case GCRY_LOG_WARN: level = GPGRT_LOGLVL_WARN; break;
|
||||
case GCRY_LOG_ERROR:level = GPGRT_LOGLVL_ERROR; break;
|
||||
case GCRY_LOG_FATAL:level = GPGRT_LOGLVL_FATAL; break;
|
||||
case GCRY_LOG_BUG: level = GPGRT_LOGLVL_BUG; break;
|
||||
case GCRY_LOG_DEBUG:level = GPGRT_LOGLVL_DEBUG; break;
|
||||
default: level = GPGRT_LOGLVL_ERROR; break;
|
||||
}
|
||||
log_logv (level, fmt, arg_ptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* static void */
|
||||
/* wrong_args( const char *text ) */
|
||||
/* { */
|
||||
@ -481,8 +458,6 @@ main (int argc, char **argv)
|
||||
i18n_init ();
|
||||
init_common_subsystems (&argc, &argv);
|
||||
|
||||
gcry_set_log_handler (my_gcry_logger, NULL);
|
||||
|
||||
/*create_dotlock(NULL); register locking cleanup */
|
||||
|
||||
/* We need to use the gcry malloc function because jnlib uses them. */
|
||||
|
@ -136,14 +136,6 @@ gcry_set_fatalerror_handler (gcry_handler_error_t fnc, void *opaque)
|
||||
(void)opaque;
|
||||
}
|
||||
|
||||
void
|
||||
gcry_set_log_handler (gcry_handler_log_t f, void *opaque)
|
||||
{
|
||||
(void)f;
|
||||
(void)opaque;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
gcry_create_nonce (void *buffer, size_t length)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user