~ubuntu-branches/ubuntu/hardy/gnupg2/hardy-proposed

« back to all changes in this revision

Viewing changes to tools/symcryptrun.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2007-05-15 13:54:55 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070515135455-89qfyalmgjy6gcqw
Tags: 2.0.4-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Remove libpcsclite-dev, libopensc2-dev build dependencies (they are in
    universe).
  - Build-depend on libcurl3-gnutls-dev
  - g10/call-agent.c: set DBG_ASSUAN to 0 to suppress a debug message
  - Include /doc files as done with gnupg
  - debian/rules: add doc/com-certs.pem to the docs for gpgsm
  - debian/copyright: update download url
  - debian/README.Debian: remove note the gnupg2 isn't released yet.
  - debian/control: Change Maintainer/XSBC-Original-Maintainer field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
#include "../common/simple-pwquery.h"
97
97
 
98
98
 
99
 
/* Used by gcry for logging */
100
 
static void
101
 
my_gcry_logger (void *dummy, int level, const char *fmt, va_list arg_ptr)
102
 
{
103
 
  /* translate the log levels */
104
 
  switch (level)
105
 
    {
106
 
    case GCRY_LOG_CONT: level = JNLIB_LOG_CONT; break;
107
 
    case GCRY_LOG_INFO: level = JNLIB_LOG_INFO; break;
108
 
    case GCRY_LOG_WARN: level = JNLIB_LOG_WARN; break;
109
 
    case GCRY_LOG_ERROR:level = JNLIB_LOG_ERROR; break;
110
 
    case GCRY_LOG_FATAL:level = JNLIB_LOG_FATAL; break;
111
 
    case GCRY_LOG_BUG:  level = JNLIB_LOG_BUG; break;
112
 
    case GCRY_LOG_DEBUG:level = JNLIB_LOG_DEBUG; break;
113
 
    default:            level = JNLIB_LOG_ERROR; break;      }
114
 
  log_logv (level, fmt, arg_ptr);
115
 
}
116
 
 
117
 
 
118
99
/* From simple-gettext.c.  */
119
100
 
120
101
/* We assume to have `unsigned long int' value with at least 32 bits.  */
1053
1034
  gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
1054
1035
  if (!gcry_check_version (NEED_LIBGCRYPT_VERSION) )
1055
1036
    {
1056
 
      log_fatal( _("libgcrypt is too old (need %s, have %s)\n"),
 
1037
      log_fatal (_("%s is too old (need %s, have %s)\n"), "libgcrypt",
1057
1038
                 NEED_LIBGCRYPT_VERSION, gcry_check_version (NULL) );
1058
1039
    }
1059
 
  gcry_set_log_handler (my_gcry_logger, NULL);
 
1040
  setup_libgcrypt_logging ();
1060
1041
  gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0);
1061
1042
 
1062
1043
  if (!opt.class)