diff --git a/.gitignore b/.gitignore index 5761abc..7f54c9c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ *.o +Makefile +Makefile.dep +config.h +config.status +cpm diff --git a/configuration.c b/configuration.c index ab46700..dcdaa30 100644 --- a/configuration.c +++ b/configuration.c @@ -33,6 +33,8 @@ #include "listhandler.h" #include "memory.h" +cpmconfig_t* config; +cpmruntime_t* runtime; /* ############################################################################# * diff --git a/configuration.h b/configuration.h index b539e30..e48b65a 100644 --- a/configuration.h +++ b/configuration.h @@ -101,8 +101,8 @@ typedef struct /* ############################################################################# * global variables */ -cpmconfig_t* config; -cpmruntime_t* runtime; +extern cpmconfig_t* config; +extern cpmruntime_t* runtime; #define CRACKLIB_OFF 0 #define CRACKLIB_ON 1 diff --git a/gpg.c b/gpg.c index a80a7c9..1edac81 100644 --- a/gpg.c +++ b/gpg.c @@ -763,7 +763,7 @@ int gpgEncrypt(char* buffer, int size, char** newbuffer, int* newsize, if (fpr) { error = gpgme_get_key(context, fpr, &tkey, LIST_SECRET); - if (tkey -> secret); + if (tkey -> secret) { error = gpgme_signers_add(context, tkey); signers++; @@ -1268,8 +1268,7 @@ char* gpgValidateEncryptionKey(char* keyname) strlen(tname) + 1 + strlen(key -> uids -> email) + 2 + 1; identifier = memAlloc(__FILE__, __LINE__, size); - snprintf(identifier, size, "%s %s <%s>", - key -> subkeys -> keyid, + snprintf(identifier, size, "%s <%s>", tname, key -> uids -> email); }