Make use of the *_NAME etc macros.

Replace hardwired strings at many places with new macros from config.h
and use the new strusage macro replacement feature.

* common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn
sentinels.
* agent/command.c (cmd_import_key): Use asprintf to create the prompt.
This commit is contained in:
Werner Koch 2013-11-18 14:09:47 +01:00
parent 798daaa1dd
commit cc9a0b69b6
48 changed files with 355 additions and 320 deletions

View File

@ -2065,10 +2065,16 @@ cmd_import_key (assuan_context_t ctx, char *line)
if (!agent_key_available (grip))
err = gpg_error (GPG_ERR_EEXIST);
else
err = agent_ask_new_passphrase
(ctrl, _("Please enter the passphrase to protect the "
"imported object within the GnuPG system."),
&passphrase);
{
char *prompt = xtryasprintf
(_("Please enter the passphrase to protect the "
"imported object within the %s system."), GNUPG_NAME);
if (!prompt)
err = gpg_error_from_syserror ();
else
err = agent_ask_new_passphrase (ctrl, prompt, &passphrase);
xfree (prompt);
}
if (err)
goto leave;
}

View File

@ -335,7 +335,7 @@ my_strusage (int level)
switch (level)
{
case 11: p = "gpg-agent (GnuPG)";
case 11: p = "@GPG_AGENT@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -351,10 +351,10 @@ my_strusage (int level)
break;
case 1:
case 40: p = _("Usage: gpg-agent [options] (-h for help)");
case 40: p = _("Usage: @GPG_AGENT@ [options] (-h for help)");
break;
case 41: p = _("Syntax: gpg-agent [options] [command [args]]\n"
"Secret key management for GnuPG\n");
case 41: p = _("Syntax: @GPG_AGENT@ [options] [command [args]]\n"
"Secret key management for @GNUPG@\n");
break;
default: p = NULL;
@ -608,7 +608,7 @@ main (int argc, char **argv )
/* Please note that we may running SUID(ROOT), so be very CAREFUL
when adding any stuff between here and the call to INIT_SECMEM()
somewhere after the option parsing */
log_set_prefix ("gpg-agent", JNLIB_LOG_WITH_PREFIX|JNLIB_LOG_WITH_PID);
log_set_prefix (GPG_AGENT_NAME, JNLIB_LOG_WITH_PREFIX|JNLIB_LOG_WITH_PID);
/* Make sure that our subsystems are ready. */
i18n_init ();
@ -1044,10 +1044,10 @@ main (int argc, char **argv )
/* Create the sockets. */
socket_name = create_socket_name
("S.gpg-agent", "gpg-XXXXXX/S.gpg-agent");
(GPG_AGENT_SOCK_NAME, "gpg-XXXXXX/"GPG_AGENT_SOCK_NAME);
if (opt.ssh_support)
socket_name_ssh = create_socket_name
("S.gpg-agent.ssh", "gpg-XXXXXX/S.gpg-agent.ssh");
(GPG_AGENT_SSH_SOCK_NAME, "gpg-XXXXXX/"GPG_AGENT_SSH_SOCK_NAME);
fd = create_server_socket (socket_name, 0, &socket_nonce);
if (opt.ssh_support)
@ -1064,7 +1064,8 @@ main (int argc, char **argv )
fflush (NULL);
#ifdef HAVE_W32_SYSTEM
pid = getpid ();
es_printf ("set GPG_AGENT_INFO=%s;%lu;1\n", socket_name, (ulong)pid);
es_printf ("set %s=%s;%lu;1\n",
GPG_AGENT_INFO_NAME, socket_name, (ulong)pid);
#else /*!HAVE_W32_SYSTEM*/
pid = fork ();
if (pid == (pid_t)-1)
@ -1095,8 +1096,8 @@ main (int argc, char **argv )
#endif /*HAVE_SIGPROCMASK*/
/* Create the info string: <name>:<pid>:<protocol_version> */
if (asprintf (&infostr, "GPG_AGENT_INFO=%s:%lu:1",
socket_name, (ulong)pid ) < 0)
if (asprintf (&infostr, "%s=%s:%lu:1",
GPG_AGENT_INFO_NAME, socket_name, (ulong)pid ) < 0)
{
log_error ("out of core\n");
kill (pid, SIGTERM);
@ -1193,7 +1194,7 @@ main (int argc, char **argv )
}
else
{
es_printf ( "%s; export GPG_AGENT_INFO;\n", infostr);
es_printf ( "%s; export %s;\n", infostr, GPG_AGENT_INFO_NAME);
if (opt.ssh_support)
{
es_printf ("%s; export SSH_AUTH_SOCK;\n",
@ -2190,7 +2191,7 @@ check_own_socket (void)
if (check_own_socket_running || shutdown_pending)
return; /* Still running or already shutting down. */
sockname = make_filename (opt.homedir, "S.gpg-agent", NULL);
sockname = make_filename (opt.homedir, GPG_AGENT_SOCK_NAME, NULL);
if (!sockname)
return; /* Out of memory. */
@ -2219,7 +2220,7 @@ check_for_running_agent (int silent, int mode)
if (!mode)
{
infostr = getenv ("GPG_AGENT_INFO");
infostr = getenv (GPG_AGENT_INFO_NAME);
if (!infostr || !*infostr)
{
if (!check_for_running_agent (silent, 1))
@ -2236,7 +2237,8 @@ check_for_running_agent (int silent, int mode)
if (!check_for_running_agent (silent, 1))
return 0; /* Okay, its running on the standard socket. */
if (!silent)
log_error (_("malformed GPG_AGENT_INFO environment variable\n"));
log_error (_("malformed %s environment variable\n"),
GPG_AGENT_INFO_NAME);
return -1;
}
@ -2258,7 +2260,7 @@ check_for_running_agent (int silent, int mode)
}
else /* MODE != 0 */
{
infostr = make_filename (opt.homedir, "S.gpg-agent", NULL);
infostr = make_filename (opt.homedir, GPG_AGENT_SOCK_NAME, NULL);
pid = (pid_t)(-1);
}

View File

@ -87,7 +87,7 @@ my_strusage (int level)
const char *p;
switch (level)
{
case 11: p = "gpg-preset-passphrase (GnuPG)";
case 11: p = "gpg-preset-passphrase (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -245,7 +245,7 @@ main (int argc, char **argv)
/* Tell simple-pwquery about the the standard socket name. */
{
char *tmp = make_filename (opt_homedir, "S.gpg-agent", NULL);
char *tmp = make_filename (opt_homedir, GPG_AGENT_SOCK_NAME, NULL);
simple_pw_set_socket (tmp);
xfree (tmp);
}

View File

@ -142,7 +142,7 @@ my_strusage (int level)
const char *p;
switch (level)
{
case 11: p = "gpg-protect-tool (GnuPG)";
case 11: p = "gpg-protect-tool (" GNUPG_NAME ")";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;

View File

@ -233,7 +233,7 @@ handle_taskbar (void *ctx)
nid.hWnd = glob_hwnd;
nid.uID = 1;
nid.hIcon = LoadIcon (glob_hinst, MAKEINTRESOURCE (1));
mem2str (nid.szTip, "GnuPG Agent version "PACKAGE_VERSION,
mem2str (nid.szTip, GPG_AGENT_NAME " version "PACKAGE_VERSION,
sizeof nid.szTip);
Shell_NotifyIcon (NIM_ADD, &nid);
DestroyIcon (nid.hIcon);

View File

@ -265,9 +265,9 @@ lock_spawning (lock_spawn_t *lock, const char *homedir, const char *name,
*lock = CreateMutexW
(NULL, FALSE,
!strcmp (name, "agent")? L"GnuPG_spawn_agent_sentinel":
!strcmp (name, "dirmngr")? L"GnuPG_spawn_dirmngr_sentinel":
/* */ L"GnuPG_spawn_unknown_sentinel");
!strcmp (name, "agent")? L"spawn_"GNUPG_NAME"_agent_sentinel":
!strcmp (name, "dirmngr")? L"spawn_"GNUPG_NAME"_dirmngr_sentinel":
/* */ L"spawn_"GNUPG_NAME"_unknown_sentinel");
if (!*lock)
{
log_error ("failed to create the spawn_%s mutex: %s\n",
@ -378,7 +378,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
}
restart:
infostr = force_pipe_server? NULL : getenv ("GPG_AGENT_INFO");
infostr = force_pipe_server? NULL : getenv (GPG_AGENT_INFO_NAME);
if (!infostr || !*infostr)
{
char *sockname;
@ -388,7 +388,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
/* First check whether we can connect at the standard
socket. */
sockname = make_filename (homedir, "S.gpg-agent", NULL);
sockname = make_filename (homedir, GPG_AGENT_SOCK_NAME, NULL);
err = assuan_socket_connect (ctx, sockname, 0, 0);
if (err)
@ -517,7 +517,8 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
infostr = xstrdup (infostr);
if ( !(p = strchr (infostr, PATHSEP_C)) || p == infostr)
{
log_error (_("malformed GPG_AGENT_INFO environment variable\n"));
log_error (_("malformed %s environment variable\n"),
GPG_AGENT_INFO_NAME);
xfree (infostr);
force_pipe_server = 1;
goto restart;

View File

@ -1187,7 +1187,7 @@ audit_print_result (audit_ctx_t ctx, estream_t out, int use_html)
clear_helptags (ctx);
if (use_html)
es_fputs ("<div class=\"GnuPGAuditLog\">\n", ctx->outstream);
es_fputs ("<div class=\"" GNUPG_NAME "AuditLog\">\n", ctx->outstream);
if (!ctx->log || !ctx->logused)
{

View File

@ -92,6 +92,6 @@ gnupg_rl_initialize (void)
cleanup_after_signal,
readline,
add_history);
rl_readline_name = "GnuPG";
rl_readline_name = GNUPG_NAME;
#endif
}

View File

@ -221,7 +221,8 @@ default_homedir (void)
{
char *tmp;
tmp = read_w32_registry_string (NULL, "Software\\GNU\\GnuPG",
tmp = read_w32_registry_string (NULL,
"Software\\GNU\\" GNUPG_NAME,
"HomeDir");
if (tmp && !*tmp)
{
@ -585,7 +586,7 @@ dirmngr_socket_name (void)
s1 = s1buf;
}
# endif
s2 = DIRSEP_S "S.dirmngr";
s2 = DIRSEP_S DIRMNGR_SOCK_NAME;
name = xmalloc (strlen (s1) + strlen (s2) + 1);
strcpy (stpcpy (name, s1), s2);
for (p=name; *p; p++)
@ -594,7 +595,7 @@ dirmngr_socket_name (void)
}
return name;
#else /*!HAVE_W32_SYSTEM*/
return GNUPG_LOCALSTATEDIR "/run/" PACKAGE_NAME "/S.dirmngr";
return GNUPG_LOCALSTATEDIR "/run/" PACKAGE_NAME "/"DIRMNGR_SOCK_NAME;
#endif /*!HAVE_W32_SYSTEM*/
}
@ -639,7 +640,7 @@ gnupg_module_name (int which)
#ifdef GNUPG_DEFAULT_DIRMNGR
return GNUPG_DEFAULT_DIRMNGR;
#else
X(bindir, "dirmngr");
X(bindir, DIRMNGR_NAME);
#endif
case GNUPG_MODULE_NAME_PROTECT_TOOL:

View File

@ -460,7 +460,7 @@ set_file_fd (const char *name, int fd)
{
HANDLE hd;
ActivateDevice (L"Drivers\\GnuPG_Log", 0);
ActivateDevice (L"Drivers\\"GNUPG_NAME"_Log", 0);
/* Ignore a filename and write the debug output to the GPG2:
device. */
hd = CreateFile (L"GPG2:", GENERIC_WRITE,
@ -636,7 +636,7 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
tmp = (no_registry
? NULL
: read_w32_registry_string (NULL, "Software\\GNU\\GnuPG",
: read_w32_registry_string (NULL, "Software\\GNU\\"GNUPG_NAME,
"DefaultLogFile"));
log_set_file (tmp && *tmp? tmp : NULL);
jnlib_free (tmp);

View File

@ -329,7 +329,7 @@ agent_open (int *rfd)
int nread;
*rfd = -1;
infostr = getenv ( "GPG_AGENT_INFO" );
infostr = getenv (GPG_AGENT_INFO_NAME);
if ( !infostr || !*infostr )
infostr = default_gpg_agent_info;
if ( !infostr || !*infostr )
@ -349,7 +349,7 @@ agent_open (int *rfd)
|| (p-infostr)+1 >= sizeof client_addr.sun_path )
{
#ifdef SPWQ_USE_LOGGING
log_error ( _("malformed GPG_AGENT_INFO environment variable\n"));
log_error (_("malformed %s environment variable\n"), GPG_AGENT_INFO_NAME);
#endif
return SPWQ_NO_AGENT;
}

View File

@ -140,7 +140,7 @@ my_strusage (int level)
switch(level)
{
case 11: p = "dirmngr-client (GnuPG)";
case 11: p = "dirmngr-client (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -440,7 +440,7 @@ start_dirmngr (int only_daemon)
assuan_context_t ctx;
int try_default = 0;
infostr = opt.force_pipe_server? NULL : getenv ("DIRMNGR_INFO");
infostr = opt.force_pipe_server? NULL : getenv (DIRMNGR_INFO_NAME);
if (only_daemon && (!infostr || !*infostr))
{
infostr = xstrdup (dirmngr_socket_name ());
@ -502,7 +502,8 @@ start_dirmngr (int only_daemon)
{
if ( !(p = strchr (infostr, ':')) || p == infostr)
{
log_error (_("malformed DIRMNGR_INFO environment variable\n"));
log_error (_("malformed %s environment variable\n"),
DIRMNGR_INFO_NAME);
xfree (infostr);
if (only_daemon)
return NULL;

View File

@ -287,7 +287,7 @@ my_strusage( int level )
const char *p;
switch ( level )
{
case 11: p = "dirmngr (GnuPG)";
case 11: p = "@DIRMNGR@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -297,10 +297,10 @@ my_strusage( int level )
case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
case 49: p = PACKAGE_BUGREPORT; break;
case 1:
case 40: p = _("Usage: dirmngr [options] (-h for help)");
case 40: p = _("Usage: @DIRMNGR@ [options] (-h for help)");
break;
case 41: p = _("Syntax: dirmngr [options] [command [args]]\n"
"LDAP and OCSP access for GnuPG\n");
case 41: p = _("Syntax: @DIRMNGR@ [options] [command [args]]\n"
"LDAP and OCSP access for @GNUPG@\n");
break;
default: p = NULL;
@ -387,7 +387,7 @@ set_debug (void)
static void
wrong_args (const char *text)
{
es_fputs (_("usage: dirmngr [options] "), es_stderr);
es_fprintf (es_stderr, _("usage: %s [options] "), DIRMNGR_NAME);
es_fputs (text, es_stderr);
es_putc ('\n', es_stderr);
dirmngr_exit (2);
@ -600,7 +600,7 @@ main (int argc, char **argv)
#endif /*USE_W32_SERVICE*/
set_strusage (my_strusage);
log_set_prefix ("dirmngr", 1|4);
log_set_prefix (DIRMNGR_NAME, 1|4);
/* Make sure that our subsystems are ready. */
i18n_init ();
@ -719,7 +719,7 @@ main (int argc, char **argv)
}
if (default_config)
configname = make_filename (opt.homedir, "dirmngr.conf", NULL );
configname = make_filename (opt.homedir, DIRMNGR_NAME".conf", NULL );
argc = orig_argc;
argv = orig_argv;
@ -857,12 +857,12 @@ main (int argc, char **argv)
log_info (_("NOTE: '%s' is not considered an option\n"), argv[i]);
}
if (!access ("/etc/dirmngr", F_OK) && !strncmp (opt.homedir, "/etc/", 5))
if (!access ("/etc/"DIRMNGR_NAME, F_OK) && !strncmp (opt.homedir, "/etc/", 5))
log_info
("NOTE: DirMngr is now a proper part of GnuPG. The configuration and"
("NOTE: DirMngr is now a proper part of %s. The configuration and"
" other directory names changed. Please check that no other version"
" of dirmngr is still installed. To disable this warning, remove the"
" directory '/etc/dirmngr'.\n");
" directory '/etc/dirmngr'.\n", GNUPG_NAME);
if (gnupg_faked_time_p ())
{
@ -1017,7 +1017,8 @@ main (int argc, char **argv)
start of the dirmngr. */
#ifdef HAVE_W32_SYSTEM
pid = getpid ();
es_printf ("set DIRMNGR_INFO=%s;%lu;1\n", socket_name, (ulong) pid);
es_printf ("set %s=%s;%lu;1\n",
DIRMNGR_INFO_NAME, socket_name, (ulong) pid);
#else
pid = fork();
if (pid == (pid_t)-1)
@ -1037,8 +1038,8 @@ main (int argc, char **argv)
close (fd);
/* Create the info string: <name>:<pid>:<protocol_version> */
if (asprintf (&infostr, "DIRMNGR_INFO=%s:%lu:1",
socket_name, (ulong)pid ) < 0)
if (asprintf (&infostr, "%s=%s:%lu:1",
DIRMNGR_INFO_NAME, socket_name, (ulong)pid ) < 0)
{
log_error (_("out of core\n"));
kill (pid, SIGTERM);
@ -1053,7 +1054,7 @@ main (int argc, char **argv)
}
else
{
es_printf ( "%s; export DIRMNGR_INFO;\n", infostr);
es_printf ( "%s; export %s;\n", infostr, DIRMNGR_INFO_NAME);
}
free (infostr);
exit (0);

View File

@ -191,7 +191,7 @@ my_strusage (int level)
switch(level)
{
case 11: p = "dirmngr_ldap (GnuPG)";
case 11: p = "dirmngr_ldap (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;

View File

@ -1079,7 +1079,7 @@ armor_filter( void *opaque, int control,
iobuf_writestr(a,afx->eol);
if( !opt.no_version )
{
iobuf_writestr(a, "Version: GnuPG v" VERSION " ("
iobuf_writestr(a, "Version: "GNUPG_NAME" v" VERSION " ("
PRINTABLE_OS_NAME ")" );
iobuf_writestr(a,afx->eol);
}

View File

@ -819,7 +819,7 @@ my_strusage( int level )
const char *p;
switch( level ) {
case 11: p = "gpg (GnuPG)";
case 11: p = "@GPG@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -845,10 +845,10 @@ my_strusage( int level )
case 1:
case 40: p =
_("Usage: gpg [options] [files] (-h for help)");
_("Usage: @GPG@ [options] [files] (-h for help)");
break;
case 41: p =
_("Syntax: gpg [options] [files]\n"
_("Syntax: @GPG@ [options] [files]\n"
"Sign, check, encrypt or decrypt\n"
"Default operation depends on the input data\n");
break;
@ -1833,8 +1833,8 @@ char *
get_default_configname (void)
{
char *configname = NULL;
char *name = xstrdup ("gpg" EXTSEP_S "conf-" SAFE_VERSION);
char *ver = &name[strlen ("gpg" EXTSEP_S "conf-")];
char *name = xstrdup (GPG_NAME EXTSEP_S "conf-" SAFE_VERSION);
char *ver = &name[strlen (GPG_NAME EXTSEP_S "conf-")];
do
{
@ -1860,7 +1860,7 @@ get_default_configname (void)
xfree(name);
if (! configname)
configname = make_filename (opt.homedir, "gpg" EXTSEP_S "conf", NULL);
configname = make_filename (opt.homedir, GPG_NAME EXTSEP_S "conf", NULL);
if (! access (configname, R_OK))
{
/* Print a warning when both config files are present. */
@ -1942,12 +1942,12 @@ main (int argc, char **argv)
/* Please note that we may running SUID(ROOT), so be very CAREFUL
when adding any stuff between here and the call to
secmem_init() somewhere after the option parsing. */
gnupg_reopen_std ("gpg");
gnupg_reopen_std (GPG_NAME);
trap_unaligned ();
gnupg_rl_initialize ();
set_strusage (my_strusage);
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
log_set_prefix ("gpg", 1);
log_set_prefix (GPG_NAME, 1);
/* Make sure that our subsystems are ready. */
i18n_init();
@ -3418,7 +3418,7 @@ main (int argc, char **argv)
|| (cmd != aDeArmor && cmd != aEnArmor && cmd != aGPGConfTest) )
{
if (!nrings || default_keyring) /* Add default ring. */
keydb_add_resource ("pubring" EXTSEP_S "gpg",
keydb_add_resource ("pubring" EXTSEP_S GPGEXT_GPG,
KEYDB_RESOURCE_FLAG_DEFAULT);
for (sl = nrings; sl; sl = sl->next )
keydb_add_resource (sl->d, sl->flags);

View File

@ -108,7 +108,7 @@ my_strusage( int level )
switch (level)
{
case 11: p = "gpgv (GnuPG)";
case 11: p = "@GPG@v (GnuPG)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -198,7 +198,7 @@ main( int argc, char **argv )
/* Note: We open all keyrings in read-only mode. */
if (!nrings) /* No keyring given: use default one. */
keydb_add_resource ("trustedkeys" EXTSEP_S "gpg",
keydb_add_resource ("trustedkeys" EXTSEP_S GPGEXT_GPG,
KEYDB_RESOURCE_FLAG_READONLY);
for (sl = nrings; sl; sl = sl->next)
keydb_add_resource (sl->d, KEYDB_RESOURCE_FLAG_READONLY);

View File

@ -2088,7 +2088,7 @@ ask_curve (void)
continue;
curves[idx].available = 1;
tty_printf (_(" (%d) %s\n"), idx + 1,
tty_printf (" (%d) %s\n", idx + 1,
curves[idx].pretty_name?
curves[idx].pretty_name:curves[idx].name);
}
@ -2337,9 +2337,9 @@ ask_user_id (int mode, KBNODE keyblock)
{
/* TRANSLATORS: This is the new string telling the user what
gpg is now going to do (i.e. ask for the parts of the user
ID). Note that if you do not tyranslated this string, a
ID). Note that if you do not translate this string, a
different string will be used used, which might still have
a correct transaltion. */
a correct translation. */
const char *s1 =
N_("\n"
"GnuPG needs to construct a user ID to identify your key.\n"

View File

@ -1171,7 +1171,7 @@ create_tmp_file (const char *template,
* works. So we replace .gpg by .bak or .tmp
*/
if (strlen (template) > 4
&& !strcmp (template+strlen(template)-4, EXTSEP_S "gpg") )
&& !strcmp (template+strlen(template)-4, EXTSEP_S GPGEXT_GPG) )
{
bakfname = xmalloc (strlen (template) + 1);
strcpy (bakfname, template);

View File

@ -105,7 +105,7 @@ make_outfile_name( const char *iname )
return xstrdup("-");
n = strlen(iname);
if( n > 4 && ( !CMP_FILENAME(iname+n-4, EXTSEP_S "gpg")
if( n > 4 && ( !CMP_FILENAME(iname+n-4, EXTSEP_S GPGEXT_GPG)
|| !CMP_FILENAME(iname+n-4, EXTSEP_S "pgp")
|| !CMP_FILENAME(iname+n-4, EXTSEP_S "sig")
|| !CMP_FILENAME(iname+n-4, EXTSEP_S "asc") ) ) {
@ -255,7 +255,8 @@ open_outfile (int inp_fd, const char *iname, int mode, iobuf_t *a)
{
buf = xstrconcat (iname,
(mode==1 ? EXTSEP_S "asc" :
mode==2 ? EXTSEP_S "sig" : EXTSEP_S "gpg"),
mode==2 ? EXTSEP_S "sig" :
/* */ EXTSEP_S GPGEXT_GPG),
NULL);
}
name = buf;
@ -369,7 +370,7 @@ copy_options_file( const char *destdir )
xfree(fname);
return;
}
strcpy(stpcpy(fname, destdir), DIRSEP_S "gpg" EXTSEP_S "conf" );
strcpy(stpcpy(fname, destdir), DIRSEP_S GPGEXT_GPG EXTSEP_S "conf" );
oldmask=umask(077);
if ( is_secured_filename (fname) )
{

View File

@ -709,7 +709,7 @@ gpg_server (ctrl_t ctrl)
if (opt.verbose || opt.debug)
{
char *tmp = NULL;
const char *s1 = getenv ("GPG_AGENT_INFO");
const char *s1 = getenv (GPG_AGENT_INFO_NAME);
tmp = xtryasprintf ("Home: %s\n"
"Config: %s\n"

View File

@ -1241,7 +1241,8 @@ clearsign_file( const char *fname, strlist_t locusr, const char *outfile )
if( opt.not_dash_escaped )
iobuf_writestr( out,
"NotDashEscaped: You need GnuPG to verify this message" LF );
"NotDashEscaped: You need "GPG_NAME
" to verify this message" LF );
iobuf_writestr(out, LF );
if ( gcry_md_open (&textmd, 0, 0) )

View File

@ -491,7 +491,7 @@ tdbio_set_dbname( const char *new_dbname, int create )
}
if(new_dbname==NULL)
fname=make_filename(opt.homedir,"trustdb" EXTSEP_S "gpg", NULL);
fname=make_filename(opt.homedir,"trustdb" EXTSEP_S GPGEXT_GPG, NULL);
else if (*new_dbname != DIRSEP_C )
{
if (strchr(new_dbname, DIRSEP_C) )
@ -1239,7 +1239,7 @@ tdbio_read_record( ulong recnum, TRUSTREC *rec, int expected )
case 0: /* unused (free) record */
break;
case RECTYPE_VER: /* version record */
if( memcmp(buf+1, "gpg", 3 ) ) {
if( memcmp(buf+1, GPGEXT_GPG, 3 ) ) {
log_error( _("%s: not a trustdb file\n"), db_name );
err = gpg_error (GPG_ERR_TRUSTDB);
}
@ -1331,7 +1331,7 @@ tdbio_write_record( TRUSTREC *rec )
case RECTYPE_VER: /* version record */
if( recnum )
BUG();
memcpy(p-1, "gpg", 3 ); p += 2;
memcpy(p-1, GPGEXT_GPG, 3 ); p += 2;
*p++ = rec->r.ver.version;
*p++ = rec->r.ver.marginals;
*p++ = rec->r.ver.completes;

View File

@ -212,17 +212,17 @@ my_strusage( int level )
switch (level)
{
case 11: p = "g13 (GnuPG)";
case 11: p = "@G13@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
case 19: p = _("Please report bugs to <" PACKAGE_BUGREPORT ">.\n");
break;
case 1:
case 40: p = _("Usage: g13 [options] [files] (-h for help)");
case 40: p = _("Usage: @G13@ [options] [files] (-h for help)");
break;
case 41:
p = _("Syntax: g13 [options] [files]\n"
p = _("Syntax: @G13@ [options] [files]\n"
"Create, mount or unmount an encrypted file system container\n");
break;
@ -238,7 +238,7 @@ my_strusage( int level )
static void
wrong_args (const char *text)
{
fputs (_("usage: g13 [options] "), stderr);
fprintf (stderr, _("usage: %s [options] "), G13_NAME);
fputs (text, stderr);
putc ('\n', stderr);
g13_exit (2);
@ -344,11 +344,11 @@ main ( int argc, char **argv)
/*mtrace();*/
gnupg_reopen_std ("g13");
gnupg_reopen_std (G13_NAME);
set_strusage (my_strusage);
gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
log_set_prefix ("g13", 1);
log_set_prefix (G13_NAME, 1);
/* Make sure that our subsystems are ready. */
i18n_init ();
@ -430,7 +430,7 @@ main ( int argc, char **argv)
/* Set the default option file */
if (default_config )
configname = make_filename (opt.homedir, "g13.conf", NULL);
configname = make_filename (opt.homedir, G13_NAME".conf", NULL);
argc = orig_argc;
argv = orig_argv;
@ -577,7 +577,7 @@ main ( int argc, char **argv)
configname = NULL;
if (!opt.config_filename)
opt.config_filename = make_filename (opt.homedir, "g13.conf", NULL);
opt.config_filename = make_filename (opt.homedir, G13_NAME".conf", NULL);
if (log_get_errorcount(0))
g13_exit(2);

View File

@ -612,7 +612,7 @@ g13_server (ctrl_t ctrl)
if (opt.verbose || opt.debug)
{
char *tmp = NULL;
const char *s1 = getenv ("GPG_AGENT_INFO");
const char *s1 = getenv (GPG_AGENT_INFO_NAME);
tmp = xtryasprintf ("Home: %s\n"
"Config: %s\n"

View File

@ -106,7 +106,7 @@ my_strusage( int level )
{
const char *p;
switch( level ) {
case 11: p = "kbxutil (GnuPG)";
case 11: p = "kbxutil (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;

View File

@ -82,7 +82,7 @@ typedef struct
typedef struct
{
const char **protocols;
} curl_version_info_data;
} curl_version_info_data;
#define CURL_ERROR_SIZE 256
#define CURL_GLOBAL_DEFAULT 0
@ -96,7 +96,7 @@ CURLcode curl_easy_perform(CURL *curl);
void curl_easy_cleanup(CURL *curl);
char *curl_escape(char *str,int len);
#define curl_free(x) free(x)
#define curl_version() "GnuPG curl-shim"
#define curl_version() GNUPG_NAME" curl-shim"
curl_version_info_data *curl_version_info(int type);
struct curl_slist

View File

@ -99,7 +99,7 @@ get_key(char *getkey)
return curl_err_to_gpg_err(res);
}
static void
static void
show_help (FILE *fp)
{
fprintf (fp,"-h, --help\thelp\n");
@ -124,7 +124,7 @@ main(int argc,char *argv[])
/* Kludge to implement standard GNU options. */
if (argc > 1 && !strcmp (argv[1], "--version"))
{
printf ("gpgkeys_curl (GnuPG) %s\n", VERSION);
printf ("gpgkeys_curl (%s) %s\n", GNUPG_NAME, VERSION);
printf ("Uses: %s\n", curl_version());
return 0;
}

View File

@ -337,7 +337,7 @@ main(int argc,char *argv[])
/* Kludge to implement standard GNU options. */
if (argc > 1 && !strcmp (argv[1], "--version"))
{
fputs ("gpgkeys_finger (GnuPG) " VERSION"\n", stdout);
fputs ("gpgkeys_finger ("GNUPG_NAME") " VERSION"\n", stdout);
return 0;
}
else if (argc > 1 && !strcmp (argv[1], "--help"))

View File

@ -354,7 +354,7 @@ get_name(const char *getkey)
ret=KEYSERVER_NO_MEMORY;
goto fail;
}
fprintf(output,"NAME %s BEGIN\n",getkey);
if(opt->verbose>2)
@ -546,7 +546,7 @@ srv_replace(const char *srvtag)
}
#endif
static void
static void
show_help (FILE *fp)
{
fprintf (fp,"-h, --help\thelp\n");
@ -570,7 +570,7 @@ main(int argc,char *argv[])
/* Kludge to implement standard GNU options. */
if (argc > 1 && !strcmp (argv[1], "--version"))
{
printf ("gpgkeys_hkp (GnuPG) %s\n", VERSION);
printf ("gpgkeys_hkp (%s) %s\n", GNUPG_NAME, VERSION);
printf ("Uses: %s\n", curl_version());
return 0;
}
@ -743,7 +743,7 @@ main(int argc,char *argv[])
/* We're using libcurl, so fake SRV support via our wrapper.
This isn't as good as true SRV support, as we do not try all
possible targets at one particular level and work our way
down the list, but it's better than nothing. */
down the list, but it's better than nothing. */
srv_replace(srvtag);
#else
/* We're using our internal curl shim, so we can use its (true)

View File

@ -115,9 +115,9 @@ get_key (adns_state adns_ctx, char *address)
ret = KEYSERVER_KEY_NOT_FOUND;
goto leave;
}
if (answer->status != adns_s_ok)
if (answer->status != adns_s_ok)
{
fprintf (console, PGM": DNS query returned: %s (%s)\n",
fprintf (console, PGM": DNS query returned: %s (%s)\n",
adns_strerror (answer->status),
adns_errabbrev (answer->status));
ret = KEYSERVER_KEY_NOT_FOUND;
@ -141,7 +141,7 @@ get_key (adns_state adns_ctx, char *address)
}
if ( datalen < 5 )
{
fprintf (console, PGM": error: truncated CERT record\n");
fprintf (console, PGM": error: truncated CERT record\n");
ret = KEYSERVER_KEY_NOT_FOUND;
goto leave;
}
@ -155,7 +155,7 @@ get_key (adns_state adns_ctx, char *address)
if ( datalen < 11 )
{
/* Gpg checks for a minium length of 11, thus we do the same. */
fprintf (console, PGM": error: OpenPGP data to short\n");
fprintf (console, PGM": error: OpenPGP data to short\n");
ret = KEYSERVER_KEY_NOT_FOUND;
goto leave;
}
@ -166,11 +166,11 @@ get_key (adns_state adns_ctx, char *address)
break;
default:
fprintf (console, PGM": CERT type %d ignored\n", (data[0] <<8|data[1]));
fprintf (console, PGM": CERT type %d ignored\n", (data[0] <<8|data[1]));
ret = KEYSERVER_KEY_NOT_FOUND;
goto leave;
}
ret = 0; /* All fine. */
leave:
@ -178,17 +178,17 @@ get_key (adns_state adns_ctx, char *address)
fprintf (output, "\nNAME %s FAILED %d\n", address, ret);
else
fprintf (output, "\nNAME %s END\n", address);
adns_free (answer);
adns_free (answer);
xfree (name);
return ret;
}
/* Print some help. */
static void
static void
show_help (FILE *fp)
{
fputs (PGM" (GnuPG) " VERSION"\n\n", fp);
fputs (PGM" ("GNUPG_NAME") " VERSION"\n\n", fp);
fputs (" -h\thelp\n"
" -V\tversion\n"
" -o\toutput to this file\n"
@ -233,7 +233,7 @@ main (int argc, char *argv[])
/* Kludge to implement standard GNU options. */
if (argc > 1 && !strcmp (argv[1], "--version"))
{
fputs (PGM" (GnuPG) " VERSION"\n", stdout);
fputs (PGM" ("GNUPG_NAME") " VERSION"\n", stdout);
return 0;
}
else if (argc > 1 && !strcmp (argv[1], "--help"))
@ -283,7 +283,7 @@ main (int argc, char *argv[])
if (!output)
output = stdout;
opt = init_ks_options();
if(!opt)
return KEYSERVER_NO_MEMORY;
@ -292,10 +292,10 @@ main (int argc, char *argv[])
while ( fgets(line,MAX_LINE,input) )
{
int err;
if(line[0]=='\n')
break;
err = parse_ks_options (line, opt);
if (err > 0)
{
@ -326,7 +326,7 @@ main (int argc, char *argv[])
if (p)
{
*p++ = 0;
do
do
{
pend = strchr (p, '&');
if (pend)
@ -371,7 +371,7 @@ main (int argc, char *argv[])
strerror (errno));
goto leave;
}
if (opt->action == KS_GETNAME)
{
while ( fgets (line,MAX_LINE,input) )
@ -379,11 +379,11 @@ main (int argc, char *argv[])
if (line[0]=='\n' || !line[0] )
break;
line[strlen(line)-1] = 0; /* Trim the trailing LF. */
akey = xtrymalloc (sizeof *akey);
if (!akey)
{
fprintf (console,
fprintf (console,
PGM": out of memory while building key list\n");
ret = KEYSERVER_NO_MEMORY;
goto leave;
@ -402,7 +402,7 @@ main (int argc, char *argv[])
"key retrieval by name\n");
goto leave;
}
/* Send the response */
fprintf (output, "VERSION %d\n", KEYSERVER_PROTO_VERSION);
fprintf (output, "PROGRAM %s\n\n", VERSION);
@ -413,13 +413,13 @@ main (int argc, char *argv[])
fprintf (console, "User:\t\t%s\n", opt->opaque);
fprintf (console, "Command:\tGET\n");
}
for (akey = keylist; akey; akey = akey->next)
{
set_timeout (opt->timeout);
if ( get_key (adns_ctx, akey->str) )
failed++;
}
}
if (!failed)
ret = KEYSERVER_OK;

View File

@ -455,7 +455,7 @@ build_attrs(LDAPMod ***modlist,char *line)
case 'R':
revoked=1;
break;
case 'd':
case 'D':
disabled=1;
@ -1037,7 +1037,7 @@ get_key(char *getkey)
else
{
/* short key id */
sprintf(search,"(pgpkeyid=%.8s)",getkey);
}
@ -1767,12 +1767,12 @@ find_basekeyspacedn(void)
}
ldap_msgfree(si_res);
}
}
return LDAP_SUCCESS;
}
static void
static void
show_help (FILE *fp)
{
fprintf (fp,"-h, --help\thelp\n");
@ -1794,7 +1794,7 @@ main(int argc,char *argv[])
/* Kludge to implement standard GNU options. */
if (argc > 1 && !strcmp (argv[1], "--version"))
{
fputs ("gpgkeys_ldap (GnuPG) " VERSION"\n", stdout);
fputs ("gpgkeys_ldap ("GNUPG_NAME") " VERSION"\n", stdout);
return 0;
}
else if (argc > 1 && !strcmp (argv[1], "--help"))

166
po/de.po
View File

@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnupg-2.1.0\n"
"Report-Msgid-Bugs-To: translations@gnupg.org\n"
"PO-Revision-Date: 2012-08-24 10:19+0200\n"
"PO-Revision-Date: 2013-11-18 14:05+0100\n"
"Last-Translator: Werner Koch <wk@gnupg.org>\n"
"Language-Team: German <de@li.org>\n"
"Language: de\n"
@ -99,14 +99,12 @@ msgstr "Passphrase"
msgid "ssh keys greater than %d bits are not supported\n"
msgstr "SSH Schlüssel von mehr als %d Bits werden nicht unterstützt\n"
#, fuzzy, c-format
#| msgid "can't create '%s': %s\n"
msgid "can't create `%s': %s\n"
#, c-format
msgid "can't create '%s': %s\n"
msgstr "'%s' kann nicht erzeugt werden: %s\n"
#, fuzzy, c-format
#| msgid "can't open '%s': %s\n"
msgid "can't open `%s': %s\n"
#, c-format
msgid "can't open '%s': %s\n"
msgstr "'%s' kann nicht geöffnet werden: %s\n"
#, c-format
@ -191,8 +189,7 @@ msgstr "PUK"
msgid "Reset Code"
msgstr "Rückstellcode"
#, fuzzy, c-format
#| msgid "%s%%0A%%0AUse the reader's keypad for input."
#, c-format
msgid "%s%%0A%%0AUse the reader's pinpad for input."
msgstr "%s%%0A%%0AZur Eingabe die Tastatur des Kartenlesers verwenden."
@ -377,15 +374,15 @@ msgstr ""
"Berichte über Programmfehler bitte in englisch an <@EMAIL@>.\n"
"Sinn- oder Schreibfehler in den deutschen Texten bitte an <de@li.org>.\n"
msgid "Usage: gpg-agent [options] (-h for help)"
msgstr "Aufruf: gpg-agent [Optionen] (-h für Hilfe)"
msgid "Usage: @GPG_AGENT@ [options] (-h for help)"
msgstr "Gebrauch: @GPG_AGENT@ [Optionen] [Kommando [Argumente]]"
msgid ""
"Syntax: gpg-agent [options] [command [args]]\n"
"Secret key management for GnuPG\n"
"Syntax: @GPG_AGENT@ [options] [command [args]]\n"
"Secret key management for @GNUPG@\n"
msgstr ""
"Syntax: gpg-agent [Optionen] [Befehl [Argumente]]\n"
"Verwaltung von geheimen Schlüsseln für GnuPG\n"
"Syntax: @GPG_AGENT@ [Optionen] [Befehl [Argumente]]\n"
"Verwaltung von geheimen Schlüsseln für @GNUPG@\n"
#, c-format
msgid "invalid debug-level '%s' given\n"
@ -491,8 +488,9 @@ msgstr "%s %s angehalten\n"
msgid "no gpg-agent running in this session\n"
msgstr "Der gpg-agent läuft nicht für diese Session\n"
msgid "malformed GPG_AGENT_INFO environment variable\n"
msgstr "fehlerhaft aufgebaute GPG_AGENT_INFO - Umgebungsvariable\n"
#, c-format
msgid "malformed %s environment variable\n"
msgstr "Fehlerhafte %s Variable\n"
#, c-format
msgid "gpg-agent protocol version %d is not supported\n"
@ -970,10 +968,6 @@ msgstr "Dirmngr benutzbar"
msgid "No help available for '%s'."
msgstr "Keine Hilfe für '%s' vorhanden."
#, c-format
msgid "can't open '%s': %s\n"
msgstr "'%s' kann nicht geöffnet werden: %s\n"
msgid "ignoring garbage line"
msgstr "Zeile mit nicht identifizierten Zeichen wird ignoriert"
@ -1063,10 +1057,6 @@ msgstr "Die temporäre Datei `%s' kann nicht erstellt werden: %s\n"
msgid "error writing to '%s': %s\n"
msgstr "Fehler beim Schreiben von %s: %s\n"
#, c-format
msgid "can't create '%s': %s\n"
msgstr "'%s' kann nicht erzeugt werden: %s\n"
#, c-format
msgid "removing stale lockfile (created by %d)\n"
msgstr "eine übriggebliebene Sperrdatei wird entfernt (erzeugt von %d)\n"
@ -1173,10 +1163,8 @@ msgstr "nicht als Klartext darstellbar"
msgid "failed to proxy %s inquiry to client\n"
msgstr "Die %s \"inquiry\" konnte nicht an den Client weitergeleitet werden\n"
#, fuzzy
#| msgid "Enter passphrase\n"
msgid "Enter passphrase: "
msgstr "Geben Sie die Passphrase ein\n"
msgstr "Geben Sie die Passphrase ein: "
#, c-format
msgid "OpenPGP card not available: %s\n"
@ -1384,10 +1372,9 @@ msgstr "Ungültige Auswahl.\n"
msgid "Please select where to store the key:\n"
msgstr "Wählen Sie den Speicherort für den Schlüssel:\n"
#, fuzzy, c-format
#| msgid "read failed: %s\n"
#, c-format
msgid "KEYTOCARD failed: %s\n"
msgstr "Lesen schlug fehl: %s\n"
msgstr "Das KEYTOCARD Kommando schlug fehl: %s\n"
msgid "quit this menu"
msgstr "Menü verlassen"
@ -1838,15 +1825,15 @@ msgstr ""
" --list-keys [Namen] Schlüssel anzeigen\n"
" --fingerprint [Namen] \"Fingerabdrücke\" anzeigen\n"
msgid "Usage: gpg [options] [files] (-h for help)"
msgstr "Aufruf: gpg [Optionen] [Dateien] (-h für Hilfe)"
msgid "Usage: @GPG@ [options] [files] (-h for help)"
msgstr "Aufruf: @GPG@ [Optionen] [Dateien] (-h für Hilfe)"
msgid ""
"Syntax: gpg [options] [files]\n"
"Syntax: @GPG@ [options] [files]\n"
"Sign, check, encrypt or decrypt\n"
"Default operation depends on the input data\n"
msgstr ""
"Aufruf: gpg [Optionen] [Dateien]\n"
"Aufruf: @GPG@ [Optionen] [Dateien]\n"
"Signieren, prüfen, verschlüsseln, entschlüsseln.\n"
"Die voreingestellte Operation ist abhängig von den Eingabedaten\n"
@ -1995,10 +1982,9 @@ msgstr "Hinweis: %s ist nicht für den üblichen Gebrauch gedacht!\n"
msgid "'%s' is not a valid signature expiration\n"
msgstr "`%s' ist kein gültiges Signaturablaufdatum\n"
#, fuzzy, c-format
#| msgid "Invalid subject name '%s'\n"
#, c-format
msgid "invalid pinentry mode '%s'\n"
msgstr "Ungültiger Subjekt-Name `%s'\n"
msgstr "Ungültiger Subjekt-Name '%s'\n"
#, c-format
msgid "'%s' is not a valid character set\n"
@ -3678,6 +3664,9 @@ msgstr "Die verlangte Schlüssellänge beträgt %u Bit\n"
msgid "rounded to %u bits\n"
msgstr "gerundet auf %u Bit\n"
msgid "Please select which elliptic curve you want:\n"
msgstr "Bitte wählen Sie, welche elliptische Kurve Sie möchten:\n"
msgid ""
"Please specify how long the key should be valid.\n"
" 0 = key does not expire\n"
@ -5433,6 +5422,9 @@ msgstr "Die Antwort enthält das RSA-Modulus nicht\n"
msgid "response does not contain the RSA public exponent\n"
msgstr "Antwort enthält den öffentlichen RSA-Exponenten nicht\n"
msgid "response does not contain the EC public point\n"
msgstr "Der öffentlichen EC Punkt fehlt in der Antwort\n"
#, c-format
msgid "using default PIN as %s\n"
msgstr "Die Standard PIN wird für %s benutzt\n"
@ -5568,8 +5560,6 @@ msgstr ""
msgid "can't access %s - invalid OpenPGP card?\n"
msgstr "Kann auf %s nicht zugreifen - ungültige OpenPGP-Karte?\n"
#, fuzzy
#| msgid "||Please enter your PIN at the reader's keypad"
msgid "||Please enter your PIN at the reader's pinpad"
msgstr "||Bitte die PIN auf der Tastatur des Kartenlesers eingeben"
@ -5603,8 +5593,6 @@ msgstr "Den internen CCID Treiber nicht benutzen"
msgid "|N|disconnect the card after N seconds of inactivity"
msgstr "|N|Schalte die Karte nach N Sekunden Inaktivität ab"
#, fuzzy
#| msgid "do not use a reader's keypad"
msgid "do not use a reader's pinpad"
msgstr "Die Tastatur des Kartenlesers nicht benutzen"
@ -5612,17 +5600,17 @@ msgid "deny the use of admin card commands"
msgstr "Verweigere die Benutzung von \"Admin\"-Befehlen"
msgid "use variable length input for pinpad"
msgstr ""
msgstr "Variable Längeneingabe für die Kartenlesertastatur benutzen"
msgid "Usage: scdaemon [options] (-h for help)"
msgstr "Aufruf: scdaemon [Optionen] (-h für Hilfe)"
msgid "Usage: @SCDAEMON@ [options] (-h for help)"
msgstr "Gebrauch: @SCDAEMON@ [Optionen] (-h für Hilfe)"
msgid ""
"Syntax: scdaemon [options] [command [args]]\n"
"Smartcard daemon for GnuPG\n"
"Smartcard daemon for @GNUPG@\n"
msgstr ""
"Syntax: scdaemon [Optionen] [Befehl [Argumente]]\n"
"Smartcard Daemon für GnuPG\n"
"Syntax: @SCDAEMON@ [Optionen] [Befehl [Argumente]]\n"
"Smartcard Daemon für @GNUPG@\n"
msgid "please use the option '--daemon' to run the program in the background\n"
msgstr ""
@ -6186,15 +6174,15 @@ msgstr "|NAME|Verschlüsselungsverfahren NAME benutzen"
msgid "|NAME|use message digest algorithm NAME"
msgstr "|NAME|Hashverfahren NAME benutzen"
msgid "Usage: gpgsm [options] [files] (-h for help)"
msgstr "Aufruf: gpgsm [Optionen] [Dateien] (-h für Hilfe)"
msgid "Usage: @GPGSM@ [options] [files] (-h for help)"
msgstr "Aufruf: @GPGSM@ [Optionen] [Dateien] (-h für Hilfe)"
msgid ""
"Syntax: gpgsm [options] [files]\n"
"Syntax: @GPGSM@ [options] [files]\n"
"Sign, check, encrypt or decrypt using the S/MIME protocol\n"
"Default operation depends on the input data\n"
msgstr ""
"Syntax: gpgsm [Optionen] [Dateien]\n"
"Syntax: @GPGSM@ [Optionen] [Dateien]\n"
"Signieren, prüfen, ver- und entschlüsseln mittels S/MIME Protokoll\n"
msgid "usage: gpgsm [options] "
@ -7002,9 +6990,6 @@ msgstr "Offensichtlich ist kein Dirmngr vorhanden\n"
msgid "no running dirmngr - starting one\n"
msgstr "Dirmngr läuft nicht - ein neuer wird gestartet\n"
msgid "malformed DIRMNGR_INFO environment variable\n"
msgstr "Fehlerhafte DIRMNGR_INFO Variable\n"
#, c-format
msgid "dirmngr protocol version %d is not supported\n"
msgstr "Dirmngr Protocol Version %d wird nicht unterstützt\n"
@ -7108,22 +7093,23 @@ msgstr ""
"(Im \"info\"-Handbuch findet sich eine vollständige Liste aller Kommandos "
"und Optionen)\n"
msgid "Usage: dirmngr [options] (-h for help)"
msgstr "Gebrauch: dirmnr [Optionen] [Kommando [Argumente]]"
msgid "Usage: @DIRMNGR@ [options] (-h for help)"
msgstr "Gebrauch: @DIRMNGR@ [Optionen]"
msgid ""
"Syntax: dirmngr [options] [command [args]]\n"
"LDAP and OCSP access for GnuPG\n"
"Syntax: @DIRMNGR@ [options] [command [args]]\n"
"LDAP and OCSP access for @GNUPG@\n"
msgstr ""
"Syntax: dirmngr [Optionen] [Kommando [Argumente]]\n"
"LDAP und OCSP Zugriff für GnuPG\n"
"Syntax: @DIRMNGR@ [Optionen] [Kommando [Argumente]]\n"
"LDAP und OCSP Zugriff für @GNUPG@\n"
#, c-format
msgid "valid debug levels are: %s\n"
msgstr "Gültige Debugebenen sind: %s\n"
msgid "usage: dirmngr [options] "
msgstr "Gebrauch: dirmngr [Optionen] "
#, c-format
msgid "usage: %s [options] "
msgstr "Aufruf: %s [Optionen] "
msgid "colons are not allowed in the socket name\n"
msgstr "Doppelpunkte sind im Namen des Sockets nicht erlaubt\n"
@ -7619,14 +7605,14 @@ msgstr "|DATEI|Beim Starten Kommandos aus DATEI lesen"
msgid "run /subst on startup"
msgstr "Nach dem Starten \"/subst\" ausführen"
msgid "Usage: gpg-connect-agent [options] (-h for help)"
msgstr "Aufruf: gpg-connect-agent [Optionen] (-h für Hilfe)"
msgid "Usage: @GPG@-connect-agent [options] (-h for help)"
msgstr "Aufruf: @GPG@-connect-agent [Optionen] (-h für Hilfe)"
msgid ""
"Syntax: gpg-connect-agent [options]\n"
"Syntax: @GPG@-connect-agent [options]\n"
"Connect to a running agent and send commands\n"
msgstr ""
"Syntax: gpg-connect-agent [Optionen]\n"
"Syntax: @GPG@-connect-agent [Optionen]\n"
"Mit einem laufenden Agenten verbinden und Befehle senden\n"
#, c-format
@ -7818,15 +7804,15 @@ msgstr "Als Ausgabedatei benutzen"
msgid "activate changes at runtime, if possible"
msgstr "Aktiviere Änderungen zur Laufzeit; falls möglich"
msgid "Usage: gpgconf [options] (-h for help)"
msgstr "Aufruf: gpgconf [Optionen] (-h für Hilfe)"
msgid "Usage: @GPGCONF@ [options] (-h for help)"
msgstr "Gebrauch: @GPGCONF@ [Optionen] (-h für Hilfe)"
msgid ""
"Syntax: gpgconf [options]\n"
"Manage configuration options for tools of the GnuPG system\n"
"Syntax: @GPGCONF@ [options]\n"
"Manage configuration options for tools of the @GNUPG@ system\n"
msgstr ""
"Syntax: gpgconf {Optionen]\n"
"Verwalte Konfigurationsoptionen für Programme des GnuPG Systems\n"
"Syntax: @GPGCONF@ {Optionen]\n"
"Verwalte Konfigurationsoptionen für Programme des @GNUPG@ Systems\n"
msgid "usage: gpgconf [options] "
msgstr "Aufruf: gpgconf [Optionen] "
@ -7984,6 +7970,40 @@ msgstr ""
"Syntax: gpg-check-pattern [optionen] Musterdatei\n"
"Die von stdin gelesene Passphrase gegen die Musterdatei prüfen\n"
#~ msgid "Usage: scdaemon [options] (-h for help)"
#~ msgstr "Aufruf: scdaemon [Optionen] (-h für Hilfe)"
#~ msgid "malformed GPG_AGENT_INFO environment variable\n"
#~ msgstr "fehlerhaft aufgebaute GPG_AGENT_INFO - Umgebungsvariable\n"
#~ msgid " (%d) %s\n"
#~ msgstr " (%d) signieren\n"
#~ msgid "Usage: gpgsm [options] [files] (-h for help)"
#~ msgstr "Aufruf: gpgsm [Optionen] [Dateien] (-h für Hilfe)"
#~ msgid "Usage: dirmngr [options] (-h for help)"
#~ msgstr "Gebrauch: dirmnr [Optionen] [Kommando [Argumente]]"
#~ msgid "usage: dirmngr [options] "
#~ msgstr "Gebrauch: dirmngr [Optionen] "
#~ msgid "Usage: gpgconf [options] (-h for help)"
#~ msgstr "Aufruf: gpgconf [Optionen] (-h für Hilfe)"
#~ msgid "Usage: gpg-agent [options] (-h for help)"
#~ msgstr "Aufruf: gpg-agent [Optionen] (-h für Hilfe)"
#, fuzzy
#~| msgid "can't create '%s': %s\n"
#~ msgid "can't create `%s': %s\n"
#~ msgstr "'%s' kann nicht erzeugt werden: %s\n"
#, fuzzy
#~| msgid "can't open '%s': %s\n"
#~ msgid "can't open `%s': %s\n"
#~ msgstr "'%s' kann nicht geöffnet werden: %s\n"
#~ msgid "too many entries in pk cache - disabled\n"
#~ msgstr "zu viele Einträge im pk-Cache - abgeschaltet\n"

View File

@ -1833,7 +1833,7 @@ pcsc_vendor_specific_init (int slot)
reader_table[slot].is_spr532 = 1;
reader_table[slot].pinpad_varlen_supported = 1;
}
else if (vendor == 0x046a && product == 0x003e /* Cherry ST-2xxx */
else if ((vendor == 0x046a && product == 0x003e) /* Cherry ST-2xxx */
|| vendor == 0x0c4b /* Tested with Reiner cyberJack GO */
|| vendor == 0x1a44 /* Tested with Vasco DIGIPASS 920 */
|| vendor == 0x234b /* Tested with FSIJ Gnuk Token */

View File

@ -53,7 +53,7 @@
/* Allow for a standalone build. */
#ifdef VERSION
#define MYVERSION_LINE PGM " (GnuPG) " VERSION
#define MYVERSION_LINE PGM " ("GNUPG_NAME") " VERSION
#define BUGREPORT_LINE "\nReport bugs to <bug-gnupg@gnu.org>.\n"
#else
#define MYVERSION_LINE PGM

View File

@ -243,7 +243,7 @@ my_strusage (int level)
switch (level)
{
case 11: p = "scdaemon (GnuPG)";
case 11: p = "@SCDAEMON@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -260,10 +260,10 @@ my_strusage (int level)
p = ver_ksba;
break;
case 1:
case 40: p = _("Usage: scdaemon [options] (-h for help)");
case 40: p = _("Usage: @SCDAEMON@ [options] (-h for help)");
break;
case 41: p = _("Syntax: scdaemon [options] [command [args]]\n"
"Smartcard daemon for GnuPG\n");
"Smartcard daemon for @GNUPG@\n");
break;
default: p = NULL;

View File

@ -524,17 +524,17 @@ my_strusage( int level )
switch (level)
{
case 11: p = "gpgsm (GnuPG)";
case 11: p = "@GPGSM@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
case 1:
case 40: p = _("Usage: gpgsm [options] [files] (-h for help)");
case 40: p = _("Usage: @GPGSM@ [options] [files] (-h for help)");
break;
case 41:
p = _("Syntax: gpgsm [options] [files]\n"
p = _("Syntax: @GPGSM@ [options] [files]\n"
"Sign, check, encrypt or decrypt using the S/MIME protocol\n"
"Default operation depends on the input data\n");
break;

View File

@ -1294,7 +1294,7 @@ gpgsm_server (certlist_t default_recplist)
if (opt.verbose || opt.debug)
{
char *tmp = NULL;
const char *s1 = getenv ("GPG_AGENT_INFO");
const char *s1 = getenv (GPG_AGENT_INFO_NAME);
if (asprintf (&tmp,
"Home: %s\n"

View File

@ -810,7 +810,7 @@ main (int argc, char **argv)
}
else if (!strcmp (*argv, "--version"))
{
fputs (PGM " (GnuPG) " PACKAGE_VERSION "\n", stdout);
fputs (PGM " ("GNUPG_NAME") " PACKAGE_VERSION "\n", stdout);
exit (0);
}
else if (!strcmp (*argv, "--help"))

View File

@ -135,7 +135,7 @@ my_strusage (int level)
const char *p;
switch (level)
{
case 11: p = "gpg-check-pattern (GnuPG)";
case 11: p = "gpg-check-pattern (@GnuPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;

View File

@ -182,17 +182,17 @@ my_strusage( int level )
switch (level)
{
case 11: p = "gpg-connect-agent (GnuPG)";
case 11: p = "@GPG@-connect-agent (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
case 1:
case 40: p = _("Usage: gpg-connect-agent [options] (-h for help)");
case 40: p = _("Usage: @GPG@-connect-agent [options] (-h for help)");
break;
case 41:
p = _("Syntax: gpg-connect-agent [options]\n"
p = _("Syntax: @GPG@-connect-agent [options]\n"
"Connect to a running agent and send commands\n");
break;
case 31: p = "\nHome: "; break;

View File

@ -58,7 +58,7 @@
#if defined(HAVE_W32_SYSTEM) && !defined(HAVE_W32CE_SYSTEM)
#define GPGNAME "gpg2"
#else
#define GPGNAME "gpg"
#define GPGNAME GPG_NAME
#endif
@ -180,15 +180,15 @@ static struct
} gc_backend[GC_BACKEND_NR] =
{
{ NULL }, /* GC_BACKEND_ANY dummy entry. */
{ "GnuPG", GPGNAME, GNUPG_MODULE_NAME_GPG,
{ GNUPG_NAME, GPGNAME, GNUPG_MODULE_NAME_GPG,
NULL, "gpgconf-gpg.conf" },
{ "GPGSM", "gpgsm", GNUPG_MODULE_NAME_GPGSM,
{ "GPGSM", GPGSM_NAME, GNUPG_MODULE_NAME_GPGSM,
NULL, "gpgconf-gpgsm.conf" },
{ "GPG Agent", "gpg-agent", GNUPG_MODULE_NAME_AGENT,
{ "GPG Agent", GPG_AGENT_NAME, GNUPG_MODULE_NAME_AGENT,
gpg_agent_runtime_change, "gpgconf-gpg-agent.conf" },
{ "SCDaemon", "scdaemon", GNUPG_MODULE_NAME_SCDAEMON,
{ "SCDaemon", SCDAEMON_NAME, GNUPG_MODULE_NAME_SCDAEMON,
scdaemon_runtime_change, "gpgconf-scdaemon.conf" },
{ "DirMngr", "dirmngr", GNUPG_MODULE_NAME_DIRMNGR,
{ "DirMngr", DIRMNGR_NAME, GNUPG_MODULE_NAME_DIRMNGR,
NULL, "gpgconf-dirmngr.conf" },
{ "DirMngr LDAP Server List", NULL, 0,
NULL, "ldapserverlist-file", "LDAP Server" },
@ -1215,8 +1215,8 @@ my_dgettext (const char *domain, const char *msgid)
switched_codeset = 1;
bind_textdomain_codeset (PACKAGE_GT, "utf-8");
bindtextdomain ("dirmngr", LOCALEDIR);
bind_textdomain_codeset ("dirmngr", "utf-8");
bindtextdomain (DIRMNGR_NAME, LOCALEDIR);
bind_textdomain_codeset (DIRMNGR_NAME, "utf-8");
}

View File

@ -98,18 +98,18 @@ my_strusage( int level )
switch (level)
{
case 11: p = "gpgconf (GnuPG)";
case 11: p = "@GPGCONF@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
case 1:
case 40: p = _("Usage: gpgconf [options] (-h for help)");
case 40: p = _("Usage: @GPGCONF@ [options] (-h for help)");
break;
case 41:
p = _("Syntax: gpgconf [options]\n"
"Manage configuration options for tools of the GnuPG system\n");
p = _("Syntax: @GPGCONF@ [options]\n"
"Manage configuration options for tools of the @GNUPG@ system\n");
break;
default: p = NULL; break;
@ -350,10 +350,11 @@ main (int argc, char **argv)
es_fprintf (outfp, "dirmngr-socket:%s\n",
gc_percent_escape (dirmngr_socket_name ()));
{
char *infostr = getenv ("GPG_AGENT_INFO");
char *infostr = getenv (GPG_AGENT_INFO_NAME);
if (!infostr || !*infostr)
infostr = make_filename (default_homedir (), "S.gpg-agent", NULL);
infostr = make_filename (default_homedir (),
GPG_AGENT_SOCK_NAME, NULL);
else
{
char *tmp;

View File

@ -54,9 +54,9 @@ static void split_packets (const char *fname);
enum cmd_and_opt_values {
aNull = 0,
oVerbose = 'v',
oPrefix = 'p',
oUncompress = 500,
oSecretToPublic,
oPrefix = 'p',
oUncompress = 500,
oSecretToPublic,
oNoSplit,
aTest
@ -81,7 +81,7 @@ my_strusage (int level)
const char *p;
switch (level)
{
case 11: p = "gpgsplit (GnuPG)";
case 11: p = "gpgsplit (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -95,7 +95,7 @@ my_strusage (int level)
"Syntax: gpgsplit [options] [files]\n"
"Split an OpenPGP message into packets\n";
break;
default: p = NULL;
}
return p;
@ -114,7 +114,7 @@ main (int argc, char **argv)
#endif
log_set_prefix ("gpgsplit", JNLIB_LOG_WITH_PREFIX);
set_strusage (my_strusage);
pargs.argc = &argc;
pargs.argv = &argv;
pargs.flags= 1; /* do not remove the args */
@ -130,7 +130,7 @@ main (int argc, char **argv)
default : pargs.err = 2; break;
}
}
if (log_get_errorcount(0))
g10_exit (2);
@ -138,12 +138,12 @@ main (int argc, char **argv)
split_packets (NULL);
else
{
for ( ;argc; argc--, argv++)
for ( ;argc; argc--, argv++)
split_packets (*argv);
}
g10_exit (0);
return 0;
return 0;
}
@ -168,7 +168,7 @@ pkttype_to_string (int pkttype)
case PKT_SECRET_KEY : s = "secret_key"; break;
case PKT_PUBLIC_KEY : s = "public_key"; break;
case PKT_SECRET_SUBKEY : s = "secret_subkey"; break;
case PKT_COMPRESSED :
case PKT_COMPRESSED :
s = opt_uncompress? "uncompressed":"compressed";
break;
case PKT_ENCRYPTED : s = "encrypted"; break;
@ -191,17 +191,17 @@ pkttype_to_string (int pkttype)
/*
* Create a new filename and a return a pointer to a statically
* allocated buffer
* allocated buffer
*/
static char *
create_filename (int pkttype)
{
static unsigned int partno = 0;
static char *name;
if (!name)
if (!name)
name = xmalloc (strlen (opt_prefix) + 100 );
assert (pkttype < 1000 && pkttype >= 0 );
partno++;
sprintf (name, "%s%06u-%03d" EXTSEP_S "%.40s",
@ -227,7 +227,7 @@ static int
read_u32 (FILE *fp, unsigned long *rn)
{
size_t tmp;
if (read_u16 (fp, &tmp))
return -1;
*rn = tmp << 16;
@ -239,9 +239,9 @@ read_u32 (FILE *fp, unsigned long *rn)
static int
write_old_header (FILE *fp, int pkttype, unsigned int len)
{
{
int ctb = (0x80 | ((pkttype & 15)<<2));
if (len < 256)
;
else if (len < 65536)
@ -271,7 +271,7 @@ write_old_header (FILE *fp, int pkttype, unsigned int len)
static int
write_new_header (FILE *fp, int pkttype, unsigned int len)
{
{
if ( putc ((0xc0 | (pkttype & 0x3f)), fp) == EOF )
return -1;
@ -313,9 +313,9 @@ public_key_length (const unsigned char *buf, size_t buflen)
int nmpis;
/* byte version number (3 or 4)
u32 creation time
u32 creation time
[u16 valid days (version 3 only)]
byte algorithm
byte algorithm
n MPIs (n and e) */
if (!buflen)
return 0;
@ -368,7 +368,7 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
unsigned int inbufsize, outbufsize;
int c,zinit_done, zrc, nread, count;
size_t n;
memset (&zs, 0, sizeof zs);
inbufsize = 2048;
inbuf = xmalloc (inbufsize);
@ -376,7 +376,7 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
outbuf = xmalloc (outbufsize);
zs.avail_in = 0;
zinit_done = 0;
do
{
if (zs.avail_in < inbufsize)
@ -387,11 +387,11 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
count = inbufsize - n;
for (nread=0;
nread < count && (c=getc (fpin)) != EOF;
nread++)
nread++)
inbuf[n+nread] = c;
n += nread;
if (nread < count && algo == 1)
if (nread < count && algo == 1)
{
inbuf[n] = 0xFF; /* chew dummy byte */
n++;
@ -400,12 +400,12 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
}
zs.next_out = (Bytef *) outbuf;
zs.avail_out = outbufsize;
if (!zinit_done)
if (!zinit_done)
{
zrc = (algo == 1? inflateInit2 ( &zs, -13)
: inflateInit ( &zs ));
if (zrc != Z_OK)
if (zrc != Z_OK)
{
log_fatal ("zlib problem: %s\n", zs.msg? zs.msg :
zrc == Z_MEM_ERROR ? "out of core" :
@ -431,17 +431,17 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
else
log_fatal ("zlib inflate problem: rc=%d\n", zrc );
}
for (n=0; n < outbufsize - zs.avail_out; n++)
for (n=0; n < outbufsize - zs.avail_out; n++)
{
if (putc (outbuf[n], fpout) == EOF )
return 1;
}
}
}
}
while (zrc != Z_STREAM_END && zrc != Z_BUF_ERROR);
{
int i;
fputs ("Left over bytes:", stderr);
for (i=0; i < zs.avail_in; i++)
fprintf (stderr, " %02X", zs.next_in[i]);
@ -462,7 +462,7 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
unsigned int inbufsize, outbufsize;
int c,zinit_done, zrc, nread, count;
size_t n;
memset (&bzs, 0, sizeof bzs);
inbufsize = 2048;
inbuf = xmalloc (inbufsize);
@ -470,7 +470,7 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
outbuf = xmalloc (outbufsize);
bzs.avail_in = 0;
zinit_done = 0;
do
{
if (bzs.avail_in < inbufsize)
@ -481,11 +481,11 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
count = inbufsize - n;
for (nread=0;
nread < count && (c=getc (fpin)) != EOF;
nread++)
nread++)
inbuf[n+nread] = c;
n += nread;
if (nread < count && algo == 1)
if (nread < count && algo == 1)
{
inbuf[n] = 0xFF; /* chew dummy byte */
n++;
@ -494,11 +494,11 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
}
bzs.next_out = outbuf;
bzs.avail_out = outbufsize;
if (!zinit_done)
if (!zinit_done)
{
zrc = BZ2_bzDecompressInit(&bzs,0,0);
if (zrc != BZ_OK)
if (zrc != BZ_OK)
log_fatal ("bz2lib problem: %d\n",zrc);
zinit_done = 1;
}
@ -509,13 +509,13 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
; /* eof */
else if (zrc != BZ_OK && zrc != BZ_PARAM_ERROR)
log_fatal ("bz2lib inflate problem: %d\n", zrc );
for (n=0; n < outbufsize - bzs.avail_out; n++)
for (n=0; n < outbufsize - bzs.avail_out; n++)
{
if (putc (outbuf[n], fpout) == EOF )
return 1;
}
}
}
}
while (zrc != BZ_STREAM_END && zrc != BZ_PARAM_ERROR);
BZ2_bzDecompressEnd(&bzs);
@ -532,7 +532,7 @@ write_part (FILE *fpin, unsigned long pktlen,
int c, first;
unsigned char *p;
const char *outname = create_filename (pkttype);
#if defined(__riscos__) && defined(USE_ZLIBRISCOS)
static int initialized = 0;
@ -546,7 +546,7 @@ write_part (FILE *fpin, unsigned long pktlen,
if (opt_verbose)
log_info ("writing '%s'\n", outname);
fpout = fopen (outname, "wb");
if (!fpout)
if (!fpout)
{
log_error ("error creating '%s': %s\n", outname, strerror(errno));
/* stop right now, otherwise we would mess up the sequence
@ -563,10 +563,10 @@ write_part (FILE *fpin, unsigned long pktlen,
pkttype = pkttype == PKT_SECRET_KEY? PKT_PUBLIC_KEY:PKT_PUBLIC_SUBKEY;
for (i=0; i < pktlen; i++)
for (i=0; i < pktlen; i++)
{
c = getc (fpin);
if (c == EOF)
if (c == EOF)
goto read_error;
blob[i] = c;
}
@ -577,17 +577,17 @@ write_part (FILE *fpin, unsigned long pktlen,
g10_exit (1);
}
if ( (hdr[0] & 0x40) )
{
{
if (write_new_header (fpout, pkttype, len))
goto write_error;
}
else
{
{
if (write_old_header (fpout, pkttype, len))
goto write_error;
}
for (i=0; i < len; i++)
for (i=0; i < len; i++)
{
if ( putc (blob[i], fpout) == EOF )
goto write_error;
@ -605,12 +605,12 @@ write_part (FILE *fpin, unsigned long pktlen,
goto write_error;
}
}
first = 1;
while (partial)
{
size_t partlen;
if (partial == 1)
{ /* openpgp */
if (first )
@ -619,11 +619,11 @@ write_part (FILE *fpin, unsigned long pktlen,
assert( c >= 224 && c < 255 );
first = 0;
}
else if ((c = getc (fpin)) == EOF )
else if ((c = getc (fpin)) == EOF )
goto read_error;
else
hdr[hdrlen++] = c;
if (c < 192)
{
pktlen = c;
@ -632,7 +632,7 @@ write_part (FILE *fpin, unsigned long pktlen,
else if (c < 224 )
{
pktlen = (c - 192) * 256;
if ((c = getc (fpin)) == EOF)
if ((c = getc (fpin)) == EOF)
goto read_error;
hdr[hdrlen++] = c;
pktlen += c + 192;
@ -656,9 +656,9 @@ write_part (FILE *fpin, unsigned long pktlen,
goto write_error;
}
partlen = 1 << (c & 0x1f);
for (; partlen; partlen--)
for (; partlen; partlen--)
{
if ((c = getc (fpin)) == EOF)
if ((c = getc (fpin)) == EOF)
goto read_error;
if ( putc (c, fpout) == EOF )
goto write_error;
@ -672,17 +672,17 @@ write_part (FILE *fpin, unsigned long pktlen,
goto read_error;
hdr[hdrlen++] = partlen >> 8;
hdr[hdrlen++] = partlen;
for (p=hdr; hdrlen; p++, hdrlen--)
for (p=hdr; hdrlen; p++, hdrlen--)
{
if ( putc (*p, fpout) == EOF )
goto write_error;
}
if (!partlen)
partial = 0; /* end of packet */
for (; partlen; partlen--)
for (; partlen; partlen--)
{
c = getc (fpin);
if (c == EOF)
if (c == EOF)
goto read_error;
if ( putc (c, fpout) == EOF )
goto write_error;
@ -693,7 +693,7 @@ write_part (FILE *fpin, unsigned long pktlen,
pktlen = 0;
partial = 0;
hdrlen = 0;
if (opt_uncompress)
if (opt_uncompress)
{
if ((c = getc (fpin)) == EOF)
goto read_error;
@ -718,7 +718,7 @@ write_part (FILE *fpin, unsigned long pktlen,
}
else
{
while ( (c=getc (fpin)) != EOF )
while ( (c=getc (fpin)) != EOF )
{
if ( putc (c, fpout) == EOF )
goto write_error;
@ -729,33 +729,33 @@ write_part (FILE *fpin, unsigned long pktlen,
}
}
for (p=hdr; hdrlen; p++, hdrlen--)
for (p=hdr; hdrlen; p++, hdrlen--)
{
if ( putc (*p, fpout) == EOF )
goto write_error;
}
/* standard packet or last segment of partial length encoded packet */
for (; pktlen; pktlen--)
for (; pktlen; pktlen--)
{
c = getc (fpin);
if (c == EOF)
if (c == EOF)
goto read_error;
if ( putc (c, fpout) == EOF )
goto write_error;
}
ready:
if ( !opt_no_split && fclose (fpout) )
log_error ("error closing '%s': %s\n", outname, strerror (errno));
return 0;
write_error:
write_error:
log_error ("error writing '%s': %s\n", outname, strerror (errno));
if (!opt_no_split)
fclose (fpout);
return 2;
read_error:
if (!opt_no_split)
{
@ -776,12 +776,12 @@ do_split (FILE *fp)
int partial = 0;
unsigned char header[20];
int header_idx = 0;
ctb = getc (fp);
if (ctb == EOF)
return 3; /* ready */
header[header_idx++] = ctb;
if (!(ctb & 0x80))
{
log_error("invalid CTB %02x\n", ctb );
@ -799,19 +799,19 @@ do_split (FILE *fp)
else if ( c < 224 )
{
pktlen = (c - 192) * 256;
if( (c = getc (fp)) == EOF )
if( (c = getc (fp)) == EOF )
return -1;
header[header_idx++] = c;
pktlen += c + 192;
}
else if ( c == 255 )
else if ( c == 255 )
{
if (read_u32 (fp, &pktlen))
return -1;
header[header_idx++] = pktlen >> 24;
header[header_idx++] = pktlen >> 16;
header[header_idx++] = pktlen >> 8;
header[header_idx++] = pktlen;
header[header_idx++] = pktlen;
}
else
{ /* partial body length */
@ -822,7 +822,7 @@ do_split (FILE *fp)
else
{
int lenbytes;
pkttype = (ctb>>2)&0xf;
lenbytes = ((ctb&3)==3)? 0 : (1<<(ctb & 3));
if (!lenbytes )
@ -835,13 +835,13 @@ do_split (FILE *fp)
}
else
{
for ( ; lenbytes; lenbytes-- )
for ( ; lenbytes; lenbytes-- )
{
pktlen <<= 8;
if( (c = getc (fp)) == EOF )
if( (c = getc (fp)) == EOF )
return -1;
header[header_idx++] = c;
pktlen |= c;
}
}
@ -856,18 +856,18 @@ split_packets (const char *fname)
{
FILE *fp;
int rc;
if (!fname || !strcmp (fname, "-"))
{
fp = stdin;
fname = "-";
}
else if ( !(fp = fopen (fname,"rb")) )
else if ( !(fp = fopen (fname,"rb")) )
{
log_error ("can't open '%s': %s\n", fname, strerror (errno));
return;
}
while ( !(rc = do_split (fp)) )
;
if ( rc > 0 )
@ -876,7 +876,7 @@ split_packets (const char *fname)
log_error ("error reading '%s': %s\n", fname, strerror (errno));
else
log_error ("premature EOF while reading '%s'\n", fname );
if ( fp != stdin )
fclose (fp);
}

View File

@ -51,7 +51,7 @@ extract_regular (estream_t stream, const char *dirname,
}
else
err = 0;
outfp = es_fopen (fname, "wb");
if (!outfp)
{
@ -98,7 +98,7 @@ extract_directory (const char *dirname, tar_header_t hdr)
gpg_error_t err;
char *fname;
size_t prefixlen;
prefixlen = strlen (dirname) + 1;
fname = strconcat (dirname, "/", hdr->name, NULL);
if (!fname)
@ -124,7 +124,7 @@ extract_directory (const char *dirname, tar_header_t hdr)
original error code in case of a failure. */
char *p;
int rc = 0;
for (p = fname+prefixlen; (p = strchr (p, '/')); p++)
{
*p = 0;
@ -166,8 +166,8 @@ extract (estream_t stream, const char *dirname, tar_header_t hdr)
#endif /*HAVE_DOSISH_SYSTEM*/
if (!n
|| strstr (hdr->name, "//")
|| strstr (hdr->name, "/../")
|| strstr (hdr->name, "//")
|| strstr (hdr->name, "/../")
|| !strncmp (hdr->name, "../", 3)
|| (n >= 3 && !strcmp (hdr->name+n-3, "/.." )))
{
@ -208,7 +208,7 @@ create_directory (const char *dirprefix)
/* Remove common suffixes. */
n = strlen (dirprefix);
if (n > 4 && (!compare_filenames (dirprefix + n - 4, EXTSEP_S "gpg")
if (n > 4 && (!compare_filenames (dirprefix + n - 4, EXTSEP_S GPGEXT_GPG)
|| !compare_filenames (dirprefix + n - 4, EXTSEP_S "pgp")
|| !compare_filenames (dirprefix + n - 4, EXTSEP_S "asc")
|| !compare_filenames (dirprefix + n - 4, EXTSEP_S "pem")
@ -283,7 +283,7 @@ gpgtar_extract (const char *filename)
}
}
else
stream = es_stdin;
stream = es_stdin;
if (stream == es_stdin)
es_set_binary (es_stdin);
@ -323,7 +323,7 @@ gpgtar_extract (const char *filename)
header = gpgtar_read_header (stream);
if (!header)
goto leave;
if (extract (stream, dirname, header))
goto leave;
xfree (header);

View File

@ -115,7 +115,7 @@ my_strusage( int level )
switch (level)
{
case 11: p = "gpgtar (GnuPG)";
case 11: p = "@GPGTAR@ (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;

View File

@ -200,7 +200,7 @@ my_strusage (int level)
switch (level)
{
case 11: p = "symcryptrun (GnuPG)";
case 11: p = "symcryptrun (@GNUPG@)";
break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@ -1010,7 +1010,7 @@ main (int argc, char **argv)
/* Tell simple-pwquery about the the standard socket name. */
{
char *tmp = make_filename (opt.homedir, "S.gpg-agent", NULL);
char *tmp = make_filename (opt.homedir, GPG_AGENT_SOCK_NAME, NULL);
simple_pw_set_socket (tmp);
xfree (tmp);
}

View File

@ -39,7 +39,7 @@
/* Allow for a standalone build on most systems. */
#ifdef VERSION
#define MYVERSION_LINE PGM " (GnuPG) " VERSION
#define MYVERSION_LINE PGM " ("GNUPG_NAME") " VERSION
#define BUGREPORT_LINE "\nReport bugs to <bug-gnupg@gnu.org>.\n"
#else
#define MYVERSION_LINE PGM " (standalone build) " __DATE__