Changeset View
Changeset View
Standalone View
Standalone View
b/g10/migrate.c
Context not available. | |||||
#include "keydb.h" | #include "keydb.h" | ||||
#include "util.h" | #include "util.h" | ||||
#include "main.h" | #include "main.h" | ||||
#include "call-agent.h" | |||||
#ifdef HAVE_DOSISH_SYSTEM | #ifdef HAVE_DOSISH_SYSTEM | ||||
Context not available. | |||||
dotlock_t lockhd = NULL; | dotlock_t lockhd = NULL; | ||||
char *secring = NULL; | char *secring = NULL; | ||||
char *flagfile = NULL; | char *flagfile = NULL; | ||||
char *agent_version = NULL; | |||||
secring = make_filename (opt.homedir, "secring" EXTSEP_S "gpg", NULL); | secring = make_filename (opt.homedir, "secring" EXTSEP_S "gpg", NULL); | ||||
if (access (secring, F_OK)) | if (access (secring, F_OK)) | ||||
Context not available. | |||||
goto leave; | goto leave; | ||||
} | } | ||||
if (!agent_get_version (ctrl, &agent_version)) | |||||
{ | |||||
if (!gnupg_compare_version (agent_version, "2.1.0")) | |||||
{ | |||||
log_error ("error: GnuPG agent version \"%s\" is too old. ", | |||||
agent_version); | |||||
log_error ("Please start an updated GnuPG agent.\n"); | |||||
log_error ("migration aborted\n"); | |||||
xfree (agent_version); | |||||
goto leave; | |||||
} | |||||
xfree (agent_version); | |||||
} | |||||
else | |||||
{ | |||||
log_error ("error: GnuPG agent unusable. " | |||||
"Please check that a GnuPG agent can be started.\n"); | |||||
log_error ("migration aborted\n"); | |||||
goto leave; | |||||
} | |||||
log_info ("porting secret keys from '%s' to gpg-agent\n", secring); | log_info ("porting secret keys from '%s' to gpg-agent\n", secring); | ||||
if (!import_old_secring (ctrl, secring)) | if (!import_old_secring (ctrl, secring)) | ||||
{ | { | ||||
Context not available. |