From cvs at cvs.gnupg.org Mon Oct 1 09:20:19 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 01 Oct 2018 09:20:19 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-66-gc7a4f87 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via c7a4f879bd392aac2f471358a2af4b8d3105c76b (commit) from 68191e53049bf88aab4dbbab5427b5d0c90ead05 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c7a4f879bd392aac2f471358a2af4b8d3105c76b Author: Andre Heinecke Date: Mon Oct 1 09:17:53 2018 +0200 Add specific option for auto-key-retrieve * src/common_inde.p (opt): Add it. * src/main.c (read_options): Read it. * src/parsecontroller.common_inde (ParseController::parse): Use it. -- This is a new default off option. With the delays coming from many SKS-Keyservers we can't use it in good consicence yet it is just too slow if communicating with people that have not published their keys. diff --git a/src/common_indep.h b/src/common_indep.h index 8df77aa..cfe5e28 100644 --- a/src/common_indep.h +++ b/src/common_indep.h @@ -202,6 +202,7 @@ struct int sync_enc; /* Disabed async encryption */ int prefer_smime; /* S/MIME prefered when autoresolving */ int smime_html_warn_shown; /* Flag to save if unsigned smime warning was shown */ + int autoretrieve; /* Use --auto-key-retrieve. */ /* The forms revision number of the binary. */ int forms_revision; diff --git a/src/main.c b/src/main.c index 30f22f7..e773cb6 100644 --- a/src/main.c +++ b/src/main.c @@ -317,6 +317,7 @@ read_options (void) opt.reply_crypt = get_conf_bool ("replyCrypt", 1); opt.prefer_smime = get_conf_bool ("preferSmime", 0); opt.autoresolve = get_conf_bool ("autoresolve", 1); + opt.autoretrieve = get_conf_bool ("autoretrieve", 0); opt.automation = get_conf_bool ("automation", 1); opt.autosecure = get_conf_bool ("autosecure", 1); opt.autotrust = get_conf_bool ("autotrust", 0); @@ -329,6 +330,7 @@ read_options (void) opt.autosecure = 0; opt.autoresolve = 0; opt.autotrust = 0; + opt.autoretrieve = 0; } /* Hidden options */ diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp index 1275020..b6428bc 100644 --- a/src/parsecontroller.cpp +++ b/src/parsecontroller.cpp @@ -341,7 +341,7 @@ ParseController::parse() } /* Maybe a different option for this ? */ - if (opt.autoresolve) + if (opt.autoretrieve) { ctx->setFlag("auto-key-retrieve", "1"); } ----------------------------------------------------------------------- Summary of changes: src/common_indep.h | 1 + src/main.c | 2 ++ src/parsecontroller.cpp | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 1 10:58:47 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 01 Oct 2018 10:58:47 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-67-g9bb552a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 9bb552a9ede0c4a089961bcdf81d200145e731f1 (commit) from c7a4f879bd392aac2f471358a2af4b8d3105c76b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9bb552a9ede0c4a089961bcdf81d200145e731f1 Author: Andre Heinecke Date: Mon Oct 1 10:58:28 2018 +0200 Add tracing in keycache * src/keycache.cpp: Add tracing. diff --git a/src/keycache.cpp b/src/keycache.cpp index 268accf..26a72ce 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -65,6 +65,7 @@ namespace m_mbox (mbox), m_mail (mail) { + TSTART; s_thread_cnt++; Mail::lockDelete (); if (Mail::isValidPtr (m_mail)) @@ -72,10 +73,12 @@ namespace m_mail->incrementLocateCount (); } Mail::unlockDelete (); + TRETURN; }; ~LocateArgs() { + TSTART; s_thread_cnt--; Mail::lockDelete (); if (Mail::isValidPtr (m_mail)) @@ -83,6 +86,7 @@ namespace m_mail->decrementLocateCount (); } Mail::unlockDelete (); + TRETURN; } std::string m_mbox; @@ -97,6 +101,7 @@ typedef std::pair, std::string> import_arg_t; static DWORD WINAPI do_update (LPVOID arg) { + TSTART; auto args = std::unique_ptr ((update_arg_t*) arg); log_debug ("%s:%s updating: \"%s\" with protocol %s", @@ -111,7 +116,7 @@ do_update (LPVOID arg) TRACEPOINT; KeyCache::instance ()->onUpdateJobDone (args->first.c_str(), GpgME::Key ()); - return 0; + TRETURN 0; } ctx->setKeyListMode (GpgME::KeyListMode::Local | @@ -137,12 +142,13 @@ do_update (LPVOID arg) newKey); log_debug ("%s:%s Update job done", SRCNAME, __func__); - return 0; + TRETURN 0; } static DWORD WINAPI do_import (LPVOID arg) { + TSTART; auto args = std::unique_ptr ((import_arg_t*) arg); const std::string mbox = args->first->m_mbox; @@ -156,7 +162,7 @@ do_import (LPVOID arg) if (!ctx) { TRACEPOINT; - return 0; + TRETURN 0; } // We want to avoid unneccessary copies. The c_str will be valid // until args goes out of scope. @@ -167,7 +173,7 @@ do_import (LPVOID arg) { log_debug ("%s:%s Data for: %s is not a PGP Key", SRCNAME, __func__, anonstr (mbox.c_str ())); - return 0; + TRETURN 0; } data.rewind (); @@ -206,7 +212,7 @@ do_import (LPVOID arg) log_debug ("%s:%s Import job done for: %s", SRCNAME, __func__, anonstr (mbox.c_str ())); - return 0; + TRETURN 0; } @@ -220,6 +226,7 @@ public: void setPgpKey(const std::string &mbox, const GpgME::Key &key) { + TSTART; gpgrt_lock_lock (&keycache_lock); auto it = m_pgp_key_map.find (mbox); @@ -233,10 +240,12 @@ public: } insertOrUpdateInFprMap (key); gpgrt_lock_unlock (&keycache_lock); + TRETURN; } void setSmimeKey(const std::string &mbox, const GpgME::Key &key) { + TSTART; gpgrt_lock_lock (&keycache_lock); auto it = m_smime_key_map.find (mbox); @@ -250,10 +259,12 @@ public: } insertOrUpdateInFprMap (key); gpgrt_lock_unlock (&keycache_lock); + TRETURN; } void setPgpKeySecret(const std::string &mbox, const GpgME::Key &key) { + TSTART; gpgrt_lock_lock (&keycache_lock); auto it = m_pgp_skey_map.find (mbox); @@ -267,10 +278,12 @@ public: } insertOrUpdateInFprMap (key); gpgrt_lock_unlock (&keycache_lock); + TRETURN; } void setSmimeKeySecret(const std::string &mbox, const GpgME::Key &key) { + TSTART; gpgrt_lock_lock (&keycache_lock); auto it = m_smime_skey_map.find (mbox); @@ -284,15 +297,17 @@ public: } insertOrUpdateInFprMap (key); gpgrt_lock_unlock (&keycache_lock); + TRETURN; } std::vector getPGPOverrides (const char *addr) { + TSTART; std::vector ret; if (!addr) { - return ret; + TRETURN ret; } auto mbox = GpgME::UserID::addrSpecFromString (addr); @@ -301,7 +316,7 @@ public: if (it == m_addr_book_overrides.end ()) { gpgrt_lock_unlock (&keycache_lock); - return ret; + TRETURN ret; } for (const auto fpr: it->second) { @@ -316,14 +331,15 @@ public: } gpgrt_lock_unlock (&keycache_lock); - return ret; + TRETURN ret; } GpgME::Key getKey (const char *addr, GpgME::Protocol proto) { + TSTART; if (!addr) { - return GpgME::Key(); + TRETURN GpgME::Key(); } auto mbox = GpgME::UserID::addrSpecFromString (addr); @@ -335,12 +351,12 @@ public: if (it == m_pgp_key_map.end ()) { gpgrt_lock_unlock (&keycache_lock); - return GpgME::Key(); + TRETURN GpgME::Key(); } const auto ret = it->second; gpgrt_lock_unlock (&keycache_lock); - return ret; + TRETURN ret; } gpgrt_lock_lock (&keycache_lock); const auto it = m_smime_key_map.find (mbox); @@ -348,19 +364,20 @@ public: if (it == m_smime_key_map.end ()) { gpgrt_lock_unlock (&keycache_lock); - return GpgME::Key(); + TRETURN GpgME::Key(); } const auto ret = it->second; gpgrt_lock_unlock (&keycache_lock); - return ret; + TRETURN ret; } GpgME::Key getSKey (const char *addr, GpgME::Protocol proto) { + TSTART; if (!addr) { - return GpgME::Key(); + TRETURN GpgME::Key(); } auto mbox = GpgME::UserID::addrSpecFromString (addr); @@ -372,12 +389,12 @@ public: if (it == m_pgp_skey_map.end ()) { gpgrt_lock_unlock (&keycache_lock); - return GpgME::Key(); + TRETURN GpgME::Key(); } const auto ret = it->second; gpgrt_lock_unlock (&keycache_lock); - return ret; + TRETURN ret; } gpgrt_lock_lock (&keycache_lock); const auto it = m_smime_skey_map.find (mbox); @@ -385,53 +402,55 @@ public: if (it == m_smime_skey_map.end ()) { gpgrt_lock_unlock (&keycache_lock); - return GpgME::Key(); + TRETURN GpgME::Key(); } const auto ret = it->second; gpgrt_lock_unlock (&keycache_lock); - return ret; + TRETURN ret; } GpgME::Key getSigningKey (const char *addr, GpgME::Protocol proto) { + TSTART; const auto key = getSKey (addr, proto); if (key.isNull()) { log_debug ("%s:%s: secret key for %s is null", SRCNAME, __func__, anonstr (addr)); - return key; + TRETURN key; } if (!key.canReallySign()) { log_debug ("%s:%s: Discarding key for %s because it can't sign", SRCNAME, __func__, anonstr (addr)); - return GpgME::Key(); + TRETURN GpgME::Key(); } if (!key.hasSecret()) { log_debug ("%s:%s: Discarding key for %s because it has no secret", SRCNAME, __func__, anonstr (addr)); - return GpgME::Key(); + TRETURN GpgME::Key(); } if (in_de_vs_mode () && !key.isDeVs()) { log_debug ("%s:%s: signing key for %s is not deVS", SRCNAME, __func__, anonstr (addr)); - return GpgME::Key(); + TRETURN GpgME::Key(); } - return key; + TRETURN key; } std::vector getEncryptionKeys (const std::vector &recipients, GpgME::Protocol proto) { + TSTART; std::vector ret; if (recipients.empty ()) { TRACEPOINT; - return ret; + TRETURN ret; } for (const auto &recip: recipients) { @@ -452,7 +471,7 @@ public: { log_debug ("%s:%s: No key for %s. no internal encryption", SRCNAME, __func__, anonstr (recip.c_str ())); - return std::vector(); + TRETURN std::vector(); } if (!key.canEncrypt() || key.isRevoked() || @@ -460,14 +479,14 @@ public: { log_data ("%s:%s: Invalid key for %s. no internal encryption", SRCNAME, __func__, anonstr (recip.c_str ())); - return std::vector(); + TRETURN std::vector(); } if (in_de_vs_mode () && !key.isDeVs ()) { log_data ("%s:%s: key for %s is not deVS", SRCNAME, __func__, anonstr (recip.c_str ())); - return std::vector(); + TRETURN std::vector(); } bool validEnough = false; @@ -491,20 +510,21 @@ public: { log_debug ("%s:%s: UID for %s does not have at least marginal trust", SRCNAME, __func__, anonstr (recip.c_str ())); - return std::vector(); + TRETURN std::vector(); } // Accepting key ret.push_back (key); } - return ret; + TRETURN ret; } void insertOrUpdateInFprMap (const GpgME::Key &key) { + TSTART; if (key.isNull() || !key.primaryFingerprint()) { TRACEPOINT; - return; + TRETURN; } gpgrt_lock_lock (&fpr_map_lock); @@ -533,7 +553,7 @@ public: m_fpr_map.insert (std::make_pair (primaryFpr, key)); gpgrt_lock_unlock (&fpr_map_lock); - return; + TRETURN; } if (it->second.hasSecret () && !key.hasSecret()) @@ -549,15 +569,16 @@ public: it->second = key; } gpgrt_lock_unlock (&fpr_map_lock); - return; + TRETURN; } GpgME::Key getFromMap (const char *fpr) const { + TSTART; if (!fpr) { TRACEPOINT; - return GpgME::Key(); + TRETURN GpgME::Key(); } gpgrt_lock_lock (&fpr_map_lock); @@ -580,18 +601,19 @@ public: { const auto ret = keyIt->second; gpgrt_lock_unlock (&fpr_map_lock); - return ret; + TRETURN ret; } gpgrt_lock_unlock (&fpr_map_lock); - return GpgME::Key(); + TRETURN GpgME::Key(); } GpgME::Key getByFpr (const char *fpr, bool block) const { + TSTART; if (!fpr) { TRACEPOINT; - return GpgME::Key (); + TRETURN GpgME::Key (); } TRACEPOINT; @@ -639,24 +661,25 @@ public: { log_debug ("%s:%s Cache hit after wait for %s.", SRCNAME, __func__, anonstr (fpr)); - return ret2; + TRETURN ret2; } } log_debug ("%s:%s Cache miss for %s.", SRCNAME, __func__, anonstr (fpr)); - return GpgME::Key(); + TRETURN GpgME::Key(); } log_debug ("%s:%s Cache hit for %s.", SRCNAME, __func__, anonstr (fpr)); - return ret; + TRETURN ret; } void update (const char *fpr, GpgME::Protocol proto) { + TSTART; if (!fpr) { - return; + TRETURN; } const std::string sFpr (fpr); gpgrt_lock_lock (&update_lock); @@ -675,13 +698,15 @@ public: CloseHandle (CreateThread (NULL, 0, do_update, (LPVOID) args, 0, NULL)); + TRETURN; } void onUpdateJobDone (const char *fpr, const GpgME::Key &key) { + TSTART; if (!fpr) { - return; + TRETURN; } TRACEPOINT; insertOrUpdateInFprMap (key); @@ -693,21 +718,22 @@ public: log_error ("%s:%s Update for \"%s\" already finished.", SRCNAME, __func__, anonstr (fpr)); gpgrt_lock_unlock (&update_lock); - return; + TRETURN; } m_update_jobs.erase (it); gpgrt_lock_unlock (&update_lock); TRACEPOINT; - return; + TRETURN; } void importFromAddrBook (const std::string &mbox, const char *data, Mail *mail) { + TSTART; if (!data || mbox.empty() || !mail) { TRACEPOINT; - return; + TRETURN; } gpgrt_lock_lock (&import_lock); if (m_import_jobs.find (mbox) != m_import_jobs.end ()) @@ -726,11 +752,13 @@ public: (LPVOID) args, 0, NULL)); + TRETURN; } void onAddrBookImportJobDone (const std::string &mbox, const std::vector &result_fprs) { + TSTART; gpgrt_lock_lock (&keycache_lock); auto it = m_addr_book_overrides.find (mbox); if (it != m_addr_book_overrides.end ()) @@ -751,11 +779,11 @@ public: log_error ("%s:%s import for \"%s\" already finished.", SRCNAME, __func__, anonstr (mbox.c_str ())); gpgrt_lock_unlock (&import_lock); - return; + TRETURN; } m_import_jobs.erase (job_it); gpgrt_lock_unlock (&import_lock); - return; + TRETURN; } std::unordered_map m_pgp_key_map; @@ -800,9 +828,10 @@ KeyCache::getEncryptionKeys (const std::vector &recipients, GpgME:: static DWORD WINAPI do_locate (LPVOID arg) { + TSTART; if (!arg) { - return 0; + TRETURN 0; } auto args = std::unique_ptr ((LocateArgs *) arg); @@ -829,7 +858,7 @@ do_locate (LPVOID arg) if (!ctx) { TRACEPOINT; - return 0; + TRETURN 0; } // We need to validate here to fetch CRL's ctx->setKeyListMode (GpgME::KeyListMode::Local | @@ -839,7 +868,7 @@ do_locate (LPVOID arg) if (e) { TRACEPOINT; - return 0; + TRETURN 0; } std::vector keys; @@ -878,23 +907,24 @@ do_locate (LPVOID arg) } log_debug ("%s:%s locator thread done", SRCNAME, __func__); - return 0; + TRETURN 0; } static void locate_secret (const char *addr, GpgME::Protocol proto) { + TSTART; auto ctx = std::unique_ptr ( GpgME::Context::createForProtocol (proto)); if (!ctx) { TRACEPOINT; - return; + TRETURN; } if (!addr) { TRACEPOINT; - return; + TRETURN; } const auto mbox = GpgME::UserID::addrSpecFromString (addr); @@ -902,7 +932,7 @@ locate_secret (const char *addr, GpgME::Protocol proto) { log_debug ("%s:%s: Empty mbox for addr %s", SRCNAME, __func__, anonstr (addr)); - return; + TRETURN; } // We need to validate here to fetch CRL's @@ -912,7 +942,7 @@ locate_secret (const char *addr, GpgME::Protocol proto) if (e) { TRACEPOINT; - return; + TRETURN; } std::vector keys; @@ -942,7 +972,7 @@ locate_secret (const char *addr, GpgME::Protocol proto) SRCNAME, __func__, anonstr (mbox.c_str()), anonstr (key.primaryFingerprint())); KeyCache::instance()->setPgpKeySecret (mbox, key); - return; + TRETURN; } if (proto == GpgME::CMS) { @@ -950,15 +980,16 @@ locate_secret (const char *addr, GpgME::Protocol proto) SRCNAME, __func__, anonstr (mbox.c_str ()), anonstr (key.primaryFingerprint())); KeyCache::instance()->setSmimeKeySecret (mbox, key); - return; + TRETURN; } } while (!err); - return; + TRETURN; } static DWORD WINAPI do_locate_secret (LPVOID arg) { + TSTART; auto args = std::unique_ptr ((LocateArgs *) arg); log_debug ("%s:%s searching secret key for addr: \"%s\"", @@ -971,7 +1002,7 @@ do_locate_secret (LPVOID arg) } log_debug ("%s:%s locator sthread thread done", SRCNAME, __func__); - return 0; + TRETURN 0; } void @@ -986,15 +1017,16 @@ KeyCache::startLocate (const std::vector &addrs, Mail *mail) const void KeyCache::startLocate (const char *addr, Mail *mail) const { + TSTART; if (!addr) { TRACEPOINT; - return; + TRETURN; } std::string recp = GpgME::UserID::addrSpecFromString (addr); if (recp.empty ()) { - return; + TRETURN; } gpgrt_lock_lock (&keycache_lock); if (d->m_pgp_key_map.find (recp) == d->m_pgp_key_map.end ()) @@ -1011,20 +1043,22 @@ KeyCache::startLocate (const char *addr, Mail *mail) const CloseHandle (thread); } gpgrt_lock_unlock (&keycache_lock); + TRETURN; } void KeyCache::startLocateSecret (const char *addr, Mail *mail) const { + TSTART; if (!addr) { TRACEPOINT; - return; + TRETURN; } std::string recp = GpgME::UserID::addrSpecFromString (addr); if (recp.empty ()) { - return; + TRETURN; } gpgrt_lock_lock (&keycache_lock); if (d->m_pgp_skey_map.find (recp) == d->m_pgp_skey_map.end ()) @@ -1042,6 +1076,7 @@ KeyCache::startLocateSecret (const char *addr, Mail *mail) const CloseHandle (thread); } gpgrt_lock_unlock (&keycache_lock); + TRETURN; } @@ -1072,6 +1107,7 @@ KeyCache::setPgpKeySecret(const std::string &mbox, const GpgME::Key &key) bool KeyCache::isMailResolvable(Mail *mail) { + TSTART; /* Get the data from the mail. */ const auto sender = mail->getSender (); auto recps = mail->getCachedRecipients (); @@ -1080,7 +1116,7 @@ KeyCache::isMailResolvable(Mail *mail) { log_debug ("%s:%s: Mail has no sender or no recipients.", SRCNAME, __func__); - return false; + TRETURN false; } @@ -1089,12 +1125,12 @@ KeyCache::isMailResolvable(Mail *mail) if (!encKeys.empty()) { - return true; + TRETURN true; } if (!opt.enable_smime) { - return false; + TRETURN false; } /* Check S/MIME instead here we need to include the sender @@ -1103,7 +1139,7 @@ KeyCache::isMailResolvable(Mail *mail) GpgME::Key sigKey= getSigningKey (sender.c_str(), GpgME::CMS); encKeys = getEncryptionKeys (recps, GpgME::CMS); - return !encKeys.empty() && !sigKey.isNull(); + TRETURN !encKeys.empty() && !sigKey.isNull(); } void ----------------------------------------------------------------------- Summary of changes: src/keycache.cpp | 168 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 102 insertions(+), 66 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 2 07:30:27 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 02 Oct 2018 07:30:27 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-217-g50b02db Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 50b02dba2060a8969da47b18d9c0ecdccbd30db4 (commit) from 0cb65564e022fface5ada4de8e0c2c4c3d0ac8ad (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 50b02dba2060a8969da47b18d9c0ecdccbd30db4 Author: NIIBE Yutaka Date: Tue Oct 2 14:22:24 2018 +0900 common: Fix gnupg_reopen_std. * common/sysutils.c (gnupg_reopen_std): Use fcntl instead of fstat. -- When gpg was invoked by a Perl web application on FreeBSD, fstat in gnupg_reopen_std failed with EBADF. Using fcntl, which is considered lighter than fstat, it works fine. Since uur purpose is to check if file descriptor is valid or not, lighter operation is better. Reported-by: Marcin Gryszkalis Signed-off-by: NIIBE Yutaka diff --git a/common/sysutils.c b/common/sysutils.c index 55a7ee9..0a3dc2e 100644 --- a/common/sysutils.c +++ b/common/sysutils.c @@ -551,14 +551,13 @@ gnupg_tmpfile (void) void gnupg_reopen_std (const char *pgmname) { -#if defined(HAVE_STAT) && !defined(HAVE_W32_SYSTEM) - struct stat statbuf; +#ifdef F_GETFD int did_stdin = 0; int did_stdout = 0; int did_stderr = 0; FILE *complain; - if (fstat (STDIN_FILENO, &statbuf) == -1 && errno ==EBADF) + if (fcntl (STDIN_FILENO, F_GETFD) == -1 && errno ==EBADF) { if (open ("/dev/null",O_RDONLY) == STDIN_FILENO) did_stdin = 1; @@ -566,7 +565,7 @@ gnupg_reopen_std (const char *pgmname) did_stdin = 2; } - if (fstat (STDOUT_FILENO, &statbuf) == -1 && errno == EBADF) + if (fcntl (STDOUT_FILENO, F_GETFD) == -1 && errno == EBADF) { if (open ("/dev/null",O_WRONLY) == STDOUT_FILENO) did_stdout = 1; @@ -574,7 +573,7 @@ gnupg_reopen_std (const char *pgmname) did_stdout = 2; } - if (fstat (STDERR_FILENO, &statbuf)==-1 && errno==EBADF) + if (fcntl (STDERR_FILENO, F_GETFD)==-1 && errno==EBADF) { if (open ("/dev/null", O_WRONLY) == STDERR_FILENO) did_stderr = 1; @@ -607,7 +606,7 @@ gnupg_reopen_std (const char *pgmname) if (did_stdin == 2 || did_stdout == 2 || did_stderr == 2) exit (3); -#else /* !(HAVE_STAT && !HAVE_W32_SYSTEM) */ +#else /* !F_GETFD */ (void)pgmname; #endif } ----------------------------------------------------------------------- Summary of changes: common/sysutils.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 2 07:32:59 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 02 Oct 2018 07:32:59 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-7-g8f844ae Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via 8f844ae1cd16e27ad07d45784b1f0ff2917da2b8 (commit) from f5be5c9654d879962176285d9d0353874255ce56 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8f844ae1cd16e27ad07d45784b1f0ff2917da2b8 Author: NIIBE Yutaka Date: Tue Oct 2 14:22:24 2018 +0900 common: Fix gnupg_reopen_std. * common/sysutils.c (gnupg_reopen_std): Use fcntl instead of fstat. -- Cherry-pick from master commit of: 50b02dba2060a8969da47b18d9c0ecdccbd30db4 When gpg was invoked by a Perl web application on FreeBSD, fstat in gnupg_reopen_std failed with EBADF. Using fcntl, which is considered lighter than fstat, it works fine. Since uur purpose is to check if file descriptor is valid or not, lighter operation is better. Reported-by: Marcin Gryszkalis Signed-off-by: NIIBE Yutaka diff --git a/common/sysutils.c b/common/sysutils.c index 55a7ee9..0a3dc2e 100644 --- a/common/sysutils.c +++ b/common/sysutils.c @@ -551,14 +551,13 @@ gnupg_tmpfile (void) void gnupg_reopen_std (const char *pgmname) { -#if defined(HAVE_STAT) && !defined(HAVE_W32_SYSTEM) - struct stat statbuf; +#ifdef F_GETFD int did_stdin = 0; int did_stdout = 0; int did_stderr = 0; FILE *complain; - if (fstat (STDIN_FILENO, &statbuf) == -1 && errno ==EBADF) + if (fcntl (STDIN_FILENO, F_GETFD) == -1 && errno ==EBADF) { if (open ("/dev/null",O_RDONLY) == STDIN_FILENO) did_stdin = 1; @@ -566,7 +565,7 @@ gnupg_reopen_std (const char *pgmname) did_stdin = 2; } - if (fstat (STDOUT_FILENO, &statbuf) == -1 && errno == EBADF) + if (fcntl (STDOUT_FILENO, F_GETFD) == -1 && errno == EBADF) { if (open ("/dev/null",O_WRONLY) == STDOUT_FILENO) did_stdout = 1; @@ -574,7 +573,7 @@ gnupg_reopen_std (const char *pgmname) did_stdout = 2; } - if (fstat (STDERR_FILENO, &statbuf)==-1 && errno==EBADF) + if (fcntl (STDERR_FILENO, F_GETFD)==-1 && errno==EBADF) { if (open ("/dev/null", O_WRONLY) == STDERR_FILENO) did_stderr = 1; @@ -607,7 +606,7 @@ gnupg_reopen_std (const char *pgmname) if (did_stdin == 2 || did_stdout == 2 || did_stderr == 2) exit (3); -#else /* !(HAVE_STAT && !HAVE_W32_SYSTEM) */ +#else /* !F_GETFD */ (void)pgmname; #endif } ----------------------------------------------------------------------- Summary of changes: common/sysutils.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 2 11:13:39 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 02 Oct 2018 11:13:39 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-218-g8e83493 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 8e83493dae426fe36a0e0081198b10db1e103ff1 (commit) from 50b02dba2060a8969da47b18d9c0ecdccbd30db4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8e83493dae426fe36a0e0081198b10db1e103ff1 Author: Werner Koch Date: Tue Oct 2 11:02:08 2018 +0200 gpg: New options import-drop-uids and export-drop-uids. * g10/options.h (IMPORT_DROP_UIDS): New. (EXPORT_DROP_UIDS): New. * g10/import.c (parse_import_options): Add option "import-drop-uids". (import_one): Don't bail out with that options and no uids found. Also remove all uids. (remove_all_uids): New. * g10/export.c (parse_export_options): Add option "export-drop-uids". (do_export_one_keyblock): Implement option. -- These options are required for experiments with changes to the keyserver infrastructure. Signed-off-by: Werner Koch diff --git a/doc/gpg.texi b/doc/gpg.texi index 7f55cc7..843e91c 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -2342,6 +2342,11 @@ opposite meaning. The options are: on the keyring. This option is the same as running the @option{--edit-key} command "clean" after import. Defaults to no. + @item import-drop-uids + Do not import any user ids or their binding signatures. This option + can be used to update only the subkeys or other non-user id related + information. + @item repair-keys. After import, fix various problems with the keys. For example, this reorders signatures, and strips duplicate signatures. Defaults to yes. @@ -2506,6 +2511,11 @@ opposite meaning. The options are: running the @option{--edit-key} command "minimize" before export except that the local copy of the key is not modified. Defaults to no. + @item export-drop-uids + Do no export any user id or attribute packets or their associates + signatures. Note that due to missing user ids the resulting output is + not strictly RFC-4880 compliant. + @item export-pka Instead of outputting the key material output PKA records suitable to put into DNS zone files. An ORIGIN line is printed before each diff --git a/g10/export.c b/g10/export.c index e94e959..b140e28 100644 --- a/g10/export.c +++ b/g10/export.c @@ -97,7 +97,7 @@ cleanup_export_globals (void) } -/* Option parser for export options. See parse_options fro +/* Option parser for export options. See parse_options for details. */ int parse_export_options(char *str,unsigned int *options,int noisy) @@ -114,6 +114,8 @@ parse_export_options(char *str,unsigned int *options,int noisy) N_("remove unusable parts from key during export")}, {"export-minimal",EXPORT_MINIMAL|EXPORT_CLEAN,NULL, N_("remove as much as possible from key during export")}, + {"export-drop-uids", EXPORT_DROP_UIDS, NULL, + N_("Do not export user id or attribute packets")}, {"export-pka", EXPORT_PKA_FORMAT, NULL, NULL }, {"export-dane", EXPORT_DANE_FORMAT, NULL, NULL }, @@ -136,14 +138,20 @@ parse_export_options(char *str,unsigned int *options,int noisy) int rc; rc = parse_options (str, options, export_opts, noisy); - if (rc && (*options & EXPORT_BACKUP)) + if (!rc) + return 0; + + /* Alter other options we want or don't want for restore. */ + if ((*options & EXPORT_BACKUP)) { - /* Alter other options we want or don't want for restore. */ *options |= (EXPORT_LOCAL_SIGS | EXPORT_ATTRIBUTES | EXPORT_SENSITIVE_REVKEYS); *options &= ~(EXPORT_CLEAN | EXPORT_MINIMAL | EXPORT_PKA_FORMAT | EXPORT_DANE_FORMAT); } + /* Dropping uids also means to drop attributes. */ + if ((*options & EXPORT_DROP_UIDS)) + *options &= ~(EXPORT_ATTRIBUTES); return rc; } @@ -1575,7 +1583,7 @@ do_export_one_keyblock (ctrl_t ctrl, kbnode_t keyblock, u32 *keyid, if (node->pkt->pkttype == PKT_COMMENT) continue; - /* Skip ring trust packets - they should not ne here anyway. */ + /* Skip ring trust packets - they should not be here anyway. */ if (node->pkt->pkttype == PKT_RING_TRUST) continue; @@ -1650,6 +1658,19 @@ do_export_one_keyblock (ctrl_t ctrl, kbnode_t keyblock, u32 *keyid, } } + /* Don't export user ids (and attributes)? This is not RFC-4880 + * compliant but we allow it anyway. */ + if ((options & EXPORT_DROP_UIDS) + && node->pkt->pkttype == PKT_USER_ID) + { + /* Skip until we get to something that is not a user id (or + * attrib) or a signature on it. */ + while (kbctx->next && kbctx->next->pkt->pkttype == PKT_SIGNATURE) + kbctx = kbctx->next; + + continue; + } + /* Don't export attribs? */ if (!(options & EXPORT_ATTRIBUTES) && node->pkt->pkttype == PKT_USER_ID diff --git a/g10/import.c b/g10/import.c index dbf6000..1f334dc 100644 --- a/g10/import.c +++ b/g10/import.c @@ -121,6 +121,7 @@ static int chk_self_sigs (ctrl_t ctrl, kbnode_t keyblock, u32 *keyid, static int delete_inv_parts (ctrl_t ctrl, kbnode_t keyblock, u32 *keyid, unsigned int options); static int any_uid_left (kbnode_t keyblock); +static int remove_all_uids (kbnode_t *keyblock); static int merge_blocks (ctrl_t ctrl, unsigned int options, kbnode_t keyblock_orig, kbnode_t keyblock, u32 *keyid, @@ -181,6 +182,9 @@ parse_import_options(char *str,unsigned int *options,int noisy) {"import-minimal",IMPORT_MINIMAL|IMPORT_CLEAN,NULL, N_("remove as much as possible from key after import")}, + {"import-drop-uids", IMPORT_DROP_UIDS, NULL, + N_("Do not import user id or attribute packets")}, + {"import-export", IMPORT_EXPORT, NULL, N_("run import filters and export key immediately")}, @@ -1728,7 +1732,9 @@ import_one (ctrl_t ctrl, } - if (!uidnode ) + /* Unless import-drop-uids has been requested we don't allow import + * of a key without UIDs. */ + if (!uidnode && !(options & IMPORT_DROP_UIDS)) { if (!silent) log_error( _("key %s: no user ID\n"), keystr_from_pk(pk)); @@ -1755,7 +1761,11 @@ import_one (ctrl_t ctrl, return 0; } - collapse_uids(&keyblock); + /* Remove or collapse the user ids. */ + if ((options & IMPORT_DROP_UIDS)) + remove_all_uids (&keyblock); + else + collapse_uids (&keyblock); /* Clean the key that we're about to import, to cut down on things that we have to clean later. This has no practical impact on the @@ -1802,7 +1812,10 @@ import_one (ctrl_t ctrl, } } - if (!delete_inv_parts (ctrl, keyblock, keyid, options ) ) + /* Delete invalid parts and without the drop otions bail out if + * there are no user ids. */ + if (!delete_inv_parts (ctrl, keyblock, keyid, options) + && !(options & IMPORT_DROP_UIDS) ) { if (!silent) { @@ -3417,14 +3430,51 @@ any_uid_left (kbnode_t keyblock) -/**************** +/* Delete all user ids from KEYBLOCK. + * Returns: True if the keyblock has changed. */ +static int +remove_all_uids (kbnode_t *keyblock) +{ + kbnode_t node; + int any = 0; + + for (node = *keyblock; node; node = node->next) + { + if (is_deleted_kbnode (node)) + continue; + + if (node->pkt->pkttype != PKT_USER_ID) + continue; + + /* We are at the first user id. Delete everything up to the + * first subkey. */ + for (; node; node = node->next) + { + if (is_deleted_kbnode (node)) + continue; + + if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY + || node->pkt->pkttype == PKT_SECRET_SUBKEY) + break; + delete_kbnode (node); + any = 1; + } + break; /* All done. */ + } + + commit_kbnode (keyblock); + return any; +} + + +/* * It may happen that the imported keyblock has duplicated user IDs. * We check this here and collapse those user IDs together with their * sigs into one. * Returns: True if the keyblock has changed. */ int -collapse_uids( kbnode_t *keyblock ) +collapse_uids (kbnode_t *keyblock) { kbnode_t uid1; int any=0; diff --git a/g10/misc.c b/g10/misc.c index d7a3ee3..89b21e2 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -1521,6 +1521,8 @@ optlen(const char *s) return strlen(s); } + +/* Note: This function returns true on success. */ int parse_options(char *str,unsigned int *options, struct parse_options *opts,int noisy) diff --git a/g10/options.h b/g10/options.h index 7defbda..faaf535 100644 --- a/g10/options.h +++ b/g10/options.h @@ -360,6 +360,7 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode; #define IMPORT_RESTORE (1<<10) #define IMPORT_REPAIR_KEYS (1<<11) #define IMPORT_DRY_RUN (1<<12) +#define IMPORT_DROP_UIDS (1<<13) #define EXPORT_LOCAL_SIGS (1<<0) #define EXPORT_ATTRIBUTES (1<<1) @@ -370,6 +371,7 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode; #define EXPORT_PKA_FORMAT (1<<6) #define EXPORT_DANE_FORMAT (1<<7) #define EXPORT_BACKUP (1<<10) +#define EXPORT_DROP_UIDS (1<<13) #define LIST_SHOW_PHOTOS (1<<0) #define LIST_SHOW_POLICY_URLS (1<<1) ----------------------------------------------------------------------- Summary of changes: doc/gpg.texi | 10 ++++++++++ g10/export.c | 29 +++++++++++++++++++++++++---- g10/import.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- g10/misc.c | 2 ++ g10/options.h | 2 ++ 5 files changed, 94 insertions(+), 9 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 2 11:28:05 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 02 Oct 2018 11:28:05 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-314-g7b86194 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 7b861945fdc71fd3c82c91f824172dadd2220fa0 (commit) from 76bdfabb057f4ffc56beee15b48d8fa836ba7cce (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7b861945fdc71fd3c82c91f824172dadd2220fa0 Author: Werner Koch Date: Tue Oct 2 11:18:00 2018 +0200 core: add experimental GPGME_EXPORT_MODE_NOUID. * src/gpgme.h.in (GPGME_EXPORT_MODE_NOUID): New. * src/export.c (export_start): Adjust option check. * src/engine-gpg.c (export_common): Implement option. Signed-off-by: Werner Koch diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 426ae7a..d99e9bb 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -4663,6 +4663,10 @@ If this flag is used with @code{GPGME_EXPORT_MODE_SECRET} for an X.509 key the export format will be changed to PKCS#12 which also includes the certificate. This flag may not be used with OpenPGP. + at item GPGME_EXPORT_MODE_NOUID + at since{1.12.0 - experimental} +Do not export user ids. Works only with certain gpg version. + @end table diff --git a/src/engine-gpg.c b/src/engine-gpg.c index be78957..9a5927c 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -2241,7 +2241,14 @@ export_common (engine_gpg_t gpg, gpgme_export_mode_t mode, return gpg_error (GPG_ERR_NOT_SUPPORTED); if ((mode & GPGME_EXPORT_MODE_MINIMAL)) - err = add_arg (gpg, "--export-options=export-minimal"); + { + if ((mode & GPGME_EXPORT_MODE_NOUID)) + err = add_arg (gpg, "--export-options=export-minimal,export-drop-uids"); + else + err = add_arg (gpg, "--export-options=export-minimal"); + } + else if ((mode & GPGME_EXPORT_MODE_NOUID)) + err = add_arg (gpg, "--export-options=export-drop-uids"); if (err) ; diff --git a/src/export.c b/src/export.c index cd94050..f460e85 100644 --- a/src/export.c +++ b/src/export.c @@ -123,6 +123,7 @@ export_start (gpgme_ctx_t ctx, int synchronous, const char *pattern, |GPGME_EXPORT_MODE_MINIMAL |GPGME_EXPORT_MODE_SECRET |GPGME_EXPORT_MODE_RAW + |GPGME_EXPORT_MODE_NOUID |GPGME_EXPORT_MODE_PKCS12))) return gpg_error (GPG_ERR_INV_VALUE); /* Invalid flags in MODE. */ diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 9c9ea5a..1731593 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -405,6 +405,7 @@ gpgme_pinentry_mode_t; #define GPGME_EXPORT_MODE_SECRET 16 #define GPGME_EXPORT_MODE_RAW 32 #define GPGME_EXPORT_MODE_PKCS12 64 +#define GPGME_EXPORT_MODE_NOUID 128 typedef unsigned int gpgme_export_mode_t; ----------------------------------------------------------------------- Summary of changes: doc/gpgme.texi | 4 ++++ src/engine-gpg.c | 9 ++++++++- src/export.c | 1 + src/gpgme.h.in | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 2 23:05:40 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Tue, 02 Oct 2018 23:05:40 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-315-g23894ac Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 23894ac9a96081428a590791010ca8beebaf6f9f (commit) from 7b861945fdc71fd3c82c91f824172dadd2220fa0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 23894ac9a96081428a590791010ca8beebaf6f9f Author: Ben McGinnes Date: Wed Oct 3 06:58:51 2018 +1000 python bindings: CPython order * Changed the order of python versions the configure/make process checks for, placing Python 3.7 ahead of 3.6. * Updated the HOWTO documentation to reflect this change. Tested-by: Ben McGinnes Signed-off-by: Ben McGinnes diff --git a/doc/gpgme-python-howto.texi b/doc/gpgme-python-howto.texi index 5f33f5d..c88c746 100644 --- a/doc/gpgme-python-howto.texi +++ b/doc/gpgme-python-howto.texi @@ -257,6 +257,9 @@ The release of Python 3.7.0; which appears to be working just fine with our bindings, in spite of intermittent reports of problems for many other Python projects with that new release. @item +Python 3.7 has been moved to the head of the specified python +versions list in the build process. + at item In order to fix some other issues, there are certain underlying functions which are more exposed through the @ref{Context, , gpg.Context()}, but ongoing documentation ought to clarify that or otherwise provide the @@ -521,9 +524,25 @@ For Python 2 it checks for these executables in this order: @samp{python}, @samp{python2} and @samp{python2.7}. For Python 3 it checks for these executables in this order: @samp{python3}, - at samp{python3.6}, @samp{python3.5}, @samp{python3.4} and @samp{python3.7}. at footnote{As Python 3.7 is a very recent release, it is not given -priority over 3.6 yet, but will probably be prioritised by the release -of Python 3.7.2.} + @samp{python3.7}, @samp{python3.6}, @samp{python3.5} and @samp{python3.4}. at footnote{With no issues reported specific to Python 3.7, the release of +Python 3.7.1 at around the same time as GPGME 1.12.0 and the testing +with Python 3.7.1rc1, there is no reason to delay moving 3.7 ahead of +3.6 now. Production environments with more conservative requirements +will always enforce their own policies anyway and installation to each +supported minor release is quite possible too.} + +On systems where @samp{python} is actually @samp{python3} and not @samp{python2} it +may be possible that @samp{python2} may be overlooked, but there have been +no reports of that actually occurring as yet. + +In the three months or so since the release of Python 3.7.0 there has +been extensive testing and work with these bindings with no issues +specifically relating to the new version of Python or any of the new +features of either the language or the bindings. This has also been +the case with Python 3.7.1rc1. With that in mind and given the +release of Python 3.7.1 is scheduled for around the same time as GPGME +1.12.0, the order of preferred Python versions has been changed to +move Python 3.7 ahead of Python 3.6. @menu * Installing GPGME:: @@ -1636,10 +1655,10 @@ else: pass @end example -It is important to note that the result will only return @samp{None} when a -pattern has been entered for @samp{logrus}, but it has not matched any -keys. When the search pattern itself is set to @samp{None} this triggers -the exporting of the entire public keybox. +It should be noted that the result will only return @samp{None} when a +search pattern has been entered, but has not matched any keys. When +the search pattern itself is set to @samp{None} this triggers the exporting +of the entire public keybox. @example import gpg diff --git a/lang/python/docs/gpgme-python-howto.org b/lang/python/docs/gpgme-python-howto.org index d3695c3..c7a1f82 100644 --- a/lang/python/docs/gpgme-python-howto.org +++ b/lang/python/docs/gpgme-python-howto.org @@ -98,6 +98,8 @@ The bullet points of new additiions are: - The release of Python 3.7.0; which appears to be working just fine with our bindings, in spite of intermittent reports of problems for many other Python projects with that new release. +- Python 3.7 has been moved to the head of the specified python + versions list in the build process. - In order to fix some other issues, there are certain underlying functions which are more exposed through the [[#howto-get-context][gpg.Context()]], but ongoing documentation ought to clarify that or otherwise provide the @@ -354,7 +356,20 @@ For Python 2 it checks for these executables in this order: =python=, =python2= and =python2.7=. For Python 3 it checks for these executables in this order: =python3=, -=python3.6=, =python3.5=, =python3.4= and =python3.7=.[fn:3] + =python3.7=, =python3.6=, =python3.5= and =python3.4=.[fn:3] + +On systems where =python= is actually =python3= and not =python2= it +may be possible that =python2= may be overlooked, but there have been +no reports of that actually occurring as yet. + +In the three months or so since the release of Python 3.7.0 there has +been extensive testing and work with these bindings with no issues +specifically relating to the new version of Python or any of the new +features of either the language or the bindings. This has also been +the case with Python 3.7.1rc1. With that in mind and given the +release of Python 3.7.1 is scheduled for around the same time as GPGME +1.12.0, the order of preferred Python versions has been changed to +move Python 3.7 ahead of Python 3.6. *** Installing GPGME @@ -1481,10 +1496,10 @@ else: pass #+END_SRC -It is important to note that the result will only return =None= when a -pattern has been entered for =logrus=, but it has not matched any -keys. When the search pattern itself is set to =None= this triggers -the exporting of the entire public keybox. +It should be noted that the result will only return =None= when a +search pattern has been entered, but has not matched any keys. When +the search pattern itself is set to =None= this triggers the exporting +of the entire public keybox. #+BEGIN_SRC python -i import gpg @@ -2986,9 +3001,12 @@ PURPOSE. [fn:2] The =lang/python/docs/= directory in the GPGME source. -[fn:3] As Python 3.7 is a very recent release, it is not given -priority over 3.6 yet, but will probably be prioritised by the release -of Python 3.7.2. +[fn:3] With no issues reported specific to Python 3.7, the release of +Python 3.7.1 at around the same time as GPGME 1.12.0 and the testing +with Python 3.7.1rc1, there is no reason to delay moving 3.7 ahead of +3.6 now. Production environments with more conservative requirements +will always enforce their own policies anyway and installation to each +supported minor release is quite possible too. [fn:4] Yes, even if you use virtualenv with everything you do in Python. If you want to install this module as just your user account diff --git a/m4/python.m4 b/m4/python.m4 index 56220ba..7097db2 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -40,8 +40,8 @@ AC_DEFUN([AM_PATH_PYTHON], m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python2 python2.7 dnl python dnl - python3 python3.6 python3.5 python3.4 python3.7 dnl - python3.8]) + python3 python3.7 python3.6 python3.5 python3.4 dnl python3.8 + ]) AC_ARG_VAR([PYTHON], [the Python interpreter]) ----------------------------------------------------------------------- Summary of changes: doc/gpgme-python-howto.texi | 33 +++++++++++++++++++++++++------- lang/python/docs/gpgme-python-howto.org | 34 +++++++++++++++++++++++++-------- m4/python.m4 | 4 ++-- 3 files changed, 54 insertions(+), 17 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 4 10:06:17 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 04 Oct 2018 10:06:17 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-219-g3c2ffd2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 3c2ffd27f36dfe77005aa01005145904761d8743 (commit) from 8e83493dae426fe36a0e0081198b10db1e103ff1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3c2ffd27f36dfe77005aa01005145904761d8743 Author: Werner Koch Date: Thu Oct 4 09:57:03 2018 +0200 gpg: Add new card vendor -- diff --git a/g10/card-util.c b/g10/card-util.c index b95efa8..111dfbf 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -216,6 +216,7 @@ get_manufacturer (unsigned int no) case 0x1337: return "Warsaw Hackerspace"; case 0x2342: return "warpzone"; /* hackerspace Muenster. */ + case 0x4354: return "Confidential Technologies"; /* cotech.de */ case 0x63AF: return "Trustica"; case 0xBD0E: return "Paranoidlabs"; case 0xF517: return "FSIJ"; ----------------------------------------------------------------------- Summary of changes: g10/card-util.c | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 4 10:14:57 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Thu, 04 Oct 2018 10:14:57 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-321-g582f14d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 582f14d97a900106dce0c8d8666a443c6ec25050 (commit) from a174b269432fd37e8546c43e0127580e826432da (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 582f14d97a900106dce0c8d8666a443c6ec25050 Author: Ben McGinnes Date: Thu Oct 4 18:11:01 2018 +1000 python: make file * lang/python/Makefile.am: Now that gpg2 has been renamed back to gpg and gpg1 is semi-deprecated, we should check what the actual gpg binary is with gpgconf and use that rather than make assumptions per system. * Also, it means less worry if gpg3 is ever a thing. (Trust me, I remember the Python 1 to 2 transition as well as the current 2 to 3 transition). ;) Signed-off-by: Ben McGinnes diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am index 391de82..9cdccb5 100644 --- a/lang/python/Makefile.am +++ b/lang/python/Makefile.am @@ -59,7 +59,8 @@ python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz.asc: copystamp top_builddir="$(top_builddir)" \ $(PYTHON) setup.py sdist --verbose --dist-dir=python$(PYTHON_VERSION)-gpg-dist \ --manifest=python$(PYTHON_VERSION)-gpg-dist/MANIFEST - gpg2 --detach-sign --armor python$(PYTHON_VERSION)-gpg-dist/gpg-$(VERSION).tar.gz + gpgbin=gpgconf --list-components | grep OpenPGP | sed -e 's/gpg:OpenPGP://g' + $(gpgbin) --detach-sign --armor python$(PYTHON_VERSION)-gpg-dist/gpg-$(VERSION).tar.gz .PHONY: sdist sdist: python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz.asc ----------------------------------------------------------------------- Summary of changes: lang/python/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 4 10:33:25 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Thu, 04 Oct 2018 10:33:25 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-322-g2cca422 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 2cca422ca4b2df831a824393077d0b52d79532aa (commit) from 582f14d97a900106dce0c8d8666a443c6ec25050 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2cca422ca4b2df831a824393077d0b52d79532aa Author: Ben McGinnes Date: Thu Oct 4 18:28:47 2018 +1000 python: make file * lang/python/Makefile.am: Attempting to remove the docs/meta directory did a lot worse than I thought it was doing, so better to just be sure the documentation is available than destroy the entire bindings directory. Tested-by: Ben McGinnes Signed-off-by: Ben McGinnes diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am index 9cdccb5..8645305 100644 --- a/lang/python/Makefile.am +++ b/lang/python/Makefile.am @@ -27,7 +27,6 @@ EXTRA_DIST = \ dist-hook: cp -pr "$(srcdir)/docs" "$(DESTDIR)/docs" - rm -rf `find "$(srcdir)/docs" -name meta` SUBDIRS = . tests ----------------------------------------------------------------------- Summary of changes: lang/python/Makefile.am | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 4 13:14:33 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Thu, 04 Oct 2018 13:14:33 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-323-gf3fc737 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via f3fc73738264d21baf0e9b49fdd5cb67faa11d31 (commit) from 2cca422ca4b2df831a824393077d0b52d79532aa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f3fc73738264d21baf0e9b49fdd5cb67faa11d31 Author: Ben McGinnes Date: Thu Oct 4 21:10:46 2018 +1000 python: makefiles * doc/Makefile.am: Removed a bit I forgot about. * Renamed lang/python/docs to lang/python/doc bvecause apparently automake cares about that too. * Decided to be extra explicit in the manifest because if I don't then all sorts of things get deleted ... like lang/python * Tested on an external linux system just in case my osx workstation introduces too much weirdness. Tested-by: Ben McGinnes Signed-off-by: Ben McGinnes diff --git a/doc/Makefile.am b/doc/Makefile.am index 5f161a9..db8a1a2 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -53,7 +53,7 @@ defs.inc: defsincdate Makefile mkdefsinc $(info_TEXINFOS) $(gpgme_TEXINFOS) >$@ -online: gpgme.html gpgme.pdf gpgme-python-howto.html gpgme-python-howto.pdf +online: gpgme.html gpgme.pdf set -e; \ echo "Uploading current manuals to www.gnupg.org ..."; \ user=werner ; \ diff --git a/lang/python/MANIFEST.in b/lang/python/MANIFEST.in index bd7462a..f4def41 100644 --- a/lang/python/MANIFEST.in +++ b/lang/python/MANIFEST.in @@ -1,7 +1,8 @@ -recursive-include docs *.org *.texi *.info *.rst -recursive-include docs src *.org -recursive-include docs rst *.rst -recursive-include docs texinfo *.texi *.infok +recursive-include doc *.org +recursive-include doc *.rst +recursive-include doc *.tex +recursive-include doc *.texi +recursive-include doc *.info recursive-include examples *.py *.pyx include README README.org include gpgme.i diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am index 8645305..6df17ce 100644 --- a/lang/python/Makefile.am +++ b/lang/python/Makefile.am @@ -22,12 +22,9 @@ EXTRA_DIST = \ gpgme.i \ helpers.c helpers.h private.h \ examples \ - docs \ + doc \ src -dist-hook: - cp -pr "$(srcdir)/docs" "$(DESTDIR)/docs" - SUBDIRS = . tests .PHONY: prepare diff --git a/lang/python/docs/README b/lang/python/doc/README similarity index 100% rename from lang/python/docs/README rename to lang/python/doc/README diff --git a/lang/python/docs/meta/TODO.org b/lang/python/doc/meta/TODO.org similarity index 100% rename from lang/python/docs/meta/TODO.org rename to lang/python/doc/meta/TODO.org diff --git a/lang/python/docs/meta/old-commits.log b/lang/python/doc/meta/old-commits.log similarity index 100% rename from lang/python/docs/meta/old-commits.log rename to lang/python/doc/meta/old-commits.log diff --git a/lang/python/docs/rst/gpgme-python-howto.rst b/lang/python/doc/rst/gpgme-python-howto.rst similarity index 100% rename from lang/python/docs/rst/gpgme-python-howto.rst rename to lang/python/doc/rst/gpgme-python-howto.rst diff --git a/lang/python/docs/rst/short-history.rst b/lang/python/doc/rst/short-history.rst similarity index 100% rename from lang/python/docs/rst/short-history.rst rename to lang/python/doc/rst/short-history.rst diff --git a/lang/python/docs/src/gpgme-python-howto.org b/lang/python/doc/src/gpgme-python-howto.org similarity index 100% rename from lang/python/docs/src/gpgme-python-howto.org rename to lang/python/doc/src/gpgme-python-howto.org diff --git a/lang/python/docs/src/short-history.org b/lang/python/doc/src/short-history.org similarity index 100% rename from lang/python/docs/src/short-history.org rename to lang/python/doc/src/short-history.org diff --git a/lang/python/docs/texinfo/gpgme-python-howto.texi b/lang/python/doc/texinfo/gpgme-python-howto.texi similarity index 100% rename from lang/python/docs/texinfo/gpgme-python-howto.texi rename to lang/python/doc/texinfo/gpgme-python-howto.texi diff --git a/lang/python/docs/texinfo/short-history.texi b/lang/python/doc/texinfo/short-history.texi similarity index 100% rename from lang/python/docs/texinfo/short-history.texi rename to lang/python/doc/texinfo/short-history.texi diff --git a/lang/python/docs/texinfo/texinfo.tex b/lang/python/doc/texinfo/texinfo.tex similarity index 100% rename from lang/python/docs/texinfo/texinfo.tex rename to lang/python/doc/texinfo/texinfo.tex ----------------------------------------------------------------------- Summary of changes: doc/Makefile.am | 2 +- lang/python/MANIFEST.in | 9 +++++---- lang/python/Makefile.am | 5 +---- lang/python/{docs => doc}/README | 0 lang/python/{docs => doc}/meta/TODO.org | 0 lang/python/{docs => doc}/meta/old-commits.log | 0 lang/python/{docs => doc}/rst/gpgme-python-howto.rst | 0 lang/python/{docs => doc}/rst/short-history.rst | 0 lang/python/{docs => doc}/src/gpgme-python-howto.org | 0 lang/python/{docs => doc}/src/short-history.org | 0 lang/python/{docs => doc}/texinfo/gpgme-python-howto.texi | 0 lang/python/{docs => doc}/texinfo/short-history.texi | 0 lang/python/{docs => doc}/texinfo/texinfo.tex | 0 13 files changed, 7 insertions(+), 9 deletions(-) rename lang/python/{docs => doc}/README (100%) rename lang/python/{docs => doc}/meta/TODO.org (100%) rename lang/python/{docs => doc}/meta/old-commits.log (100%) rename lang/python/{docs => doc}/rst/gpgme-python-howto.rst (100%) rename lang/python/{docs => doc}/rst/short-history.rst (100%) rename lang/python/{docs => doc}/src/gpgme-python-howto.org (100%) rename lang/python/{docs => doc}/src/short-history.org (100%) rename lang/python/{docs => doc}/texinfo/gpgme-python-howto.texi (100%) rename lang/python/{docs => doc}/texinfo/short-history.texi (100%) rename lang/python/{docs => doc}/texinfo/texinfo.tex (100%) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 4 18:42:42 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Thu, 04 Oct 2018 18:42:42 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-327-g033da18 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 033da18b88af69b7846de62af4aeea359d27ec20 (commit) via a8d4aa6f763599bbd8ea36ef98b7b4931bf326dc (commit) via 0b5930b276186afd1ca1dd91d82db7e60dd20606 (commit) via 48258879720a4f423d0efa955da942d69f3c49d4 (commit) from f3fc73738264d21baf0e9b49fdd5cb67faa11d31 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 033da18b88af69b7846de62af4aeea359d27ec20 Author: Ben McGinnes Date: Fri Oct 5 02:41:45 2018 +1000 docs: whitespace bug * Same as before, but exported. diff --git a/lang/python/doc/rst/short-history.rst b/lang/python/doc/rst/short-history.rst index 0d839a5..8cf604f 100644 --- a/lang/python/doc/rst/short-history.rst +++ b/lang/python/doc/rst/short-history.rst @@ -19,10 +19,10 @@ Keeping the flame alive ----------------------- A couple of years later the project was picked up by Igor Belyi and -actively developed and maintained by him from 2004 to 2008. Igor\'s -whereabouts at the time of this document\'s creation are unknown, but -the current authors do hope he is well. We\'re assuming (or hoping) that -life did what life does and made continuing untenable. +actively developed and maintained by him from 2004 to 2008. Igor's +whereabouts at the time of this document's creation are unknown, but the +current authors do hope he is well. We're assuming (or hoping) that life +did what life does and made continuing untenable. Passing the torch ----------------- @@ -110,7 +110,7 @@ this module or a sample of its content: .. _pypi-gpgme-180: -GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library +GPG 1?8?0 - Python bindings for GPGME GnuPG cryptography library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is the most recent version to reach PyPI and is the version of the @@ -125,7 +125,7 @@ bindings included with that package. .. _pypi-gpgme-90: -PyME 0.9.0 - Python support for GPGME GnuPG cryptography library +PyME 0?9?0 - Python support for GPGME GnuPG cryptography library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is the last release of the PyME bindings maintained by Martin @@ -135,7 +135,7 @@ Python 2 to Python 3 code was made in 2015. Users of the more recent Python bindings will recognise numerous points of similarity, but also significant differences. It is likely that the -more recent official bindings will feel \"more pythonic.\" +more recent official bindings will feel "more pythonic." For those using Python 2, there is essentially no harm in using this module, but it may lack a number of more recent features added to GPGME. diff --git a/lang/python/doc/texinfo/short-history.texi b/lang/python/doc/texinfo/short-history.texi index fd136b5..a982f02 100644 --- a/lang/python/doc/texinfo/short-history.texi +++ b/lang/python/doc/texinfo/short-history.texi @@ -40,8 +40,8 @@ Relics of the past The Perils of PyPI -* GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library: GPG 180 - Python bindings for GPGME GnuPG cryptography library. -* PyME 0.9.0 - Python support for GPGME GnuPG cryptography library: PyME 090 - Python support for GPGME GnuPG cryptography library. +* GPG 1?8?0 - Python bindings for GPGME GnuPG cryptography library:: +* PyME 0?9?0 - Python support for GPGME GnuPG cryptography library:: @end detailmenu @end menu @@ -172,12 +172,12 @@ pyme (0.9.0) - Python support for GPGME GnuPG cryptography library @end enumerate @menu -* GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library: GPG 180 - Python bindings for GPGME GnuPG cryptography library. -* PyME 0.9.0 - Python support for GPGME GnuPG cryptography library: PyME 090 - Python support for GPGME GnuPG cryptography library. +* GPG 1?8?0 - Python bindings for GPGME GnuPG cryptography library:: +* PyME 0?9?0 - Python support for GPGME GnuPG cryptography library:: @end menu - at node GPG 180 - Python bindings for GPGME GnuPG cryptography library - at subsection GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library + at node GPG 1?8?0 - Python bindings for GPGME GnuPG cryptography library + at subsection GPG 1?8?0 - Python bindings for GPGME GnuPG cryptography library This is the most recent version to reach PyPI and is the version of the official Pyhon bindings which shipped with GPGME 1.8.0. If @@ -189,8 +189,8 @@ As there have been a lot of changes since the release of GPGME module and instead installing the current version of GPGME along with the Python bindings included with that package. - at node PyME 090 - Python support for GPGME GnuPG cryptography library - at subsection PyME 0.9.0 - Python support for GPGME GnuPG cryptography library + at node PyME 0?9?0 - Python support for GPGME GnuPG cryptography library + at subsection PyME 0?9?0 - Python support for GPGME GnuPG cryptography library This is the last release of the PyME bindings maintained by Martin Albrecht and is only compatible with Python 2, it will not work commit a8d4aa6f763599bbd8ea36ef98b7b4931bf326dc Author: Ben McGinnes Date: Fri Oct 5 02:38:14 2018 +1000 docs: org to texinfo whitspace bug * replaced "." in headings with "?" to prevent whitspace being appended by texinfo and breaking git. diff --git a/lang/python/doc/src/short-history.org b/lang/python/doc/src/short-history.org index 31b7d44..587cb9f 100644 --- a/lang/python/doc/src/short-history.org +++ b/lang/python/doc/src/short-history.org @@ -129,7 +129,7 @@ SWIG itself, which are worth noting here. 1. gpg (1.8.0) - Python bindings for GPGME GnuPG cryptography library 2. pyme (0.9.0) - Python support for GPGME GnuPG cryptography library -*** GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library +*** GPG 1?8?0 - Python bindings for GPGME GnuPG cryptography library :PROPERTIES: :CUSTOM_ID: pypi-gpgme-180 :END: @@ -144,7 +144,7 @@ SWIG itself, which are worth noting here. module and instead installing the current version of GPGME along with the Python bindings included with that package. -*** PyME 0.9.0 - Python support for GPGME GnuPG cryptography library +*** PyME 0?9?0 - Python support for GPGME GnuPG cryptography library :PROPERTIES: :CUSTOM_ID: pypi-gpgme-90 :END: commit 0b5930b276186afd1ca1dd91d82db7e60dd20606 Author: Ben McGinnes Date: Fri Oct 5 02:30:20 2018 +1000 docs: python * Fixed an error in the new index page and then exported to the other two "source" formats. diff --git a/lang/python/doc/rst/gpgme-python-howto.rst b/lang/python/doc/rst/gpgme-python-howto.rst index f29727e..9181491 100644 --- a/lang/python/doc/rst/gpgme-python-howto.rst +++ b/lang/python/doc/rst/gpgme-python-howto.rst @@ -248,8 +248,8 @@ The PyME package maintained by Martin Albrecht This package is the origin of these bindings, though they are somewhat different now. For details of when and how the PyME package was folded -back into GPGME itself see the *Short History* document [1]_ in the -Python bindings ``docs`` directory. [2]_ +back into GPGME itself see the `Short History `__ +document. [1]_ The PyME package was first released in 2002 and was also the first attempt to implement a low level binding to GPGME. In doing so it @@ -354,7 +354,7 @@ For Python 2 it checks for these executables in this order: ``python``, ``python2`` and ``python2.7``. For Python 3 it checks for these executables in this order: ``python3``, -``python3.7``, ``python3.6``, ``python3.5`` and ``python3.4``. [3]_ +``python3.7``, ``python3.6``, ``python3.5`` and ``python3.4``. [2]_ On systems where ``python`` is actually ``python3`` and not ``python2`` it may be possible that ``python2`` may be overlooked, but there have @@ -411,7 +411,7 @@ directory missing a lot of expected files. Even when this occurs, the solution is actually quite simple and will always work. That solution is simply to run the following commands as either the -**root** user or prepended with ``sudo -H``\ [4]_ in the +**root** user or prepended with ``sudo -H``\ [3]_ in the ``lang/python/`` directory: .. code:: shell @@ -1880,7 +1880,7 @@ Encrypting to multiple keys essentially just expands upon the key selection process and the recipients from the previous examples. The following example encrypts a message (``text``) to everyone with an -email address on the ``gnupg.org`` domain, [5]_ but does *not* encrypt +email address on the ``gnupg.org`` domain, [4]_ but does *not* encrypt to a default key or other key which is configured to normally encrypt to. @@ -2838,7 +2838,7 @@ module instead. It has since been modified to provide support for Python Since it rewrites the ``hkp`` protocol prefix as ``http`` and ``hkps`` as ``https``, the module is able to be used even with servers which do -not support the full scope of keyserver functions. [6]_ It also works +not support the full scope of keyserver functions. [5]_ It also works quite readily when incorporated into a `Cython <#cython>`__ generated and compiled version of any code. @@ -2968,9 +2968,6 @@ Footnotes ``short-history.org`` and/or ``short-history.html``. .. [2] - The ``lang/python/docs/`` directory in the GPGME source. - -.. [3] With no issues reported specific to Python 3.7, the release of Python 3.7.1 at around the same time as GPGME 1.12.0 and the testing with Python 3.7.1rc1, there is no reason to delay moving 3.7 ahead of 3.6 @@ -2978,7 +2975,7 @@ Footnotes always enforce their own policies anyway and installation to each supported minor release is quite possible too. -.. [4] +.. [3] Yes, even if you use virtualenv with everything you do in Python. If you want to install this module as just your user account then you will need to manually configure, compile and install the *entire* @@ -2987,13 +2984,13 @@ Footnotes circumstances under which it is worthwhile, but generally only on POSIX systems which utilise single user mode (some even require it). -.. [5] +.. [4] You probably don\'t really want to do this. Searching the keyservers for \"gnupg.org\" produces over 400 results, the majority of which aren\'t actually at the gnupg.org domain, but just included a comment regarding the project in their key somewhere. -.. [6] +.. [5] Such as with ProtonMail servers. This also means that restricted servers which only advertise either HTTP or HTTPS end points and not HKP or HKPS end points must still be identified as as HKP or HKPS diff --git a/lang/python/doc/rst/index.rst b/lang/python/doc/rst/index.rst new file mode 100644 index 0000000..31dc146 --- /dev/null +++ b/lang/python/doc/rst/index.rst @@ -0,0 +1,12 @@ +.. _index: + +GPGME Python Bindings +===================== + +.. _index-contents: + +Contents +-------- + +- `A short history of the project `__ +- `GPGME Python Bindings HOWTO `__ diff --git a/lang/python/doc/src/gpgme-python-howto.org b/lang/python/doc/src/gpgme-python-howto.org index 6eba29e..caa8e2f 100644 --- a/lang/python/doc/src/gpgme-python-howto.org +++ b/lang/python/doc/src/gpgme-python-howto.org @@ -7,7 +7,6 @@ #+LATEX_HEADER: \usepackage[margin=1in]{geometry} #+LATEX_HEADER: \setmainfont[Ligatures={Common}]{Times New Roman} #+LATEX_HEADER: \author{Ben McGinnes } -#+HTML_HEAD_EXTRA: * Introduction @@ -254,8 +253,7 @@ version 3.0 (or any later version). This package is the origin of these bindings, though they are somewhat different now. For details of when and how the PyME package was -folded back into GPGME itself see the /Short History/ document[fn:1] -in the Python bindings =docs= directory.[fn:2] +folded back into GPGME itself see the [[file:short-history.org][Short History]] document.[fn:1] The PyME package was first released in 2002 and was also the first attempt to implement a low level binding to GPGME. In doing so it @@ -365,7 +363,7 @@ For Python 2 it checks for these executables in this order: =python=, =python2= and =python2.7=. For Python 3 it checks for these executables in this order: =python3=, - =python3.7=, =python3.6=, =python3.5= and =python3.4=.[fn:3] + =python3.7=, =python3.6=, =python3.5= and =python3.4=.[fn:2] On systems where =python= is actually =python3= and not =python2= it may be possible that =python2= may be overlooked, but there have been @@ -425,7 +423,7 @@ build directory missing a lot of expected files. Even when this occurs, the solution is actually quite simple and will always work. That solution is simply to run the following commands as either the -*root* user or prepended with =sudo -H=[fn:4] in the =lang/python/= +*root* user or prepended with =sudo -H=[fn:3] in the =lang/python/= directory: #+BEGIN_SRC shell @@ -1928,7 +1926,7 @@ Encrypting to multiple keys essentially just expands upon the key selection process and the recipients from the previous examples. The following example encrypts a message (=text=) to everyone with an -email address on the =gnupg.org= domain,[fn:5] but does /not/ encrypt +email address on the =gnupg.org= domain,[fn:4] but does /not/ encrypt to a default key or other key which is configured to normally encrypt to. @@ -2899,7 +2897,7 @@ support for Python 2.7 as well and is available via PyPI. Since it rewrites the =hkp= protocol prefix as =http= and =hkps= as =https=, the module is able to be used even with servers which do not -support the full scope of keyserver functions.[fn:6] It also works quite +support the full scope of keyserver functions.[fn:5] It also works quite readily when incorporated into a [[#cython][Cython]] generated and compiled version of any code. @@ -3018,16 +3016,14 @@ PURPOSE. [fn:1] =short-history.org= and/or =short-history.html=. -[fn:2] The =lang/python/docs/= directory in the GPGME source. - -[fn:3] With no issues reported specific to Python 3.7, the release of +[fn:2] With no issues reported specific to Python 3.7, the release of Python 3.7.1 at around the same time as GPGME 1.12.0 and the testing with Python 3.7.1rc1, there is no reason to delay moving 3.7 ahead of 3.6 now. Production environments with more conservative requirements will always enforce their own policies anyway and installation to each supported minor release is quite possible too. -[fn:4] Yes, even if you use virtualenv with everything you do in +[fn:3] Yes, even if you use virtualenv with everything you do in Python. If you want to install this module as just your user account then you will need to manually configure, compile and install the /entire/ GnuPG stack as that user as well. This includes libraries @@ -3035,12 +3031,12 @@ which are not often installed that way. It can be done and there are circumstances under which it is worthwhile, but generally only on POSIX systems which utilise single user mode (some even require it). -[fn:5] You probably don't really want to do this. Searching the +[fn:4] You probably don't really want to do this. Searching the keyservers for "gnupg.org" produces over 400 results, the majority of which aren't actually at the gnupg.org domain, but just included a comment regarding the project in their key somewhere. -[fn:6] Such as with ProtonMail servers. This also means that +[fn:5] Such as with ProtonMail servers. This also means that restricted servers which only advertise either HTTP or HTTPS end points and not HKP or HKPS end points must still be identified as as HKP or HKPS within the Python Code. The =hkp4py= module will rewrite diff --git a/lang/python/doc/src/index.org b/lang/python/doc/src/index.org index 8410c40..701d986 100644 --- a/lang/python/doc/src/index.org +++ b/lang/python/doc/src/index.org @@ -21,6 +21,5 @@ :END: -- [[short-history][A short history of the project]] -- [[gpgme-python-howto][GPGME Python Bindings HOWTO]] - +- [[file:short-history.org][A short history of the project]] +- [[file:gpgme-python-howto.org][GPGME Python Bindings HOWTO]] diff --git a/lang/python/doc/texinfo/gpgme-python-howto.texi b/lang/python/doc/texinfo/gpgme-python-howto.texi index b474242..40beb7a 100644 --- a/lang/python/doc/texinfo/gpgme-python-howto.texi +++ b/lang/python/doc/texinfo/gpgme-python-howto.texi @@ -418,8 +418,7 @@ version 3.0 (or any later version). This package is the origin of these bindings, though they are somewhat different now. For details of when and how the PyME package was -folded back into GPGME itself see the @emph{Short History} document at footnote{@samp{short-history.org} and/or @samp{short-history.html}.} -in the Python bindings @samp{docs} directory. at footnote{The @samp{lang/python/docs/} directory in the GPGME source.} +folded back into GPGME itself see the @uref{short-history.org, Short History} document. at footnote{@samp{short-history.org} and/or @samp{short-history.html}.} The PyME package was first released in 2002 and was also the first attempt to implement a low level binding to GPGME. In doing so it diff --git a/lang/python/doc/texinfo/index.texi b/lang/python/doc/texinfo/index.texi new file mode 100644 index 0000000..4f80423 --- /dev/null +++ b/lang/python/doc/texinfo/index.texi @@ -0,0 +1,52 @@ +\input texinfo @c -*- texinfo -*- + at c %**start of header + at setfilename index.info + at settitle GNU Privacy Guard (GnuPG) Made Easy Python Bindings + at documentencoding UTF-8 + at documentlanguage en + at c %**end of header + + at finalout + at titlepage + at title GNU Privacy Guard (GnuPG) Made Easy Python Bindings + at author Ben McGinnes + at end titlepage + + at contents + + at ifnottex + at node Top + at top GNU Privacy Guard (GnuPG) Made Easy Python Bindings + at end ifnottex + + at menu +* GPGME Python Bindings:: + + at detailmenu +--- The Detailed Node Listing --- + +GPGME Python Bindings + +* Contents:: + + at end detailmenu + at end menu + + at node GPGME Python Bindings + at chapter GPGME Python Bindings + + at menu +* Contents:: + at end menu + + at node Contents + at section Contents + + at itemize + at item + at uref{short-history.org, A short history of the project} + at item + at uref{gpgme-python-howto.org, GPGME Python Bindings HOWTO} + at end itemize + + at bye \ No newline at end of file diff --git a/lang/python/doc/texinfo/short-history.texi b/lang/python/doc/texinfo/short-history.texi index 2854d91..fd136b5 100644 --- a/lang/python/doc/texinfo/short-history.texi +++ b/lang/python/doc/texinfo/short-history.texi @@ -40,8 +40,8 @@ Relics of the past The Perils of PyPI -* GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library: GPG 180 - Python bindings for GPGME GnuPG cryptography library. -* PyME 0.9.0 - Python support for GPGME GnuPG cryptography library: PyME 090 - Python support for GPGME GnuPG cryptography library. +* GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library: GPG 180 - Python bindings for GPGME GnuPG cryptography library. +* PyME 0.9.0 - Python support for GPGME GnuPG cryptography library: PyME 090 - Python support for GPGME GnuPG cryptography library. @end detailmenu @end menu @@ -172,8 +172,8 @@ pyme (0.9.0) - Python support for GPGME GnuPG cryptography library @end enumerate @menu -* GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library: GPG 180 - Python bindings for GPGME GnuPG cryptography library. -* PyME 0.9.0 - Python support for GPGME GnuPG cryptography library: PyME 090 - Python support for GPGME GnuPG cryptography library. +* GPG 1.8.0 - Python bindings for GPGME GnuPG cryptography library: GPG 180 - Python bindings for GPGME GnuPG cryptography library. +* PyME 0.9.0 - Python support for GPGME GnuPG cryptography library: PyME 090 - Python support for GPGME GnuPG cryptography library. @end menu @node GPG 180 - Python bindings for GPGME GnuPG cryptography library @@ -206,4 +206,4 @@ For those using Python 2, there is essentially no harm in using this module, but it may lack a number of more recent features added to GPGME. - at bye + at bye \ No newline at end of file commit 48258879720a4f423d0efa955da942d69f3c49d4 Author: Ben McGinnes Date: Fri Oct 5 01:47:56 2018 +1000 docs: python * lang/python/doc/meta/TODO.org: Added the two major documentation build system tasks to the TODO list. * Added an index page in preparation for sorting out the second of those TODO lists (Docutils is a lot easier to handle than Texinfo). * Meanwhile, have confirmed that it all builds just fine under GNU/Linux, OS X and FreeBSD while retaining the documentation, so that's a nice improvement from 1.11.1. Tested-by: Ben McGinnes Signed-off-by: Ben McGinnes diff --git a/lang/python/doc/meta/TODO.org b/lang/python/doc/meta/TODO.org index add8f4f..0be99b3 100644 --- a/lang/python/doc/meta/TODO.org +++ b/lang/python/doc/meta/TODO.org @@ -29,6 +29,38 @@ through converting to either Markdown or XHTML first. +** TODO Documentation build systems + :PROPERTIES: + :CUSTOM_ID: todo-docs-build-systems + :END: + +Though Org Mode is being used for the default documentation format, it +still needs to end up as usable by end users. So the Org Mode files +are used to produce the "source" files used by the two main contenders +for documenting the bindings: Texinfo and ReStructuredText/Docutils. + + +*** TODO Texinfo documentation + :PROPERTIES: + :CUSTOM_ID: todo-docs-build-texinfo + :END: + +Need to add all of Texinfo's ... special systems to make it do its +things. + + +*** TODO ReStructuredText documentation + :PROPERTIES: + :CUSTOM_ID: todo-docs-build-docutils + :END: + +Need to run Sphinx's quick start, add it to the requirements and tweak +the index page for the rst files to point to the HOWTO and other files. + +It might just be easier to do all that in Org Mode and convert the +lot, then the Sphinx bits can be automated. + + ** STARTED Documentation HOWTO :PROPERTIES: :CUSTOM_ID: todo-docs-howto diff --git a/lang/python/doc/src/index.org b/lang/python/doc/src/index.org new file mode 100644 index 0000000..8410c40 --- /dev/null +++ b/lang/python/doc/src/index.org @@ -0,0 +1,26 @@ +#+TITLE: GNU Privacy Guard (GnuPG) Made Easy Python Bindings +#+AUTHOR: Ben McGinnes +#+LATEX_COMPILER: xelatex +#+LATEX_CLASS: article +#+LATEX_CLASS_OPTIONS: [12pt] +#+LATEX_HEADER: \usepackage{xltxtra} +#+LATEX_HEADER: \usepackage[margin=1in]{geometry} +#+LATEX_HEADER: \setmainfont[Ligatures={Common}]{Times New Roman} +#+LATEX_HEADER: \author{Ben McGinnes } + + +* GPGME Python Bindings + :PROPERTIES: + :CUSTOM_ID: index + :END: + + +** Contents + :PROPERTIES: + :CUSTOM_ID: index-contents + :END: + + +- [[short-history][A short history of the project]] +- [[gpgme-python-howto][GPGME Python Bindings HOWTO]] + ----------------------------------------------------------------------- Summary of changes: lang/python/doc/meta/TODO.org | 32 +++++++++++++++ lang/python/doc/rst/gpgme-python-howto.rst | 21 +++++----- lang/python/doc/rst/index.rst | 12 ++++++ lang/python/doc/rst/short-history.rst | 14 +++---- lang/python/doc/src/gpgme-python-howto.org | 22 +++++------ lang/python/doc/src/index.org | 25 ++++++++++++ lang/python/doc/src/short-history.org | 4 +- lang/python/doc/texinfo/gpgme-python-howto.texi | 3 +- lang/python/doc/texinfo/index.texi | 52 +++++++++++++++++++++++++ lang/python/doc/texinfo/short-history.texi | 18 ++++----- 10 files changed, 158 insertions(+), 45 deletions(-) create mode 100644 lang/python/doc/rst/index.rst create mode 100644 lang/python/doc/src/index.org create mode 100644 lang/python/doc/texinfo/index.texi hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 5 15:26:14 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 05 Oct 2018 15:26:14 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-329-g913601f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 913601f4879f011878b53b885f35524df98b5570 (commit) via ecfa48fffa93f3d1b66354d2d46872ff614c4a68 (commit) from 033da18b88af69b7846de62af4aeea359d27ec20 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 913601f4879f011878b53b885f35524df98b5570 Author: Werner Koch Date: Fri Oct 5 15:16:53 2018 +0200 core: Apply GPGME_EXPORT_MODE_NOUID also to keyserver exports. * src/engine-gpg.c (export_common): Add keyserver-options to the send-keys commands. Signed-off-by: Werner Koch diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 9a5927c..2833374 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -2255,6 +2255,8 @@ export_common (engine_gpg_t gpg, gpgme_export_mode_t mode, else if ((mode & GPGME_EXPORT_MODE_EXTERN)) { err = add_arg (gpg, "--send-keys"); + if (!err && (mode & GPGME_EXPORT_MODE_NOUID)) + err = add_arg (gpg, "--keyserver-options=export-drop-uids"); } else { commit ecfa48fffa93f3d1b66354d2d46872ff614c4a68 Author: Werner Koch Date: Fri Oct 5 15:14:58 2018 +0200 build: Move config.h to conf/config.h * conf/: New dir. * configure.ac (AC_CONFIG_HEADER): Move header to conf dir. * doc/Makefile.am (mkdefsinc): Adjust rule. * lang/python/Makefile.am (copystamp): Ditto. -- C++ uses those stupid files without a suffix and thus the new standard header as included by newer other libc++ versions may conflict with the VERSION file in out top directory. This change should solve the problem. GnuPG-bug-id: 4168 Signed-off-by: Werner Koch diff --git a/configure.ac b/configure.ac index 1813cc5..b190e4b 100644 --- a/configure.ac +++ b/configure.ac @@ -88,7 +88,7 @@ VERSION_MICRO=mym4_version_micro AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR(src/gpgme.h.in) -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADER(conf/config.h) AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip]) AM_MAINTAINER_MODE AC_CANONICAL_HOST diff --git a/doc/Makefile.am b/doc/Makefile.am index db8a1a2..2b4730e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -34,9 +34,9 @@ gpgme_TEXINFOS = uiserver.texi lesser.texi gpl.texi gpgme.texi : defs.inc -mkdefsinc: mkdefsinc.c Makefile ../config.h - $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \ - -o $@ $(srcdir)/mkdefsinc.c +mkdefsinc: mkdefsinc.c Makefile $(top_builddir)/conf/config.h + $(CC_FOR_BUILD) -I. -I$(top_builddir)/conf -I$(srcdir) \ + $(AM_CPPFLAGS) -o $@ $(srcdir)/mkdefsinc.c dist-hook: defsincdate diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am index 6df17ce..6988faf 100644 --- a/lang/python/Makefile.am +++ b/lang/python/Makefile.am @@ -34,7 +34,7 @@ prepare: copystamp # distutils are not VPATH-aware. copystamp: ln -sf "$(top_srcdir)/src/data.h" . - ln -sf "$(top_builddir)/config.h" . + ln -sf "$(top_builddir)/conf/config.h" . ln -sf "$(srcdir)/src" gpg touch $@ ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- doc/Makefile.am | 6 +++--- lang/python/Makefile.am | 2 +- src/engine-gpg.c | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 5 15:55:24 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 05 Oct 2018 15:55:24 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-330-gb4559d3 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via b4559d30871a6c7b9c92ede17a20b47619258e29 (commit) from 913601f4879f011878b53b885f35524df98b5570 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b4559d30871a6c7b9c92ede17a20b47619258e29 Author: Werner Koch Date: Fri Oct 5 15:46:25 2018 +0200 build: Update .gitignore -- diff --git a/.gitignore b/.gitignore index e5bf69d..cef37ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ # GnuPG exclusions /aclocal.m4 /autom4te.cache -/config.h.in /configure -/config.h /config.log /config.status +/conf/config.h.in +/conf/config.h /libtool Makefile.in Makefile ----------------------------------------------------------------------- Summary of changes: .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 11:40:43 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 08 Oct 2018 11:40:43 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.11.1-331-g1aff251 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 1aff2512d846ea640d400caa31c20c40230b3b04 (commit) from b4559d30871a6c7b9c92ede17a20b47619258e29 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1aff2512d846ea640d400caa31c20c40230b3b04 Author: Werner Koch Date: Mon Oct 8 10:28:43 2018 +0200 Release 1.12.0 * configure.ac: Bump core LT version to C32/A21/R0. Bump C++ LT version to C14/A8/R0. * lang/qt/tests/Makefile.am (CLEANFILES): Add reader status files. * Makefile.am (EXTRA_DIST): Add conf/whatisthis. Signed-off-by: Werner Koch diff --git a/Makefile.am b/Makefile.am index 2dc02e7..829cf14 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,7 +34,8 @@ ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = EXTRA_DIST = autogen.sh autogen.rc gpgme.spec.in \ - ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 + ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 \ + conf/whatisthis if RUN_GPG_TESTS diff --git a/NEWS b/NEWS index 20a80e8..883159f 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,12 @@ -Noteworthy changes in version 1.11.2 (unreleased) +Noteworthy changes in version 1.12.0 (2018-10-08) ------------------------------------------------- + * Enhanced the JSON based interface tool gpgme-json to support Native + Messaging as well as new Javascript code to support the browser + site. See lang/js/README for details. + + * Major overhaul of the Python language bindings documentation. + * Even for old versions of gpg a missing MDC will now lead to a decryption failure. @@ -9,6 +15,12 @@ Noteworthy changes in version 1.11.2 (unreleased) * New data function to create a data object from an estream. + * Add more interfaces to the C++ bindings. + + * Improved error codes on decryption failure. + + * Lots of minor fixes. + * Interface changes relative to the 1.11.1 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gpgme_data_new_from_estream NEW. @@ -25,6 +37,10 @@ Noteworthy changes in version 1.11.2 (unreleased) cpp: Context::getFlag NEW. cpp: Context::createKeyEx NEW. + [c=C32/A21/R0 cpp=C14/A8/R0 qt=C10/A3/R2] + + Release-info: https://dev.gnupg.org/T4109 + Noteworthy changes in version 1.11.1 (2018-04-20) ------------------------------------------------- diff --git a/conf/whatisthis b/conf/whatisthis new file mode 100644 index 0000000..9005fe9 --- /dev/null +++ b/conf/whatisthis @@ -0,0 +1,2 @@ +Configuration files may go here. Note that config.h.in is +auto-generated so that this file is not in git. diff --git a/configure.ac b/configure.ac index b190e4b..af569ac 100644 --- a/configure.ac +++ b/configure.ac @@ -27,8 +27,8 @@ min_automake_version="1.14" # commit and push so that the git magic is able to work. See below # for the LT versions. m4_define(mym4_version_major, [1]) -m4_define(mym4_version_minor, [11]) -m4_define(mym4_version_micro, [2]) +m4_define(mym4_version_minor, [12]) +m4_define(mym4_version_micro, [0]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag @@ -54,15 +54,15 @@ AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org]) # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=31 -LIBGPGME_LT_AGE=20 -LIBGPGME_LT_REVISION=1 +LIBGPGME_LT_CURRENT=32 +LIBGPGME_LT_AGE=21 +LIBGPGME_LT_REVISION=0 # If there is an ABI break in gpgmepp or qgpgme also bump the # version in IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in -LIBGPGMEPP_LT_CURRENT=13 -LIBGPGMEPP_LT_AGE=7 +LIBGPGMEPP_LT_CURRENT=14 +LIBGPGMEPP_LT_AGE=8 LIBGPGMEPP_LT_REVISION=0 LIBQGPGME_LT_CURRENT=10 diff --git a/lang/qt/tests/Makefile.am b/lang/qt/tests/Makefile.am index bfe77ad..08b1c4c 100644 --- a/lang/qt/tests/Makefile.am +++ b/lang/qt/tests/Makefile.am @@ -68,7 +68,7 @@ noinst_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \ CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \ random_seed S.gpg-agent .gpg-v21-migrated pubring-stamp $(moc_files) \ - gpg.conf tofu.db + gpg.conf tofu.db reader_0.status reader_1.status clean-local: -$(TESTS_ENVIRONMENT) $(top_srcdir)/tests/start-stop-agent --stop diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 1731593..3bf968e 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -405,7 +405,7 @@ gpgme_pinentry_mode_t; #define GPGME_EXPORT_MODE_SECRET 16 #define GPGME_EXPORT_MODE_RAW 32 #define GPGME_EXPORT_MODE_PKCS12 64 -#define GPGME_EXPORT_MODE_NOUID 128 +#define GPGME_EXPORT_MODE_NOUID 128 /* Experimental(!)*/ typedef unsigned int gpgme_export_mode_t; ----------------------------------------------------------------------- Summary of changes: Makefile.am | 3 ++- NEWS | 18 +++++++++++++++++- conf/whatisthis | 2 ++ configure.ac | 14 +++++++------- lang/qt/tests/Makefile.am | 2 +- src/gpgme.h.in | 2 +- 6 files changed, 30 insertions(+), 11 deletions(-) create mode 100644 conf/whatisthis hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 11:46:04 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 08 Oct 2018 11:46:04 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-1-g1c7f93f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 1c7f93fbc8d337f6c7e4ce7b30bf0a452ce5a931 (commit) from 1aff2512d846ea640d400caa31c20c40230b3b04 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1c7f93fbc8d337f6c7e4ce7b30bf0a452ce5a931 Author: Werner Koch Date: Mon Oct 8 11:36:37 2018 +0200 Post release updates -- diff --git a/NEWS b/NEWS index 883159f..09ac43e 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Noteworthy changes in version 1.12.1 (unreleased) +------------------------------------------------- + + Noteworthy changes in version 1.12.0 (2018-10-08) ------------------------------------------------- diff --git a/configure.ac b/configure.ac index af569ac..315b39a 100644 --- a/configure.ac +++ b/configure.ac @@ -28,7 +28,7 @@ min_automake_version="1.14" # for the LT versions. m4_define(mym4_version_major, [1]) m4_define(mym4_version_minor, [12]) -m4_define(mym4_version_micro, [0]) +m4_define(mym4_version_micro, [1]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag ----------------------------------------------------------------------- Summary of changes: NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 11:50:17 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 08 Oct 2018 11:50:17 +0200 Subject: [git] gnupg-doc - branch, master, updated. 914ddc7c26840628d70d59a2991f577d072b8523 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 914ddc7c26840628d70d59a2991f577d072b8523 (commit) from 60d5f90aa33eb889dc072200ea6fbfd50d016b13 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 914ddc7c26840628d70d59a2991f577d072b8523 Author: Werner Koch Date: Mon Oct 8 11:41:19 2018 +0200 swdb: release gpgme 1.12.0 diff --git a/web/swdb.mac b/web/swdb.mac index 2b7cb63..e0aa43b 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -87,11 +87,11 @@ # # GPGME # -#+macro: gpgme_ver 1.11.1 -#+macro: gpgme_date 2018-04-20 -#+macro: gpgme_size 1385k -#+macro: gpgme_sha1 95b1fc427871ca8d30d6d3b1985c816fe0b5077b -#+macro: gpgme_sha2 2d1b111774d2e3dd26dcd7c251819ce4ef774ec5e566251eb9308fa7542fbd6f +#+macro: gpgme_ver 1.12.0 +#+macro: gpgme_date 2018-10-08 +#+macro: gpgme_size 1619k +#+macro: gpgme_sha1 6f1828fcd7de4366ca063e57f35e4ab24bc91baf +#+macro: gpgme_sha2 b4dc951c3743a60e2e120a77892e9e864fb936b2e58e7c77e8581f4d050e8cd8 # ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 15:27:14 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 08 Oct 2018 15:27:14 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-71-g8c61617 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 8c61617886882ce720b884aca9d6fc3e2e1128c4 (commit) via cf47f74df6534d340e7334227168c919596c542d (commit) via 9ccdc0cdc02583ba486535a24660cb94d5c5946f (commit) via 991ee4da98d431f3b5d1a59f9c9419f539931188 (commit) from 9bb552a9ede0c4a089961bcdf81d200145e731f1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8c61617886882ce720b884aca9d6fc3e2e1128c4 Author: Andre Heinecke Date: Mon Oct 8 15:23:16 2018 +0200 Use mail_map copies for all complex ops * src/mail.cpp (Mail::revertAllMails_o, Mail::wipeAllMails_o), (Mail::closeAllMails_o): Use copy of the mail map. -- For any complex operation we can't hold the lock of the map for the operation as the map might be modified / accessed from a different thread to complete the operation. It should not be a big problem with these functions. diff --git a/src/mail.cpp b/src/mail.cpp index 82c9259..b50cf3d 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -1800,7 +1800,9 @@ Mail::revertAllMails_o () int err = 0; std::map::iterator it; gpgrt_lock_lock (&mail_map_lock); - for (it = s_mail_map.begin(); it != s_mail_map.end(); ++it) + auto mail_map_copy = s_mail_map; + gpgrt_lock_unlock (&mail_map_lock); + for (it = mail_map_copy.begin(); it != mail_map_copy.end(); ++it) { if (it->second->revert_o ()) { @@ -1817,7 +1819,6 @@ Mail::revertAllMails_o () continue; } } - gpgrt_lock_unlock (&mail_map_lock); TRETURN err; } @@ -1828,7 +1829,9 @@ Mail::wipeAllMails_o () int err = 0; std::map::iterator it; gpgrt_lock_lock (&mail_map_lock); - for (it = s_mail_map.begin(); it != s_mail_map.end(); ++it) + auto mail_map_copy = s_mail_map; + gpgrt_lock_unlock (&mail_map_lock); + for (it = mail_map_copy.begin(); it != mail_map_copy.end(); ++it) { if (it->second->wipe_o ()) { @@ -1836,7 +1839,6 @@ Mail::wipeAllMails_o () err++; } } - gpgrt_lock_unlock (&mail_map_lock); TRETURN err; } commit cf47f74df6534d340e7334227168c919596c542d Author: Andre Heinecke Date: Mon Oct 8 15:19:58 2018 +0200 Fix deadlock when selecting encrypt * src/mail.cpp (Mail::locateAllCryptoRecipients_o): Use a copy of the mail map instead of a locked instance. -- Locking the mail map for a complex operation is a bad idea. What happened here is that locateKeys_o can start different threads and those threads can use "Mail::isValidPtr" which uses the s_mail_map and locks it accordingly. So there is a deadlock. diff --git a/src/mail.cpp b/src/mail.cpp index 9796834..82c9259 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -3413,14 +3413,15 @@ Mail::locateAllCryptoRecipients_o () TSTART; gpgrt_lock_lock (&mail_map_lock); std::map::iterator it; - for (it = s_mail_map.begin(); it != s_mail_map.end(); ++it) + auto mail_map_copy = s_mail_map; + gpgrt_lock_unlock (&mail_map_lock); + for (it = mail_map_copy.begin(); it != mail_map_copy.end(); ++it) { if (it->second->needs_crypto_m ()) { it->second->locateKeys_o (); } } - gpgrt_lock_unlock (&mail_map_lock); TRETURN; } commit 9ccdc0cdc02583ba486535a24660cb94d5c5946f Author: Andre Heinecke Date: Mon Oct 8 15:07:45 2018 +0200 Add option to do decryption synchronously * src/common_indep.h (syncDec): New option. * src/main.c (read_options): Read it. * src/mail.cpp (do_parsing): Do not use windowmessage signaling for parsing done. (Mail::decryptVerify_o): Call the parser synchronously. -- This is very ugly but might help some users who are affected by regular crashes when reading crypto mail. diff --git a/src/common_indep.h b/src/common_indep.h index cfe5e28..73910f4 100644 --- a/src/common_indep.h +++ b/src/common_indep.h @@ -200,6 +200,7 @@ struct int automation; /* General automation */ int autotrust; /* TOFU configured for GpgOL */ int sync_enc; /* Disabed async encryption */ + int sync_dec; /* Disabed async decryption */ int prefer_smime; /* S/MIME prefered when autoresolving */ int smime_html_warn_shown; /* Flag to save if unsigned smime warning was shown */ int autoretrieve; /* Use --auto-key-retrieve. */ diff --git a/src/mail.cpp b/src/mail.cpp index 9e1c8d2..9796834 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -832,7 +832,10 @@ do_parsing (LPVOID arg) TRETURN -1; } parser->parse(); - do_in_ui_thread (PARSING_DONE, arg); + if (!opt.sync_dec) + { + do_in_ui_thread (PARSING_DONE, arg); + } gpgrt_lock_unlock (&parser_lock); unblockInv(); TRETURN 0; @@ -1146,17 +1149,26 @@ Mail::decryptVerify_o () SRCNAME, __func__, getSubject_o ().c_str(), m_parser.get()); gpgol_release (cipherstream); - HANDLE parser_thread = CreateThread (NULL, 0, do_parsing, (LPVOID) this, 0, - NULL); + if (!opt.sync_dec) + { + HANDLE parser_thread = CreateThread (NULL, 0, do_parsing, (LPVOID) this, 0, + NULL); - if (!parser_thread) + if (!parser_thread) + { + log_error ("%s:%s: Failed to create decrypt / verify thread.", + SRCNAME, __func__); + } + CloseHandle (parser_thread); + TRETURN 0; + } + else { - log_error ("%s:%s: Failed to create decrypt / verify thread.", - SRCNAME, __func__); + /* Parse synchronously */ + do_parsing ((LPVOID) this); + parsing_done (); + TRETURN 0; } - CloseHandle (parser_thread); - - TRETURN 0; } void find_and_replace(std::string& source, const std::string &find, diff --git a/src/main.c b/src/main.c index e773cb6..73d8f04 100644 --- a/src/main.c +++ b/src/main.c @@ -334,7 +334,8 @@ read_options (void) } /* Hidden options */ - opt.sync_enc = get_conf_bool ("_syncEnc", 0); + opt.sync_enc = get_conf_bool ("syncEnc", 0); + opt.sync_dec = get_conf_bool ("syncDec", 0); } commit 991ee4da98d431f3b5d1a59f9c9419f539931188 Author: Andre Heinecke Date: Mon Oct 8 15:06:22 2018 +0200 Log configuration settings * src/common.cpp (load_extension_value): Log settings. -- This can be helpful understanding user logs. diff --git a/src/common.cpp b/src/common.cpp index a8d6369..f3ec09f 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -885,7 +885,14 @@ store_extension_value (const char *key, const char *val) int load_extension_value (const char *key, char **val) { - return load_config_value (HKEY_CURRENT_USER, GPGOL_REGPATH, key, val); + int ret = load_config_value (HKEY_CURRENT_USER, GPGOL_REGPATH, key, val); + if (val) + { + log_debug ("%s:%s: LoadReg '%s' val '%s'", + SRCNAME, __func__, key ? key : "null", + *val ? *val : "null"); + } + return ret; } int ----------------------------------------------------------------------- Summary of changes: src/common.cpp | 9 ++++++++- src/common_indep.h | 1 + src/mail.cpp | 45 ++++++++++++++++++++++++++++++--------------- src/main.c | 3 ++- 4 files changed, 41 insertions(+), 17 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 15:30:49 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 08 Oct 2018 15:30:49 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-72-gd04de20 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via d04de205a89ef617b31c45f6cf144393f6e9ee36 (commit) from 8c61617886882ce720b884aca9d6fc3e2e1128c4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d04de205a89ef617b31c45f6cf144393f6e9ee36 Author: Andre Heinecke Date: Mon Oct 8 15:28:38 2018 +0200 Revert "Show signer KeyID and UserID for valid mails" This reverts commit c186f2832294737ada9de6d23e466c106537676f. -- This only worked with contacts from the Address book for other contacts outlook shows: To help protect your security, the Follow Up flag text has been hidden. Follow up. Click here to see hidden text. diff --git a/src/mail.cpp b/src/mail.cpp index b50cf3d..f30804ed 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -104,8 +104,7 @@ Mail::Mail (LPDISPATCH mailitem) : m_first_autosecure_check(true), m_locate_count(0), m_is_about_to_be_moved(false), - m_locate_in_progress(false), - m_flag_change_triggered(false) + m_locate_in_progress(false) { TSTART; if (getMailForItem (mailitem)) @@ -1461,10 +1460,6 @@ Mail::parsing_done() updateCategories_o (); TRACEPOINT; - /* Show the signers uid as a flag */ - updateSigFlag_o (); - TRACEPOINT; - m_block_html = m_parser->shouldBlockHtml (); if (m_block_html) @@ -2297,84 +2292,6 @@ Mail::updateCategories_o () TRETURN; } -static std::string -pretty_id (const char *keyId) -{ - /* Three spaces, four quads and a NULL */ - char buf[20]; - buf[19] = '\0'; - if (!keyId) - { - return std::string ("null"); - } - size_t len = strlen (keyId); - if (!len) - { - return std::string ("empty"); - } - if (len < 16) - { - return std::string (_("Invalid Key")); - } - const char *p = keyId + (len - 16); - int j = 0; - for (size_t i = 0; i < 16; i++) - { - if (i && i % 4 == 0) - { - buf[j++] = ' '; - } - buf[j++] = *(p + i); - } - return std::string (buf); -} - -void -Mail::updateSigFlag_o () -{ - TSTART; - if (isValidSig ()) - { - char *buf; - /* Resolve to the primary fingerprint */ - const auto sigKey = KeyCache::instance ()->getByFpr (m_sig.fingerprint (), - true); - const char *sigFpr; - if (sigKey.isNull()) - { - sigFpr = m_sig.fingerprint (); - } - else - { - sigFpr = sigKey.primaryFingerprint (); - } - - gpgrt_asprintf (&buf, "%s: %s (%s)", _("Signer"), m_uid.email(), - pretty_id (sigFpr).c_str ()); - memdbg_alloc (buf); - log_debug ("%s:%s: Setting signer flag %s", - SRCNAME, __func__, anonstr (buf)); - m_flag_change_triggered = true; - put_oom_string (m_mailitem, "FlagRequest", buf); - m_flag_change_triggered = false; - xfree (buf); - } - else - { - char *flag = get_oom_string (m_mailitem, "FlagRequest"); - if (flag && (strstr (flag, _("Signer")) || strstr (flag, "Signer"))) - { - m_flag_change_triggered = true; - log_debug ("%s:%s: Removing flag containting Signer.", - SRCNAME, __func__); - put_oom_string (m_mailitem, "FlagRequest", ""); - m_flag_change_triggered = false; - } - xfree (flag); - } - TRETURN; -} - bool Mail::isSigned () const { diff --git a/src/mail.h b/src/mail.h index d925dde..c4f2369 100644 --- a/src/mail.h +++ b/src/mail.h @@ -598,11 +598,7 @@ public: /* Gets an additional reference for GetInspector.CurrentItem */ void refCurrentItem (); - /* Check if a flag change was triggered and can be ignored. */ - bool flagChangeTriggered () const { return m_flag_change_triggered; } - private: - void updateSigFlag_o (); void updateCategories_o (); void updateSigstate (); @@ -653,6 +649,5 @@ private: int m_locate_count; /* The number of key locates pending for this mail. */ bool m_is_about_to_be_moved; bool m_locate_in_progress; /* Simplified state variable for locate */ - bool m_flag_change_triggered; /* We trigger a flagrequest change */ }; #endif // MAIL_H diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp index 7a741c0..84bd887 100644 --- a/src/mailitem-events.cpp +++ b/src/mailitem-events.cpp @@ -270,14 +270,6 @@ EVENT_SINK_INVOKE(MailItemEvents) TRETURN S_OK; } } - if (m_mail->flagChangeTriggered () && - (!wcscmp (prop_name, L"FlagStatus") || !wcscmp (prop_name, L"FlagRequest") || - !wcscmp (prop_name, L"FlagIcon") || !wcscmp (prop_name, L"FlagDueBy"))) - { - log_oom ("%s:%s: Message %p propchange: %ls was requested.", - SRCNAME, __func__, m_object, prop_name); - TRETURN S_OK; - } log_oom ("%s:%s: Message %p propchange: %ls.", SRCNAME, __func__, m_object, prop_name); ----------------------------------------------------------------------- Summary of changes: src/mail.cpp | 85 +------------------------------------------------ src/mail.h | 5 --- src/mailitem-events.cpp | 8 ----- 3 files changed, 1 insertion(+), 97 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 15:48:10 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 08 Oct 2018 15:48:10 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-220-g79f165d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 79f165d7a8bcc26972712bb0f0cc554d5c3d4e42 (commit) from 3c2ffd27f36dfe77005aa01005145904761d8743 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 79f165d7a8bcc26972712bb0f0cc554d5c3d4e42 Author: Werner Koch Date: Mon Oct 8 15:38:37 2018 +0200 gpg: Make --skip-hidden-recipients work again. * g10/pubkey-enc.c (get_session_key): Take care of opt.skip_hidden_recipients. -- This was lost due to Fixes-commit: ce2f71760155b71a71418fe145a557c99bd52290 GnuPG-bug-id: 4169 Signed-off-by: Werner Koch diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c index 32b1ed0..ad0a77e 100644 --- a/g10/pubkey-enc.c +++ b/g10/pubkey-enc.c @@ -110,6 +110,16 @@ get_session_key (ctrl_t ctrl, struct pubkey_enc_list *list, DEK *dek) continue; } + /* FIXME: The list needs to be sorted so that we try the keys in + * an appropriate order. For example: + * - On-disk keys w/o protection + * - On-disk keys with a cached passphrase + * - On-card keys of an active card + * - On-disk keys with protection + * - On-card keys from cards which are not plugged it. Here a + * cancel-all button should stop aksing for other cards. + * Without any anonymous keys the sorting can be skipped. + */ for (k = list; k; k = k->next) { if (!(k->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E @@ -129,6 +139,9 @@ get_session_key (ctrl_t ctrl, struct pubkey_enc_list *list, DEK *dek) if (!k->keyid[0] && !k->keyid[1]) { + if (opt.skip_hidden_recipients) + continue; + if (!opt.quiet) log_info (_("anonymous recipient; trying secret key %s ...\n"), keystr (keyid)); ----------------------------------------------------------------------- Summary of changes: g10/pubkey-enc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 16:24:41 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 08 Oct 2018 16:24:41 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-221-gb6275f3 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via b6275f3bda8edff34274c5b921508567f491ab9c (commit) from 79f165d7a8bcc26972712bb0f0cc554d5c3d4e42 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b6275f3bda8edff34274c5b921508567f491ab9c Author: Werner Koch Date: Mon Oct 8 16:14:17 2018 +0200 gpg: Fix extra check for sign usage of a data signature. * g10/sig-check.c (check_signature_end_simple): -- Obviously we should not ignore a back signature here. Fixes-commit: 214b0077264e35c079e854a8b6374704aea45cd5 GnuPG-bug-id: 4014 Signed-off-by: Werner Koch diff --git a/g10/sig-check.c b/g10/sig-check.c index 0ec3843..9c32d4d 100644 --- a/g10/sig-check.c +++ b/g10/sig-check.c @@ -480,7 +480,8 @@ check_signature_end_simple (PKT_public_key *pk, PKT_signature *sig, } /* For data signatures check that the key has sign usage. */ - if (IS_SIG (sig) && !(pk->pubkey_usage & PUBKEY_USAGE_SIG)) + if (!IS_BACK_SIG (sig) && IS_SIG (sig) + && !(pk->pubkey_usage & PUBKEY_USAGE_SIG)) { rc = gpg_error (GPG_ERR_WRONG_KEY_USAGE); if (!opt.quiet) ----------------------------------------------------------------------- Summary of changes: g10/sig-check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 17:57:35 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 08 Oct 2018 17:57:35 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-73-g04b0965 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 04b0965b212221c2bcbc6edf00971721caa9df60 (commit) from d04de205a89ef617b31c45f6cf144393f6e9ee36 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 04b0965b212221c2bcbc6edf00971721caa9df60 Author: Andre Heinecke Date: Mon Oct 8 16:13:34 2018 +0200 Add lock tracing * src/debug.h (gpgol_lock, gpgol_unlock): Add tracing makros. * src/*.cpp: Use them. -- This adds lock tracing everywhere except memdbg as tracing there would be too verbose. Because deadlocks from race conditions are so hard to debug it's better if we have the capabilities to anylyse them. diff --git a/src/debug.cpp b/src/debug.cpp index c453b39..88e2923 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -332,7 +332,7 @@ const char *anonstr (const char *data) return "gpgol_str_empty"; } - gpgrt_lock_lock (&anon_str_lock); + gpgol_lock (&anon_str_lock); const std::string strData (data); auto it = str_map.find (strData); @@ -346,7 +346,7 @@ const char *anonstr (const char *data) // As the data is saved in our map we can return // the c_str as it won't be touched as const. - gpgrt_lock_unlock (&anon_str_lock); + gpgol_unlock (&anon_str_lock); return it->second.c_str(); } diff --git a/src/debug.h b/src/debug.h index 7b089ce..1d762b9 100644 --- a/src/debug.h +++ b/src/debug.h @@ -91,6 +91,28 @@ const char *anonstr (const char *data); } \ } + +#define gpgol_lock(X) \ +{ \ + if (opt.enable_debug & DBG_TRACE) \ + { \ + log_trace ("%s:%s:%i: lock %p lock", \ + SRCNAME, __func__, __LINE__, X); \ + } \ + gpgrt_lock_lock(X); \ +} + + +#define gpgol_unlock(X) \ +{ \ + if (opt.enable_debug & DBG_TRACE) \ + { \ + log_trace ("%s:%s:%i: lock %p unlock.", \ + SRCNAME, __func__, __LINE__, X); \ + } \ + gpgrt_lock_unlock(X); \ +} + const char *log_srcname (const char *s); #define SRCNAME log_srcname (__FILE__) diff --git a/src/dispcache.cpp b/src/dispcache.cpp index 7b1bbf3..e26669e 100644 --- a/src/dispcache.cpp +++ b/src/dispcache.cpp @@ -41,7 +41,7 @@ public: TRACEPOINT; return; } - gpgrt_lock_lock (&cache_lock); + gpgol_lock (&cache_lock); auto it = m_cache.find (id); if (it != m_cache.end ()) { @@ -49,11 +49,11 @@ public: SRCNAME, __func__, id); gpgol_release (it->second); it->second = obj; - gpgrt_lock_unlock (&cache_lock); + gpgol_unlock (&cache_lock); return; } m_cache.insert (std::make_pair (id, obj)); - gpgrt_lock_unlock (&cache_lock); + gpgol_unlock (&cache_lock); return; } @@ -64,27 +64,27 @@ public: TRACEPOINT; return nullptr; } - gpgrt_lock_lock (&cache_lock); + gpgol_lock (&cache_lock); const auto it = m_cache.find (id); if (it != m_cache.end()) { LPDISPATCH ret = it->second; - gpgrt_lock_unlock (&cache_lock); + gpgol_unlock (&cache_lock); return ret; } - gpgrt_lock_unlock (&cache_lock); + gpgol_unlock (&cache_lock); return nullptr; } ~Private () { - gpgrt_lock_lock (&cache_lock); + gpgol_lock (&cache_lock); for (const auto it: m_cache) { gpgol_release (it.second); } - gpgrt_lock_unlock (&cache_lock); + gpgol_unlock (&cache_lock); } private: diff --git a/src/explorer-events.cpp b/src/explorer-events.cpp index 7ccedfd..6139460 100644 --- a/src/explorer-events.cpp +++ b/src/explorer-events.cpp @@ -125,7 +125,7 @@ start_watchdog (LPVOID arg) LPDISPATCH explorer = (LPDISPATCH) arg; Sleep (500); - gpgrt_lock_lock (&explorer_map_lock); + gpgol_lock (&explorer_map_lock); auto it = s_explorerMap.find (explorer); @@ -133,7 +133,7 @@ start_watchdog (LPVOID arg) { log_error ("%s:%s: Watchdog for unknwon explorer %p", SRCNAME, __func__, explorer); - gpgrt_lock_unlock (&explorer_map_lock); + gpgol_unlock (&explorer_map_lock); return 0; } @@ -148,11 +148,11 @@ start_watchdog (LPVOID arg) log_debug ("%s:%s: Deteced unselect invalidating UI.", SRCNAME, __func__); it->second = UnselectSeen; - gpgrt_lock_unlock (&explorer_map_lock); + gpgol_unlock (&explorer_map_lock); do_in_ui_thread (INVALIDATE_UI, nullptr); return 0; } - gpgrt_lock_unlock (&explorer_map_lock); + gpgol_unlock (&explorer_map_lock); return 0; } @@ -160,7 +160,7 @@ start_watchdog (LPVOID arg) static void changeSeen (LPDISPATCH explorer) { - gpgrt_lock_lock (&explorer_map_lock); + gpgol_lock (&explorer_map_lock); auto it = s_explorerMap.find (explorer); @@ -192,7 +192,7 @@ changeSeen (LPDISPATCH explorer) } it->second = UnselectSeen + WatchDogActive; } - gpgrt_lock_unlock (&explorer_map_lock); + gpgol_unlock (&explorer_map_lock); } EVENT_SINK_INVOKE(ExplorerEvents) @@ -213,9 +213,9 @@ EVENT_SINK_INVOKE(ExplorerEvents) SRCNAME, __func__, this); GpgolAddin::get_instance ()->unregisterExplorerSink (this); - gpgrt_lock_lock (&explorer_map_lock); + gpgol_lock (&explorer_map_lock); s_explorerMap.erase (m_object); - gpgrt_lock_unlock (&explorer_map_lock); + gpgol_unlock (&explorer_map_lock); delete this; return S_OK; } diff --git a/src/keycache.cpp b/src/keycache.cpp index 26a72ce..f0e635b 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -227,7 +227,7 @@ public: void setPgpKey(const std::string &mbox, const GpgME::Key &key) { TSTART; - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); auto it = m_pgp_key_map.find (mbox); if (it == m_pgp_key_map.end ()) @@ -239,14 +239,14 @@ public: it->second = key; } insertOrUpdateInFprMap (key); - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN; } void setSmimeKey(const std::string &mbox, const GpgME::Key &key) { TSTART; - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); auto it = m_smime_key_map.find (mbox); if (it == m_smime_key_map.end ()) @@ -258,14 +258,14 @@ public: it->second = key; } insertOrUpdateInFprMap (key); - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN; } void setPgpKeySecret(const std::string &mbox, const GpgME::Key &key) { TSTART; - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); auto it = m_pgp_skey_map.find (mbox); if (it == m_pgp_skey_map.end ()) @@ -277,14 +277,14 @@ public: it->second = key; } insertOrUpdateInFprMap (key); - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN; } void setSmimeKeySecret(const std::string &mbox, const GpgME::Key &key) { TSTART; - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); auto it = m_smime_skey_map.find (mbox); if (it == m_smime_skey_map.end ()) @@ -296,7 +296,7 @@ public: it->second = key; } insertOrUpdateInFprMap (key); - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN; } @@ -311,11 +311,11 @@ public: } auto mbox = GpgME::UserID::addrSpecFromString (addr); - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); const auto it = m_addr_book_overrides.find (mbox); if (it == m_addr_book_overrides.end ()) { - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN ret; } for (const auto fpr: it->second) @@ -330,7 +330,7 @@ public: ret.push_back (key); } - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN ret; } @@ -345,29 +345,29 @@ public: if (proto == GpgME::OpenPGP) { - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); const auto it = m_pgp_key_map.find (mbox); if (it == m_pgp_key_map.end ()) { - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN GpgME::Key(); } const auto ret = it->second; - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN ret; } - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); const auto it = m_smime_key_map.find (mbox); if (it == m_smime_key_map.end ()) { - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN GpgME::Key(); } const auto ret = it->second; - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN ret; } @@ -383,29 +383,29 @@ public: if (proto == GpgME::OpenPGP) { - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); const auto it = m_pgp_skey_map.find (mbox); if (it == m_pgp_skey_map.end ()) { - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN GpgME::Key(); } const auto ret = it->second; - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN ret; } - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); const auto it = m_smime_skey_map.find (mbox); if (it == m_smime_skey_map.end ()) { - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN GpgME::Key(); } const auto ret = it->second; - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN ret; } @@ -526,7 +526,7 @@ public: TRACEPOINT; TRETURN; } - gpgrt_lock_lock (&fpr_map_lock); + gpgol_lock (&fpr_map_lock); /* First ensure that we have the subkeys mapped to the primary fpr */ @@ -552,7 +552,7 @@ public: { m_fpr_map.insert (std::make_pair (primaryFpr, key)); - gpgrt_lock_unlock (&fpr_map_lock); + gpgol_unlock (&fpr_map_lock); TRETURN; } @@ -568,7 +568,7 @@ public: { it->second = key; } - gpgrt_lock_unlock (&fpr_map_lock); + gpgol_unlock (&fpr_map_lock); TRETURN; } @@ -581,7 +581,7 @@ public: TRETURN GpgME::Key(); } - gpgrt_lock_lock (&fpr_map_lock); + gpgol_lock (&fpr_map_lock); std::string primaryFpr; const auto it = m_sub_fpr_map.find (fpr); if (it != m_sub_fpr_map.end ()) @@ -600,10 +600,10 @@ public: if (keyIt != m_fpr_map.end ()) { const auto ret = keyIt->second; - gpgrt_lock_unlock (&fpr_map_lock); + gpgol_unlock (&fpr_map_lock); TRETURN ret; } - gpgrt_lock_unlock (&fpr_map_lock); + gpgol_unlock (&fpr_map_lock); TRETURN GpgME::Key(); } @@ -627,7 +627,7 @@ public: const std::string sFpr (fpr); int i = 0; - gpgrt_lock_lock (&update_lock); + gpgol_lock (&update_lock); while (m_update_jobs.find(sFpr) != m_update_jobs.end ()) { i++; @@ -636,9 +636,9 @@ public: log_debug ("%s:%s Waiting on update for \"%s\"", SRCNAME, __func__, anonstr (fpr)); } - gpgrt_lock_unlock (&update_lock); + gpgol_unlock (&update_lock); Sleep (10); - gpgrt_lock_lock (&update_lock); + gpgol_lock (&update_lock); if (i == 3000) { /* Just to be on the save side */ @@ -648,7 +648,7 @@ public: break; } } - gpgrt_lock_unlock (&update_lock); + gpgol_unlock (&update_lock); TRACEPOINT; const auto ret2 = getFromMap (fpr); @@ -682,16 +682,16 @@ public: TRETURN; } const std::string sFpr (fpr); - gpgrt_lock_lock (&update_lock); + gpgol_lock (&update_lock); if (m_update_jobs.find(sFpr) != m_update_jobs.end ()) { log_debug ("%s:%s Update for \"%s\" already in progress.", SRCNAME, __func__, anonstr (fpr)); - gpgrt_lock_unlock (&update_lock); + gpgol_unlock (&update_lock); } m_update_jobs.insert (sFpr); - gpgrt_lock_unlock (&update_lock); + gpgol_unlock (&update_lock); update_arg_t * args = new update_arg_t; args->first = sFpr; args->second = proto; @@ -710,18 +710,18 @@ public: } TRACEPOINT; insertOrUpdateInFprMap (key); - gpgrt_lock_lock (&update_lock); + gpgol_lock (&update_lock); const auto it = m_update_jobs.find(fpr); if (it == m_update_jobs.end()) { log_error ("%s:%s Update for \"%s\" already finished.", SRCNAME, __func__, anonstr (fpr)); - gpgrt_lock_unlock (&update_lock); + gpgol_unlock (&update_lock); TRETURN; } m_update_jobs.erase (it); - gpgrt_lock_unlock (&update_lock); + gpgol_unlock (&update_lock); TRACEPOINT; TRETURN; } @@ -735,15 +735,15 @@ public: TRACEPOINT; TRETURN; } - gpgrt_lock_lock (&import_lock); + gpgol_lock (&import_lock); if (m_import_jobs.find (mbox) != m_import_jobs.end ()) { log_debug ("%s:%s import for \"%s\" already in progress.", SRCNAME, __func__, anonstr (mbox.c_str ())); - gpgrt_lock_unlock (&import_lock); + gpgol_unlock (&import_lock); } m_import_jobs.insert (mbox); - gpgrt_lock_unlock (&import_lock); + gpgol_unlock (&import_lock); import_arg_t * args = new import_arg_t; args->first = std::unique_ptr (new LocateArgs (mbox, mail)); @@ -759,7 +759,7 @@ public: const std::vector &result_fprs) { TSTART; - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); auto it = m_addr_book_overrides.find (mbox); if (it != m_addr_book_overrides.end ()) { @@ -770,19 +770,19 @@ public: m_addr_book_overrides.insert ( std::make_pair (mbox, result_fprs)); } - gpgrt_lock_unlock (&keycache_lock); - gpgrt_lock_lock (&import_lock); + gpgol_unlock (&keycache_lock); + gpgol_lock (&import_lock); const auto job_it = m_import_jobs.find(mbox); if (job_it == m_import_jobs.end()) { log_error ("%s:%s import for \"%s\" already finished.", SRCNAME, __func__, anonstr (mbox.c_str ())); - gpgrt_lock_unlock (&import_lock); + gpgol_unlock (&import_lock); TRETURN; } m_import_jobs.erase (job_it); - gpgrt_lock_unlock (&import_lock); + gpgol_unlock (&import_lock); TRETURN; } @@ -1028,7 +1028,7 @@ KeyCache::startLocate (const char *addr, Mail *mail) const { TRETURN; } - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); if (d->m_pgp_key_map.find (recp) == d->m_pgp_key_map.end ()) { // It's enough to look at the PGP Key map. We marked @@ -1042,7 +1042,7 @@ KeyCache::startLocate (const char *addr, Mail *mail) const NULL); CloseHandle (thread); } - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN; } @@ -1060,7 +1060,7 @@ KeyCache::startLocateSecret (const char *addr, Mail *mail) const { TRETURN; } - gpgrt_lock_lock (&keycache_lock); + gpgol_lock (&keycache_lock); if (d->m_pgp_skey_map.find (recp) == d->m_pgp_skey_map.end ()) { // It's enough to look at the PGP Key map. We marked @@ -1075,7 +1075,7 @@ KeyCache::startLocateSecret (const char *addr, Mail *mail) const NULL); CloseHandle (thread); } - gpgrt_lock_unlock (&keycache_lock); + gpgol_unlock (&keycache_lock); TRETURN; } diff --git a/src/mail.cpp b/src/mail.cpp index f30804ed..bfff980 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -124,9 +124,9 @@ Mail::Mail (LPDISPATCH mailitem) : gpgol_release(mailitem); TRETURN; } - gpgrt_lock_lock (&mail_map_lock); + gpgol_lock (&mail_map_lock); s_mail_map.insert (std::pair (mailitem, this)); - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); s_last_mail = this; memdbg_ctor ("Mail"); TRETURN; @@ -139,7 +139,7 @@ void Mail::lockDelete () { TSTART; - gpgrt_lock_lock (&dtor_lock); + gpgol_lock (&dtor_lock); TRETURN; } @@ -148,7 +148,7 @@ void Mail::unlockDelete () { TSTART; - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); TRETURN; } @@ -160,7 +160,7 @@ Mail::~Mail() thread. The shared_ptr of the parser then ensures that the parser is alive even if the mail is deleted while parsing. */ - gpgrt_lock_lock (&dtor_lock); + gpgol_lock (&dtor_lock); memdbg_dtor ("Mail"); log_oom ("%s:%s: dtor: Mail: %p item: %p", SRCNAME, __func__, this, m_mailitem); @@ -173,23 +173,23 @@ Mail::~Mail() log_oom ("%s:%s: Erasing mail", SRCNAME, __func__); - gpgrt_lock_lock (&mail_map_lock); + gpgol_lock (&mail_map_lock); it = s_mail_map.find(m_mailitem); if (it != s_mail_map.end()) { s_mail_map.erase (it); } - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); if (!m_uuid.empty()) { - gpgrt_lock_lock (&uid_map_lock); + gpgol_lock (&uid_map_lock); auto it2 = s_uid_map.find(m_uuid); if (it2 != s_uid_map.end()) { s_uid_map.erase (it2); } - gpgrt_lock_unlock (&uid_map_lock); + gpgol_unlock (&uid_map_lock); } log_oom ("%s:%s: releasing mailitem", @@ -213,7 +213,7 @@ Mail::~Mail() m_crypter = nullptr; releaseCurrentItem(); - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); log_oom ("%s:%s: returning", SRCNAME, __func__); TRETURN; @@ -229,9 +229,9 @@ Mail::getMailForItem (LPDISPATCH mailitem) TRETURN NULL; } std::map::iterator it; - gpgrt_lock_lock (&mail_map_lock); + gpgol_lock (&mail_map_lock); it = s_mail_map.find(mailitem); - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); if (it == s_mail_map.end()) { TRETURN NULL; @@ -248,9 +248,9 @@ Mail::getMailForUUID (const char *uuid) { TRETURN NULL; } - gpgrt_lock_lock (&uid_map_lock); + gpgol_lock (&uid_map_lock); auto it = s_uid_map.find(std::string(uuid)); - gpgrt_lock_unlock (&uid_map_lock); + gpgol_unlock (&uid_map_lock); if (it == s_uid_map.end()) { TRETURN NULL; @@ -263,18 +263,18 @@ bool Mail::isValidPtr (const Mail *mail) { TSTART; - gpgrt_lock_lock (&mail_map_lock); + gpgol_lock (&mail_map_lock); auto it = s_mail_map.begin(); while (it != s_mail_map.end()) { if (it->second == mail) { - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); TRETURN true; } ++it; } - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); TRETURN false; } @@ -785,7 +785,7 @@ static DWORD WINAPI do_parsing (LPVOID arg) { TSTART; - gpgrt_lock_lock (&dtor_lock); + gpgol_lock (&dtor_lock); /* We lock with mail dtors so we can be sure the mail->parser call is valid. */ Mail *mail = (Mail *)arg; @@ -793,7 +793,7 @@ do_parsing (LPVOID arg) { log_debug ("%s:%s: canceling parsing for: %p already deleted", SRCNAME, __func__, arg); - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); TRETURN 0; } @@ -801,9 +801,9 @@ do_parsing (LPVOID arg) /* This takes a shared ptr of parser. So the parser is still valid when the mail is deleted. */ auto parser = mail->parser (); - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); - gpgrt_lock_lock (&parser_lock); + gpgol_lock (&parser_lock); /* We lock the parser here to avoid too many decryption attempts if there are multiple mailobjects which might have already @@ -817,7 +817,7 @@ do_parsing (LPVOID arg) { log_debug ("%s:%s: cancel for: %p already deleted", SRCNAME, __func__, arg); - gpgrt_lock_unlock (&parser_lock); + gpgol_unlock (&parser_lock); unblockInv(); TRETURN 0; } @@ -826,7 +826,7 @@ do_parsing (LPVOID arg) { log_error ("%s:%s: no parser found for mail: %p", SRCNAME, __func__, arg); - gpgrt_lock_unlock (&parser_lock); + gpgol_unlock (&parser_lock); unblockInv(); TRETURN -1; } @@ -835,7 +835,7 @@ do_parsing (LPVOID arg) { do_in_ui_thread (PARSING_DONE, arg); } - gpgrt_lock_unlock (&parser_lock); + gpgol_unlock (&parser_lock); unblockInv(); TRETURN 0; } @@ -915,7 +915,7 @@ static DWORD WINAPI do_crypt (LPVOID arg) { TSTART; - gpgrt_lock_lock (&dtor_lock); + gpgol_lock (&dtor_lock); /* We lock with mail dtors so we can be sure the mail->parser call is valid. */ Mail *mail = (Mail *)arg; @@ -923,7 +923,7 @@ do_crypt (LPVOID arg) { log_debug ("%s:%s: canceling crypt for: %p already deleted", SRCNAME, __func__, arg); - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); TRETURN 0; } if (mail->cryptState () != Mail::NeedsActualCrypt) @@ -931,20 +931,20 @@ do_crypt (LPVOID arg) log_debug ("%s:%s: invalid state %i", SRCNAME, __func__, mail->cryptState ()); mail->setWindowEnabled_o (true); - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); TRETURN -1; } /* This takes a shared ptr of crypter. So the crypter is still valid when the mail is deleted. */ auto crypter = mail->cryper (); - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); if (!crypter) { log_error ("%s:%s: no crypter found for mail: %p", SRCNAME, __func__, arg); - gpgrt_lock_unlock (&parser_lock); + gpgol_unlock (&parser_lock); mail->setWindowEnabled_o (true); TRETURN -1; } @@ -952,12 +952,12 @@ do_crypt (LPVOID arg) GpgME::Error err; int rc = crypter->do_crypto(err); - gpgrt_lock_lock (&dtor_lock); + gpgol_lock (&dtor_lock); if (!Mail::isValidPtr (mail)) { log_debug ("%s:%s: aborting crypt for: %p already deleted", SRCNAME, __func__, arg); - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); TRETURN 0; } @@ -990,14 +990,14 @@ do_crypt (LPVOID arg) mail->setCryptState (Mail::NoCryptMail); mail->resetCrypter (); crypter = nullptr; - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); TRETURN rc; } if (!mail->isAsyncCryptDisabled ()) { mail->setCryptState (Mail::NeedsUpdateInOOM); - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); // This deletes the Mail in Outlook 2010 do_in_ui_thread (CRYPTO_DONE, arg); log_debug ("%s:%s: UI thread finished for %p", @@ -1020,7 +1020,7 @@ do_crypt (LPVOID arg) crypter = nullptr; mail->resetCrypter (); } - gpgrt_lock_unlock (&dtor_lock); + gpgol_unlock (&dtor_lock); } /* This works around a bug in pinentry that it might bring the wrong window to front. So after encryption / @@ -1757,9 +1757,9 @@ Mail::closeAllMails_o () std::map::iterator it; TRACEPOINT; - gpgrt_lock_lock (&mail_map_lock); + gpgol_lock (&mail_map_lock); std::map mail_map_copy = s_mail_map; - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); for (it = mail_map_copy.begin(); it != mail_map_copy.end(); ++it) { /* XXX For non racy code the is_valid_ptr check should not @@ -1794,9 +1794,9 @@ Mail::revertAllMails_o () TSTART; int err = 0; std::map::iterator it; - gpgrt_lock_lock (&mail_map_lock); + gpgol_lock (&mail_map_lock); auto mail_map_copy = s_mail_map; - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); for (it = mail_map_copy.begin(); it != mail_map_copy.end(); ++it) { if (it->second->revert_o ()) @@ -1823,9 +1823,9 @@ Mail::wipeAllMails_o () TSTART; int err = 0; std::map::iterator it; - gpgrt_lock_lock (&mail_map_lock); + gpgol_lock (&mail_map_lock); auto mail_map_copy = s_mail_map; - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); for (it = mail_map_copy.begin(); it != mail_map_copy.end(); ++it) { if (it->second->wipe_o ()) @@ -2361,9 +2361,9 @@ Mail::setUUID_o () delete other; } - gpgrt_lock_lock (&uid_map_lock); + gpgol_lock (&uid_map_lock); s_uid_map.insert (std::pair (m_uuid, this)); - gpgrt_lock_unlock (&uid_map_lock); + gpgol_unlock (&uid_map_lock); log_debug ("%s:%s: uuid for %p is now %s", SRCNAME, __func__, this, m_uuid.c_str()); @@ -3330,10 +3330,10 @@ void Mail::locateAllCryptoRecipients_o () { TSTART; - gpgrt_lock_lock (&mail_map_lock); + gpgol_lock (&mail_map_lock); std::map::iterator it; auto mail_map_copy = s_mail_map; - gpgrt_lock_unlock (&mail_map_lock); + gpgol_unlock (&mail_map_lock); for (it = mail_map_copy.begin(); it != mail_map_copy.end(); ++it) { if (it->second->needs_crypto_m ()) diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp index b6428bc..84a7592 100644 --- a/src/parsecontroller.cpp +++ b/src/parsecontroller.cpp @@ -626,10 +626,10 @@ ParseController::get_ultimate_keys() TSTART; static bool s_keys_listed; static std::vector s_ultimate_keys; - gpgrt_lock_lock (&keylist_lock); + gpgol_lock (&keylist_lock); if (s_keys_listed) { - gpgrt_lock_unlock (&keylist_lock); + gpgol_unlock (&keylist_lock); TRETURN s_ultimate_keys; } log_debug ("%s:%s: Starting keylisting.", @@ -640,7 +640,7 @@ ParseController::get_ultimate_keys() /* Maybe PGP broken and not S/MIME */ log_error ("%s:%s: broken installation no ctx.", SRCNAME, __func__); - gpgrt_lock_unlock (&keylist_lock); + gpgol_unlock (&keylist_lock); TRETURN s_ultimate_keys; } ctx->setKeyListMode (KeyListMode::Local); @@ -650,7 +650,7 @@ ParseController::get_ultimate_keys() { log_error ("%s:%s: Failed to start keylisting err: %i: %s", SRCNAME, __func__, err.code (), err.asString()); - gpgrt_lock_unlock (&keylist_lock); + gpgol_unlock (&keylist_lock); TRETURN s_ultimate_keys; } TRACEPOINT; @@ -687,6 +687,6 @@ ParseController::get_ultimate_keys() SRCNAME, __func__); s_keys_listed = true; - gpgrt_lock_unlock (&keylist_lock); + gpgol_unlock (&keylist_lock); TRETURN s_ultimate_keys; } diff --git a/src/windowmessages.cpp b/src/windowmessages.cpp index 0b233e9..e269d0a 100644 --- a/src/windowmessages.cpp +++ b/src/windowmessages.cpp @@ -510,7 +510,7 @@ delayed_invalidate_ui (LPVOID minsleep) } TRACEPOINT; invalidation_in_progress = true; - gpgrt_lock_lock(&invalidate_lock); + gpgol_lock(&invalidate_lock); int sleep_ms = (intptr_t)minsleep; Sleep (sleep_ms); @@ -530,7 +530,7 @@ delayed_invalidate_ui (LPVOID minsleep) do_in_ui_thread (INVALIDATE_UI, nullptr); TRACEPOINT; invalidation_in_progress = false; - gpgrt_lock_unlock(&invalidate_lock); + gpgol_unlock(&invalidate_lock); TRETURN 0; } diff --git a/src/wks-helper.cpp b/src/wks-helper.cpp index acf79e3..96cc23e 100644 --- a/src/wks-helper.cpp +++ b/src/wks-helper.cpp @@ -60,8 +60,8 @@ WKSHelper::~WKSHelper () { // Ensure that we are not destroyed while // worker is running. - gpgrt_lock_lock (&wks_lock); - gpgrt_lock_unlock (&wks_lock); + gpgol_lock (&wks_lock); + gpgol_unlock (&wks_lock); } const WKSHelper* @@ -77,10 +77,10 @@ WKSHelper::instance () WKSHelper::WKSState WKSHelper::get_state (const std::string &mbox) const { - gpgrt_lock_lock (&wks_lock); + gpgol_lock (&wks_lock); const auto it = s_states.find(mbox); const auto dataEnd = s_states.end(); - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); if (it == dataEnd) { return NotChecked; @@ -91,10 +91,10 @@ WKSHelper::get_state (const std::string &mbox) const time_t WKSHelper::get_check_time (const std::string &mbox) const { - gpgrt_lock_lock (&wks_lock); + gpgol_lock (&wks_lock); const auto it = s_last_checked.find(mbox); const auto dataEnd = s_last_checked.end(); - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); if (it == dataEnd) { return 0; @@ -105,18 +105,18 @@ WKSHelper::get_check_time (const std::string &mbox) const std::pair WKSHelper::get_cached_confirmation (const std::string &mbox) const { - gpgrt_lock_lock (&wks_lock); + gpgol_lock (&wks_lock); const auto it = s_confirmation_cache.find(mbox); const auto dataEnd = s_confirmation_cache.end(); if (it == dataEnd) { - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); return std::make_pair (nullptr, nullptr); } auto ret = it->second; s_confirmation_cache.erase (it); - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); return ret; } @@ -339,7 +339,7 @@ WKSHelper::load () const void WKSHelper::save () const { - gpgrt_lock_lock (&wks_lock); + gpgol_lock (&wks_lock); for (const auto &pair: s_states) { auto state = std::to_string (pair.second) + ';'; @@ -360,7 +360,7 @@ WKSHelper::save () const SRCNAME, __func__); } } - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); } static DWORD WINAPI @@ -379,7 +379,7 @@ do_notify (LPVOID arg) void WKSHelper::allow_notify (int sleepTimeMS) const { - gpgrt_lock_lock (&wks_lock); + gpgol_lock (&wks_lock); for (auto &pair: s_states) { if (pair.second == ConfirmationSeen || @@ -393,7 +393,7 @@ WKSHelper::allow_notify (int sleepTimeMS) const break; } } - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); } void @@ -523,7 +523,7 @@ void WKSHelper::update_state (const std::string &mbox, WKSState state, bool store) const { - gpgrt_lock_lock (&wks_lock); + gpgol_lock (&wks_lock); auto it = s_states.find(mbox); if (it != s_states.end()) @@ -534,7 +534,7 @@ WKSHelper::update_state (const std::string &mbox, WKSState state, { s_states.insert (std::make_pair (mbox, state)); } - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); if (store) { @@ -546,7 +546,7 @@ void WKSHelper::update_last_checked (const std::string &mbox, time_t time, bool store) const { - gpgrt_lock_lock (&wks_lock); + gpgol_lock (&wks_lock); auto it = s_last_checked.find(mbox); if (it != s_last_checked.end()) { @@ -556,7 +556,7 @@ WKSHelper::update_last_checked (const std::string &mbox, time_t time, { s_last_checked.insert (std::make_pair (mbox, time)); } - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); if (store) { @@ -837,9 +837,9 @@ WKSHelper::handle_confirmation_read (Mail *mail, LPSTREAM stream) const /* And reset it to start */ mystdin->seek (0, SEEK_SET); - gpgrt_lock_lock (&wks_lock); + gpgol_lock (&wks_lock); s_confirmation_cache.insert (std::make_pair (mbox, std::make_pair (mystdin, mail))); - gpgrt_lock_unlock (&wks_lock); + gpgol_unlock (&wks_lock); update_state (mbox, ConfirmationSeen); ----------------------------------------------------------------------- Summary of changes: src/debug.cpp | 4 +- src/debug.h | 22 +++++++++++ src/dispcache.cpp | 16 ++++---- src/explorer-events.cpp | 16 ++++---- src/keycache.cpp | 102 ++++++++++++++++++++++++------------------------ src/mail.cpp | 88 ++++++++++++++++++++--------------------- src/parsecontroller.cpp | 10 ++--- src/windowmessages.cpp | 4 +- src/wks-helper.cpp | 38 +++++++++--------- 9 files changed, 161 insertions(+), 139 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 8 18:03:23 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 08 Oct 2018 18:03:23 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-76-g6bdca98 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 6bdca98e1f645ca245fbe07254edff3dc6f5d4c5 (commit) via 385ef5768e47903d5e15a4b711a82b6d2c7ec715 (commit) via ce85a6ea230d742f6032bf23fab511e89c9b82fb (commit) from 04b0965b212221c2bcbc6edf00971721caa9df60 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6bdca98e1f645ca245fbe07254edff3dc6f5d4c5 Author: Andre Heinecke Date: Mon Oct 8 18:02:26 2018 +0200 Trace parsing some more * src/parsecontroller.cpp (ParseController::parse): Trace some more. -- We especially want to know when GpgME calls are finished. diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp index 84a7592..7dfade8 100644 --- a/src/parsecontroller.cpp +++ b/src/parsecontroller.cpp @@ -363,6 +363,7 @@ ParseController::parse() if (decrypt) { input.seek (0, SEEK_SET); + TRACEPOINT; auto combined_result = ctx->decryptAndVerify(input, output); log_debug ("%s:%s:%p decrypt / verify done.", SRCNAME, __func__, this); @@ -375,6 +376,7 @@ ParseController::parse() is_smime (output) || output.type() == Data::Type::PGPSigned) { + TRACEPOINT; /* There is a signature in the output. So we have to verify it now as an extra step. */ input = Data (m_outputprovider); @@ -383,11 +385,13 @@ ParseController::parse() m_outputprovider = new MimeDataProvider(); output = Data(m_outputprovider); verify = true; + TRACEPOINT; } else { verify = false; } + TRACEPOINT; if (m_decrypt_result.error () || m_decrypt_result.isNull () || m_decrypt_result.error ().isCanceled ()) { @@ -396,11 +400,13 @@ ParseController::parse() } if (verify) { - const auto sig = m_inputprovider->signature(); + TRACEPOINT; + GpgME::Data *sig = m_inputprovider->signature(); input.seek (0, SEEK_SET); if (sig) { sig->seek (0, SEEK_SET); + TRACEPOINT; m_verify_result = ctx->verifyDetachedSignature(*sig, input); log_debug ("%s:%s:%p verify done.", SRCNAME, __func__, this); @@ -416,7 +422,9 @@ ParseController::parse() } else { + TRACEPOINT; m_verify_result = ctx->verifyOpaqueSignature(input, output); + TRACEPOINT; const auto sigs = m_verify_result.signatures(); bool allBad = sigs.size(); @@ -488,6 +496,7 @@ ParseController::parse() bool ultimate_keys_queried = false; for (const auto sig: m_verify_result.signatures()) { + TRACEPOINT; has_valid_encrypted_checksum = is_valid_chksum (sig); KeyCache::instance ()->update (sig.fingerprint (), protocol); @@ -503,6 +512,7 @@ ParseController::parse() get_ultimate_keys (); ultimate_keys_queried = true; } + TRACEPOINT; } if (protocol == Protocol::CMS && decrypt && !m_decrypt_result.error() && @@ -516,6 +526,7 @@ ParseController::parse() if (opt.enable_debug & DBG_DATA) { std::stringstream ss; + TRACEPOINT; ss << m_decrypt_result << '\n' << m_verify_result; for (const auto sig: m_verify_result.signatures()) { commit 385ef5768e47903d5e15a4b711a82b6d2c7ec715 Author: Andre Heinecke Date: Mon Oct 8 18:01:09 2018 +0200 Tune down an error to an info * src/keycache.cpp (onUpdateJobDone): Tune down error to debug. -- This happens regularly enough if you switch quickly between two mails. diff --git a/src/keycache.cpp b/src/keycache.cpp index f0e635b..a414e98 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -715,7 +715,7 @@ public: if (it == m_update_jobs.end()) { - log_error ("%s:%s Update for \"%s\" already finished.", + log_debug ("%s:%s Update for \"%s\" already finished.", SRCNAME, __func__, anonstr (fpr)); gpgol_unlock (&update_lock); TRETURN; commit ce85a6ea230d742f6032bf23fab511e89c9b82fb Author: Andre Heinecke Date: Mon Oct 8 18:00:29 2018 +0200 Add new strings for config dialog debug page * src/addin-options.cpp (i18n_noops): Add new strings. diff --git a/src/addin-options.cpp b/src/addin-options.cpp index ac3cdc7..b42bfd8 100644 --- a/src/addin-options.cpp +++ b/src/addin-options.cpp @@ -137,7 +137,18 @@ i18n_noops[] = { warning is shown in line with the combo box to select the level. */ N_("Warning: Decreased performance. Huge logs!"), - + /* TRANSLATORS: Config dialog category for debug options. */ + N_("Debug"), + /* TRANSLATORS: Config dialog category for debug options. */ + N_("Configuaration of debug options"), + /* TRANSLATORS: Config dialog debug page, can be technical. */ + N_("Potential workarounds"), + /* TRANSLATORS: Config dialog debug page, can be technical. */ + N_("Block Outlook during encrypt / sign"), + /* TRANSLATORS: Config dialog debug page, can be technical. */ + N_("Block Outlook during decrypt / verify"), + /* TRANSLATORS: Config dialog debug page, link to report bug page. */ + N_("How to report a problem?"), }; ----------------------------------------------------------------------- Summary of changes: src/addin-options.cpp | 13 ++++++++++++- src/keycache.cpp | 2 +- src/parsecontroller.cpp | 13 ++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 9 10:04:30 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 09 Oct 2018 10:04:30 +0200 Subject: [git] gnupg-doc - branch, master, updated. 05b61018582e22978900e63c5cfd59a0136e46ec Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 05b61018582e22978900e63c5cfd59a0136e46ec (commit) from 914ddc7c26840628d70d59a2991f577d072b8523 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 05b61018582e22978900e63c5cfd59a0136e46ec Author: Werner Koch Date: Tue Oct 9 10:04:00 2018 +0200 web: Release info for gnupg 2.2.10 and gpgme 1.12.0 diff --git a/web/documentation/howtos.org b/web/documentation/howtos.org index 0df53a8..50ccdb1 100644 --- a/web/documentation/howtos.org +++ b/web/documentation/howtos.org @@ -60,6 +60,11 @@ This smartcard howto is also available in the [[../download/git.org][source repository]]. +** Web Key Directory Installation HOWTO + + We are working on a HOTWO for the Web Key Directory. For now + please consult the [[https://wiki.gnupg.org/WKD][Wiki]]. + ** GnuPG Keysigning Party HOWTO Once you get familiar with GnuPG's mechanisms, you surely wouldn't diff --git a/web/index.org b/web/index.org index aff93ea..5e57df4 100644 --- a/web/index.org +++ b/web/index.org @@ -65,6 +65,16 @@ The latest release news:\\ # GnuPG's latest news are available as [[http://feedvalidator.org/check.cgi?url%3Dhttps://www.gnupg.org/news.en.rss][RSS 2.0 compliant]] feed. Just # point or paste the [[news.en.rss][RSS file]] into your aggregator. +** GnuPG Made Easy 1.12.0 released (2018-10-08) + +[[file:software/gpgme/index.org][GPGME]] is a library that allows to add support for cryptography to a +program. {[[https://lists.gnupg.org/pipermail/gnupg-announce/2018q4/000429.html][more]]}. + +** GnuPG 2.2.10 released (2018-08-30) + +We are pleased to announce the availability of GnuPG version 2.2.10. +This is a maintenance release fixing a few problems. {[[https://lists.gnupg.org/pipermail/gnupg-announce/2018q3/000428.html][more]]} + ** GnuPG 2.2.9 released (2018-07-12) We are pleased to announce the availability of GnuPG version 2.2.9. ----------------------------------------------------------------------- Summary of changes: web/documentation/howtos.org | 5 +++++ web/index.org | 10 ++++++++++ 2 files changed, 15 insertions(+) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 9 10:49:42 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 09 Oct 2018 10:49:42 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-5-g85627e5 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 85627e58184529e982369cfc00ed7865244c13d6 (commit) via 7a1e6dbfb16f71f692a53f7e0955bde86dbb7fee (commit) via ecfa88e65fda9c9766ad526d57e2fc8b2884f634 (commit) via bf4aae45129c1093ee7712bdbcdfe1c8f2ca7c0f (commit) from 1c7f93fbc8d337f6c7e4ce7b30bf0a452ce5a931 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 85627e58184529e982369cfc00ed7865244c13d6 Author: Andre Heinecke Date: Wed Sep 12 09:42:09 2018 +0200 core: Add trust-model flag * src/context.h (gpgme_context): Extend with trust_model. * src/engine-gpg.c (engine_gpg): Extend with trust_model. (gpg_set_engine_flags): Take trust_model from context. (build_argv): Handle trust_model. (gpg_release): Free trust_model. * src/gpgme.c (gpgme_set_ctx_flag): Handle trust-model flag. (gpgme_release): Release trust-model. * doc/gpgme.texi: Document new flag for gpgme_set_ctx_flag. (Context Flags): New subsection for the context flags. * tests/run-keylist.c (show_usage, main): Add new --trust-model parameter. -- This gives a GPGME user fine grained control over the trust-model. Changing the trust model for only a single application depends on: GnuPG-Bug-Id: T4134 Maniphest Tasks: T4134 Differential Revision: https://dev.gnupg.org/D466 diff --git a/doc/gpgme.texi b/doc/gpgme.texi index d99e9bb..fc4840e 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -2444,6 +2444,7 @@ started. In fact, these references are accessed through the * Passphrase Callback:: Getting the passphrase from the user. * Progress Meter Callback:: Being informed about the progress. * Status Message Callback:: Status messages received from gpg. +* Context Flags:: Additional flags for a context. * Locale:: Setting the locale of a context. * Additional Logs:: Additional logs of a context. @end menu @@ -3030,6 +3031,10 @@ or @var{ctx} is not a valid pointer, @code{NULL} is returned in both variables. @end deftypefun + at node Context Flags + at subsection Context Flags + at cindex flags, of a context + @deftypefun {gpgme_error_t} gpgme_set_ctx_flag @ (@w{gpgme_ctx_t @var{ctx}}, @ @w{const char *@var{name}}, @ @@ -3131,6 +3136,20 @@ Requires at least GnuPG 2.1.18. Note: Keys retrieved through @code{auto-key-locate} are automatically imported in the keyring. + at item trust-model + at since{1.11.2} + +Change the trust-model for all GnuPG engine operations. An empty +string sets the trust-model back to the users default. If the +trust-model is not supported by GnuPG the behavior is undefined +and will likely cause all operations to fail. Example: "tofu+pgp". + +This options should be used carefully with a strict version +requirement. In some versions of GnuPG setting the +trust-model changes the default trust-model for future operations. +A change in the trust-model also can have unintended side effects, like +rebuilding the trust-db. + @end table This function returns @code{0} on success. diff --git a/src/context.h b/src/context.h index 1c9379b..d65bf9b 100644 --- a/src/context.h +++ b/src/context.h @@ -162,6 +162,9 @@ struct gpgme_context char *lc_ctype; char *lc_messages; + /* The optional trust-model override. */ + char *trust_model; + /* The operation data hooked into the context. */ ctx_op_data_t op_data; diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 2833374..aed933e 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -141,6 +141,7 @@ struct engine_gpg gpgme_pinentry_mode_t pinentry_mode; char request_origin[10]; char *auto_key_locate; + char *trust_model; struct { unsigned int no_symkey_cache : 1; @@ -455,6 +456,7 @@ gpg_release (void *engine) if (gpg->cmd.keyword) free (gpg->cmd.keyword); free (gpg->auto_key_locate); + free (gpg->trust_model); gpgme_data_release (gpg->override_session_key); gpgme_data_release (gpg->diagnostics); @@ -669,6 +671,14 @@ gpg_set_engine_flags (void *engine, const gpgme_ctx_t ctx) ctx->auto_key_locate, NULL); } + if (ctx->trust_model && strlen (ctx->trust_model)) + { + if (gpg->trust_model) + free (gpg->trust_model); + gpg->trust_model = _gpgme_strconcat ("--trust-model=", + ctx->trust_model, NULL); + } + gpg->flags.no_symkey_cache = (ctx->no_symkey_cache && have_gpg_version (gpg, "2.2.7")); gpg->flags.offline = (ctx->offline && have_gpg_version (gpg, "2.1.23")); @@ -981,6 +991,19 @@ build_argv (engine_gpg_t gpg, const char *pgmname) argc++; } + if (gpg->trust_model) + { + argv[argc] = strdup (gpg->trust_model); + if (!argv[argc]) + { + int saved_err = gpg_error_from_syserror (); + free (fd_data_map); + free_argv (argv); + return saved_err; + } + argc++; + } + if (gpg->flags.no_symkey_cache) { argv[argc] = strdup ("--no-symkey-cache"); diff --git a/src/gpgme.c b/src/gpgme.c index 2d829d9..3d72f69 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -250,6 +250,7 @@ gpgme_release (gpgme_ctx_t ctx) free (ctx->override_session_key); free (ctx->request_origin); free (ctx->auto_key_locate); + free (ctx->trust_model); _gpgme_engine_info_release (ctx->engine_info); ctx->engine_info = NULL; DESTROY_LOCK (ctx->lock); @@ -554,6 +555,13 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value) if (!ctx->auto_key_locate) err = gpg_error_from_syserror (); } + else if (!strcmp (name, "trust-model")) + { + free (ctx->trust_model); + ctx->trust_model = strdup (value); + if (!ctx->trust_model) + err = gpg_error_from_syserror (); + } else err = gpg_error (GPG_ERR_UNKNOWN_NAME); diff --git a/tests/run-keylist.c b/tests/run-keylist.c index 9206b50..08b671d 100644 --- a/tests/run-keylist.c +++ b/tests/run-keylist.c @@ -60,6 +60,7 @@ show_usage (int ex) " --from-file list all keys in the given file\n" " --from-wkd list key from a web key directory\n" " --require-gnupg required at least the given GnuPG version\n" + " --trust-model use the specified trust-model\n" , stderr); exit (ex); } @@ -104,6 +105,7 @@ main (int argc, char **argv) int from_file = 0; int from_wkd = 0; gpgme_data_t data = NULL; + char *trust_model = NULL; if (argc) @@ -208,6 +210,14 @@ main (int argc, char **argv) mode |= GPGME_KEYLIST_MODE_LOCATE; from_wkd = 1; } + else if (!strcmp (*argv, "--trust-model")) + { + argc--; argv++; + if (!argc) + show_usage (1); + trust_model = strdup (*argv); + argc--; argv++; + } else if (!strncmp (*argv, "--", 2)) show_usage (1); } @@ -227,6 +237,12 @@ main (int argc, char **argv) gpgme_set_offline (ctx, offline); + if (trust_model) + { + err = gpgme_set_ctx_flag (ctx, "trust-model", trust_model); + fail_if_err (err); + } + if (from_wkd) { err = gpgme_set_ctx_flag (ctx, "auto-key-locate", @@ -401,6 +417,8 @@ main (int argc, char **argv) for (keyidx=0; keyarray[keyidx]; keyidx++) gpgme_key_unref (keyarray[keyidx]); + free (trust_model); + gpgme_release (ctx); return 0; } commit 7a1e6dbfb16f71f692a53f7e0955bde86dbb7fee Author: Andre Heinecke Date: Tue Oct 9 10:47:16 2018 +0200 cpp: Initialize all gpgme_key_t's in context * lang/cpp/src/context.cpp (Context::startKeyListing), (Context::keyListResult, Context::signingKeys): Initialize key. -- "Should" not be neccessary but it's cleaner and would have covered the case of the previous commit. diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index 1e4e549..2892d8b 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -509,7 +509,7 @@ Error Context::startKeyListing(const char *patterns[], bool secretOnly) Key Context::nextKey(GpgME::Error &e) { d->lastop = Private::KeyList; - gpgme_key_t key; + gpgme_key_t key = nullptr; e = Error(d->lasterr = gpgme_op_keylist_next(d->ctx, &key)); return Key(key, false); } @@ -528,7 +528,7 @@ KeyListResult Context::keyListResult() const Key Context::key(const char *fingerprint, GpgME::Error &e , bool secret /*, bool forceUpdate*/) { d->lastop = Private::KeyList; - gpgme_key_t key; + gpgme_key_t key = nullptr; e = Error(d->lasterr = gpgme_get_key(d->ctx, fingerprint, &key, int(secret)/*, int( forceUpdate )*/)); return Key(key, false); } @@ -1067,7 +1067,7 @@ Key Context::signingKey(unsigned int idx) const std::vector Context::signingKeys() const { std::vector result; - gpgme_key_t key; + gpgme_key_t key = nullptr; for (unsigned int i = 0 ; (key = gpgme_signers_enum(d->ctx, i)) ; ++i) { result.push_back(Key(key, false)); } commit ecfa88e65fda9c9766ad526d57e2fc8b2884f634 Author: Andre Heinecke Date: Tue Oct 9 10:45:12 2018 +0200 core: Ensure r_key init in gpgme_get_key * src/keylist.c (gpgme_get_key): Move r_key init above the first invalid value check. -- This fixes the case where someone passes an unitialized r_key and no fingerprint. diff --git a/src/keylist.c b/src/keylist.c index 9c5bd4e..6fe256c 100644 --- a/src/keylist.c +++ b/src/keylist.c @@ -1266,11 +1266,12 @@ gpgme_get_key (gpgme_ctx_t ctx, const char *fpr, gpgme_key_t *r_key, TRACE_BEG2 (DEBUG_CTX, "gpgme_get_key", ctx, "fpr=%s, secret=%i", fpr, secret); + if (r_key) + *r_key = NULL; + if (!ctx || !r_key || !fpr) return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); - *r_key = NULL; - if (strlen (fpr) < 8) /* We have at least a key ID. */ return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); commit bf4aae45129c1093ee7712bdbcdfe1c8f2ca7c0f Author: Andre Heinecke Date: Tue Oct 9 09:37:28 2018 +0200 qt, tests: Add test for single get key * lang/qt/tests/t-keylist.cpp (testGetKey): New. -- Added this to check if there was a memleak in that function. diff --git a/lang/qt/tests/t-keylist.cpp b/lang/qt/tests/t-keylist.cpp index bf57ba7..21349c1 100644 --- a/lang/qt/tests/t-keylist.cpp +++ b/lang/qt/tests/t-keylist.cpp @@ -42,6 +42,10 @@ #include "qgpgmebackend.h" #include "keylistresult.h" +#include "context.h" + +#include + #include "t-support.h" using namespace QGpgME; @@ -72,6 +76,35 @@ private Q_SLOTS: QVERIFY (keys[0].subkeys()[1].publicKeyAlgorithm() == Subkey::AlgoELG_E); } + // This test can help with valgrind to check for memleaks when handling + // keys + void testGetKey() + { + GpgME::Key key; + { + auto ctx = std::unique_ptr (GpgME::Context::createForProtocol(GpgME::OpenPGP)); + ctx->setKeyListMode (GpgME::KeyListMode::Local | + GpgME::KeyListMode::Signatures | + GpgME::KeyListMode::Validate | + GpgME::KeyListMode::WithTofu); + GpgME::Error err; + key = ctx->key ("A0FF4590BB6122EDEF6E3C542D727CC768697734", err, false); + } + QVERIFY(key.primaryFingerprint()); + QVERIFY(!strcmp(key.primaryFingerprint(), "A0FF4590BB6122EDEF6E3C542D727CC768697734")); + { + auto ctx = std::unique_ptr (GpgME::Context::createForProtocol(GpgME::OpenPGP)); + ctx->setKeyListMode (GpgME::KeyListMode::Local | + GpgME::KeyListMode::Signatures | + GpgME::KeyListMode::Validate | + GpgME::KeyListMode::WithTofu); + GpgME::Error err; + key = ctx->key ("A0FF4590BB6122EDEF6E3C542D727CC768697734", err, false); + } + QVERIFY(key.primaryFingerprint()); + QVERIFY(!strcmp(key.primaryFingerprint(), "A0FF4590BB6122EDEF6E3C542D727CC768697734")); + } + void testPubkeyAlgoAsString() { static const QMap expected { ----------------------------------------------------------------------- Summary of changes: doc/gpgme.texi | 19 +++++++++++++++++++ lang/cpp/src/context.cpp | 6 +++--- lang/qt/tests/t-keylist.cpp | 33 +++++++++++++++++++++++++++++++++ src/context.h | 3 +++ src/engine-gpg.c | 23 +++++++++++++++++++++++ src/gpgme.c | 8 ++++++++ src/keylist.c | 5 +++-- tests/run-keylist.c | 18 ++++++++++++++++++ 8 files changed, 110 insertions(+), 5 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 9 11:26:48 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 09 Oct 2018 11:26:48 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-7-gc565cf4 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via c565cf42a38a8bda936df8c52936589cc8a06ca3 (commit) via 9f85f4967e617e9f97529b89f530c1bc36b52a5c (commit) from 85627e58184529e982369cfc00ed7865244c13d6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c565cf42a38a8bda936df8c52936589cc8a06ca3 Author: Andre Heinecke Date: Tue Oct 9 11:26:15 2018 +0200 cpp: Add KeyListMode::Locate * cpp/src/global.h (KeyListMode): Add Locate. -- Similar to locate in core. diff --git a/lang/cpp/src/global.h b/lang/cpp/src/global.h index 38cfd4c..e303c49 100644 --- a/lang/cpp/src/global.h +++ b/lang/cpp/src/global.h @@ -60,6 +60,7 @@ enum Engine { GpgEngine, GpgSMEngine, GpgConfEngine, UnknownEngine, AssuanEngine enum KeyListMode { Local = 0x1, Extern = 0x2, + Locate = 0x3, Signatures = 0x4, SignatureNotations = 0x8, Validate = 0x10, commit 9f85f4967e617e9f97529b89f530c1bc36b52a5c Author: Andre Heinecke Date: Tue Oct 9 11:24:18 2018 +0200 cpp: Add first manual tests * lang/cpp/Makefile.am: Add tests subdir. * lang/cpp/tests/Makefile.am: New. * lang/cpp/tests/README, lang/cpp/tests/run-getkey.cpp, lang/cpp/tests/run-keylist.cpp: New. * configure.ac: Configure tests makefile. -- The autotests for c++ live in lang/qt/tests these tests are more for manual experiments to validate some functionality. diff --git a/configure.ac b/configure.ac index 315b39a..0d90e2b 100644 --- a/configure.ac +++ b/configure.ac @@ -896,6 +896,7 @@ AC_CONFIG_FILES(Makefile src/Makefile src/gpgme.h) AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile) +AC_CONFIG_FILES(lang/cpp/tests/Makefile) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfigVersion.cmake) diff --git a/lang/cpp/Makefile.am b/lang/cpp/Makefile.am index 026ca00..acfa0f9 100644 --- a/lang/cpp/Makefile.am +++ b/lang/cpp/Makefile.am @@ -19,6 +19,6 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA -SUBDIRS = src +SUBDIRS = src tests EXTRA_DIST = README diff --git a/lang/cpp/tests/Makefile.am b/lang/cpp/tests/Makefile.am new file mode 100644 index 0000000..2b6e8fb --- /dev/null +++ b/lang/cpp/tests/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am - Makefile for GPGME Cpp tests. +# Copyright (C) 2018 Intevation GmbH +# +# This file is part of GPGME. +# +# GPGME is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# GPGME is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General +# Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, see . + +## Process this file with automake to produce Makefile.in + +AM_LDFLAGS = -no-install + +LDADD = ../../cpp/src/libgpgmepp.la \ + ../../../src/libgpgme.la @GPG_ERROR_LIBS@ \ + -lstdc++ + +AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \ + @GPG_ERROR_CFLAGS@ @GPG_ERROR_CFLAGS@ \ + @LIBASSUAN_CFLAGS@ -DBUILDING_GPGMEPP \ + -DTOP_SRCDIR="$(top_srcdir)" + +run_getkey_SOURCES = run-getkey.cpp +run_keylist_SOURCES = run-keylist.cpp + +noinst_PROGRAMS = run-getkey run-keylist diff --git a/lang/cpp/tests/README b/lang/cpp/tests/README new file mode 100644 index 0000000..ac74ab0 --- /dev/null +++ b/lang/cpp/tests/README @@ -0,0 +1,4 @@ +Tests for the C++ bindings. + +Most autotests for the C++ bindings use the QTest framework +and live in lang/qt/tests. diff --git a/lang/cpp/tests/run-getkey.cpp b/lang/cpp/tests/run-getkey.cpp new file mode 100644 index 0000000..35b15eb --- /dev/null +++ b/lang/cpp/tests/run-getkey.cpp @@ -0,0 +1,144 @@ +/* + run-getkey.cpp + + This file is part of GpgMEpp's test suite. + Copyright (c) 2018 Intevation GmbH + + QGpgME is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + QGpgME is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + In addition, as a special exception, the copyright holders give + permission to link the code of this program with any edition of + the Qt library by Trolltech AS, Norway (or with modified versions + of Qt that use the same license as Qt), and distribute linked + combinations including the two. You must obey the GNU General + Public License in all respects for all of the code used other than + Qt. If you modify this file, you may extend this exception to + your version of the file, but you are not obligated to do so. If + you do not wish to do so, delete this exception statement from + your version. +*/ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "context.h" +#include "key.h" + +#include +#include +#include + +using namespace GpgME; + +static int +show_usage (int ex) +{ + fputs ("usage: run-getkey [options] [keyIdOrFingerprint]\n\n" + "Options:\n" + " --verbose run in verbose mode\n" + " --openpgp use the OpenPGP protocol (default)\n" + " --cms use the CMS protocol\n" + " --secret list only secret keys\n" + " --with-secret list pubkeys with secret info filled\n" + " --local use GPGME_KEYLIST_MODE_LOCAL\n" + " --extern use GPGME_KEYLIST_MODE_EXTERN\n" + " --sigs use GPGME_KEYLIST_MODE_SIGS\n" + " --tofu use GPGME_KEYLIST_MODE_TOFU\n" + " --sig-notations use GPGME_KEYLIST_MODE_SIG_NOTATIONS\n" + " --ephemeral use GPGME_KEYLIST_MODE_EPHEMERAL\n" + " --validate use GPGME_KEYLIST_MODE_VALIDATE\n" + " --locate use GPGME_KEYLIST_MODE_LOCATE\n" + , stderr); + exit (ex); +} + +int +main (int argc, char **argv) +{ + int last_argc = -1; + Protocol protocol = OpenPGP; + unsigned int mode = 0; + bool only_secret = false; + + if (argc) { + argc--; argv++; + } + + while (argc && last_argc != argc ) { + last_argc = argc; + if (!strcmp (*argv, "--")) { + argc--; argv++; + break; + } else if (!strcmp (*argv, "--help")) { + show_usage (0); + } else if (!strcmp (*argv, "--openpgp")) { + protocol = OpenPGP; + argc--; argv++; + } else if (!strcmp (*argv, "--cms")) { + protocol = CMS; + argc--; argv++; + } else if (!strcmp (*argv, "--secret")) { + only_secret = true; + argc--; argv++; + } else if (!strcmp (*argv, "--local")) { + mode |= KeyListMode::Local; + argc--; argv++; + } else if (!strcmp (*argv, "--extern")) { + mode |= KeyListMode::Extern; + argc--; argv++; + }else if (!strcmp (*argv, "--tofu")) { + mode |= KeyListMode::WithTofu; + argc--; argv++; + } else if (!strcmp (*argv, "--sigs")) { + mode |= KeyListMode::Signatures; + argc--; argv++; + } else if (!strcmp (*argv, "--sig-notations")) { + mode |= KeyListMode::SignatureNotations; + argc--; argv++; + } else if (!strcmp (*argv, "--ephemeral")) { + mode |= KeyListMode::Ephemeral; + argc--; argv++; + } else if (!strcmp (*argv, "--validate")) { + mode |= KeyListMode::Validate; + argc--; argv++; + } else if (!strcmp (*argv, "--locate")) { + argc--; argv++; + mode |= KeyListMode::Locate; + } else if (!strncmp (*argv, "--", 2)) { + show_usage (1); + } + } + + if (argc != 1) { + show_usage (1); + } + + GpgME::initializeLibrary(); + auto ctx = std::unique_ptr (Context::createForProtocol(protocol)); + if (!ctx) { + std::cerr << "Failed to get Context"; + return -1; + } + ctx->setKeyListMode (mode); + Error err; + const GpgME::Key key = ctx->key (*argv, err, only_secret); + std::stringstream ss; + + ss << "Key " << key << " Err: " << err.asString() << "\n"; + + std::cout << ss.str(); + + return 0; +} diff --git a/lang/cpp/tests/run-keylist.cpp b/lang/cpp/tests/run-keylist.cpp new file mode 100644 index 0000000..5457739 --- /dev/null +++ b/lang/cpp/tests/run-keylist.cpp @@ -0,0 +1,151 @@ +/* + run-keylist.cpp + + This file is part of GpgMEpp's test suite. + Copyright (c) 2018 Intevation GmbH + + QGpgME is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + QGpgME is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + In addition, as a special exception, the copyright holders give + permission to link the code of this program with any edition of + the Qt library by Trolltech AS, Norway (or with modified versions + of Qt that use the same license as Qt), and distribute linked + combinations including the two. You must obey the GNU General + Public License in all respects for all of the code used other than + Qt. If you modify this file, you may extend this exception to + your version of the file, but you are not obligated to do so. If + you do not wish to do so, delete this exception statement from + your version. +*/ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "context.h" +#include "key.h" +#include "keylistresult.h" + +#include +#include +#include + +using namespace GpgME; + +static int +show_usage (int ex) +{ + fputs ("usage: run-keylist [options] [pattern]\n\n" + "Options:\n" + " --verbose run in verbose mode\n" + " --openpgp use the OpenPGP protocol (default)\n" + " --cms use the CMS protocol\n" + " --secret list only secret keys\n" + " --with-secret list pubkeys with secret info filled\n" + " --local use GPGME_KEYLIST_MODE_LOCAL\n" + " --extern use GPGME_KEYLIST_MODE_EXTERN\n" + " --sigs use GPGME_KEYLIST_MODE_SIGS\n" + " --tofu use GPGME_KEYLIST_MODE_TOFU\n" + " --sig-notations use GPGME_KEYLIST_MODE_SIG_NOTATIONS\n" + " --ephemeral use GPGME_KEYLIST_MODE_EPHEMERAL\n" + " --validate use GPGME_KEYLIST_MODE_VALIDATE\n" + " --locate use GPGME_KEYLIST_MODE_LOCATE\n" + , stderr); + exit (ex); +} + +int +main (int argc, char **argv) +{ + int last_argc = -1; + Protocol protocol = OpenPGP; + unsigned int mode = 0; + bool only_secret = false; + + if (argc) { + argc--; argv++; + } + + while (argc && last_argc != argc ) { + last_argc = argc; + if (!strcmp (*argv, "--")) { + argc--; argv++; + break; + } else if (!strcmp (*argv, "--help")) { + show_usage (0); + } else if (!strcmp (*argv, "--openpgp")) { + protocol = OpenPGP; + argc--; argv++; + } else if (!strcmp (*argv, "--cms")) { + protocol = CMS; + argc--; argv++; + } else if (!strcmp (*argv, "--secret")) { + only_secret = true; + argc--; argv++; + } else if (!strcmp (*argv, "--local")) { + mode |= KeyListMode::Local; + argc--; argv++; + } else if (!strcmp (*argv, "--extern")) { + mode |= KeyListMode::Extern; + argc--; argv++; + }else if (!strcmp (*argv, "--tofu")) { + mode |= KeyListMode::WithTofu; + argc--; argv++; + } else if (!strcmp (*argv, "--sigs")) { + mode |= KeyListMode::Signatures; + argc--; argv++; + } else if (!strcmp (*argv, "--sig-notations")) { + mode |= KeyListMode::SignatureNotations; + argc--; argv++; + } else if (!strcmp (*argv, "--ephemeral")) { + mode |= KeyListMode::Ephemeral; + argc--; argv++; + } else if (!strcmp (*argv, "--validate")) { + mode |= KeyListMode::Validate; + argc--; argv++; + } else if (!strcmp (*argv, "--locate")) { + argc--; argv++; + mode |= KeyListMode::Locate; + } else if (!strncmp (*argv, "--", 2)) { + show_usage (1); + } + } + + if (argc > 1) { + show_usage (1); + } + + GpgME::initializeLibrary(); + auto ctx = std::unique_ptr (Context::createForProtocol(protocol)); + if (!ctx) { + std::cerr << "Failed to get Context"; + return -1; + } + ctx->setKeyListMode (mode); + Error err = ctx->startKeyListing (*argv, only_secret); + if (err) { + std::cout << "Error: " << err.asString() << "\n"; + return -1; + } + GpgME::Key key; + std::stringstream ss; + do { + key = ctx->nextKey(err); + ss << key << "\n\n"; + } while (!err && !key.isNull()); + + std::cout << ss.str(); + + return 0; +} ----------------------------------------------------------------------- Summary of changes: configure.ac | 1 + lang/cpp/Makefile.am | 2 +- lang/cpp/src/global.h | 1 + {tests/opassuan => lang/cpp/tests}/Makefile.am | 25 ++-- lang/cpp/tests/README | 4 + lang/cpp/tests/run-getkey.cpp | 144 +++++++++++++++++++++++ lang/cpp/tests/run-keylist.cpp | 151 +++++++++++++++++++++++++ 7 files changed, 315 insertions(+), 13 deletions(-) copy {tests/opassuan => lang/cpp/tests}/Makefile.am (57%) create mode 100644 lang/cpp/tests/README create mode 100644 lang/cpp/tests/run-getkey.cpp create mode 100644 lang/cpp/tests/run-keylist.cpp hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 9 14:02:56 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 09 Oct 2018 14:02:56 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-79-g005910c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 005910cd90a86271c77816604ab4a1b8c88fc1fb (commit) from f00d5ecf8f538898cdfc5605d0f3e3a31282eb5f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 005910cd90a86271c77816604ab4a1b8c88fc1fb Author: Andre Heinecke Date: Tue Oct 9 13:58:23 2018 +0200 Import certs for s/mime autoresolve from keyserver * src/keycache.cpp (do_locate): Factor out S/MIME lookup. (get_extern_smime_keys): New. (get_local_smime_keys, get_most_valid_key_simple): Factored out from do_locate. -- This implements the feature that X509 Certificates are automatically searched and imported from the keyserver if they are not available locally or if all local certs are expired / revoked etc. GnuPG-Bug-Id: T4174 diff --git a/src/keycache.cpp b/src/keycache.cpp index a414e98..f885694 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -825,6 +825,109 @@ KeyCache::getEncryptionKeys (const std::vector &recipients, GpgME:: return d->getEncryptionKeys (recipients, proto); } +static GpgME::Key +get_most_valid_key_simple (const std::vector &keys) +{ + GpgME::Key candidate; + for (const auto &key: keys) + { + if (key.isRevoked() || key.isExpired() || + key.isDisabled() || key.isInvalid()) + { + log_debug ("%s:%s: Skipping invalid S/MIME key", + SRCNAME, __func__); + continue; + } + if (candidate.isNull() || !candidate.numUserIDs()) + { + if (key.numUserIDs() && + candidate.userID(0).validity() <= key.userID(0).validity()) + { + candidate = key; + } + } + } + return candidate; +} + +static std::vector +get_local_smime_keys (const std::string &addr) +{ + TSTART; + std::vector keys; + auto ctx = std::unique_ptr ( + GpgME::Context::createForProtocol (GpgME::CMS)); + if (!ctx) + { + TRACEPOINT; + TRETURN keys; + } + // We need to validate here to fetch CRL's + ctx->setKeyListMode (GpgME::KeyListMode::Local | + GpgME::KeyListMode::Validate | + GpgME::KeyListMode::Signatures); + GpgME::Error e = ctx->startKeyListing (addr.c_str()); + if (e) + { + TRACEPOINT; + TRETURN keys; + } + + GpgME::Error err; + do { + keys.push_back(ctx->nextKey(err)); + } while (!err); + keys.pop_back(); + + TRETURN keys; +} + +static std::vector +get_extern_smime_keys (const std::string &addr, bool import) +{ + TSTART; + std::vector keys; + auto ctx = std::unique_ptr ( + GpgME::Context::createForProtocol (GpgME::CMS)); + if (!ctx) + { + TRACEPOINT; + TRETURN keys; + } + // We need to validate here to fetch CRL's + ctx->setKeyListMode (GpgME::KeyListMode::Extern); + GpgME::Error e = ctx->startKeyListing (addr.c_str()); + if (e) + { + TRACEPOINT; + TRETURN keys; + } + + GpgME::Error err; + do + { + const auto key = ctx->nextKey (err); + if (!err && !key.isNull()) + { + keys.push_back (key); + log_debug ("%s:%s: Found extern S/MIME key for %s with fpr: %s", + SRCNAME, __func__, anonstr (addr.c_str()), + anonstr (key.primaryFingerprint())); + } + } while (!err); + + if (import && keys.size ()) + { + const GpgME::ImportResult res = ctx->importKeys(keys); + log_debug ("%s:%s: Import result for %s: err: %s", + SRCNAME, __func__, anonstr (addr.c_str()), + res.error ().asString ()); + + } + + TRETURN keys; +} + static DWORD WINAPI do_locate (LPVOID arg) { @@ -853,60 +956,40 @@ do_locate (LPVOID arg) if (opt.enable_smime) { - auto ctx = std::unique_ptr ( - GpgME::Context::createForProtocol (GpgME::CMS)); - if (!ctx) + GpgME::Key candidate = get_most_valid_key_simple ( + get_local_smime_keys (addr)); + if (!candidate.isNull()) { - TRACEPOINT; + log_debug ("%s:%s found SMIME key for addr: \"%s\":%s", + SRCNAME, __func__, anonstr (addr.c_str()), + anonstr (candidate.primaryFingerprint())); + KeyCache::instance()->setSmimeKey (addr, candidate); TRETURN 0; } - // We need to validate here to fetch CRL's - ctx->setKeyListMode (GpgME::KeyListMode::Local | - GpgME::KeyListMode::Validate | - GpgME::KeyListMode::Signatures); - GpgME::Error e = ctx->startKeyListing (addr.c_str()); - if (e) + /* Search for extern keys and import them */ + const auto externs = get_extern_smime_keys (addr, true); + if (externs.empty()) { - TRACEPOINT; TRETURN 0; } - - std::vector keys; - GpgME::Error err; - do { - keys.push_back(ctx->nextKey(err)); - } while (!err); - keys.pop_back(); - - GpgME::Key candidate; - for (const auto &key: keys) - { - if (key.isRevoked() || key.isExpired() || - key.isDisabled() || key.isInvalid()) - { - log_debug ("%s:%s: Skipping invalid S/MIME key", - SRCNAME, __func__); - continue; - } - if (candidate.isNull() || !candidate.numUserIDs()) - { - if (key.numUserIDs() && - candidate.userID(0).validity() <= key.userID(0).validity()) - { - candidate = key; - } - } - } + /* We found and imported external keys. We need to get them + locally now to ensure that they are valid etc. */ + candidate = get_most_valid_key_simple ( + get_local_smime_keys (addr)); if (!candidate.isNull()) { - log_debug ("%s:%s found SMIME key for addr: \"%s\":%s", + log_debug ("%s:%s found ext. SMIME key for addr: \"%s\":%s", SRCNAME, __func__, anonstr (addr.c_str()), anonstr (candidate.primaryFingerprint())); KeyCache::instance()->setSmimeKey (addr, candidate); + TRETURN 0; + } + else + { + log_debug ("%s:%s: Found no valid key in extern S/MIME certs", + SRCNAME, __func__); } } - log_debug ("%s:%s locator thread done", - SRCNAME, __func__); TRETURN 0; } ----------------------------------------------------------------------- Summary of changes: src/keycache.cpp | 165 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 124 insertions(+), 41 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 9 14:26:39 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 09 Oct 2018 14:26:39 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-80-g1b37aa0 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 1b37aa01cc67d942de06c882fd9d30d39866b111 (commit) from 005910cd90a86271c77816604ab4a1b8c88fc1fb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1b37aa01cc67d942de06c882fd9d30d39866b111 Author: Andre Heinecke Date: Tue Oct 9 14:23:26 2018 +0200 Make auto import from S/MIME keyserver default off * src/common_indep.h (opt.search_smime_servers): New. * src/main.c (read_options): Read it. * src/keycache.cpp (do_locate): Respect it. -- This also does not do an external search if there was an OpenPGP certificate found for the recipient and prefer_smime is not set. diff --git a/src/common_indep.h b/src/common_indep.h index 73910f4..fb693ef 100644 --- a/src/common_indep.h +++ b/src/common_indep.h @@ -204,6 +204,8 @@ struct int prefer_smime; /* S/MIME prefered when autoresolving */ int smime_html_warn_shown; /* Flag to save if unsigned smime warning was shown */ int autoretrieve; /* Use --auto-key-retrieve. */ + int search_smime_servers; /* Search for S/MIME keys on all configured S/MIME keyservers + for each new unknown mail */ /* The forms revision number of the binary. */ int forms_revision; diff --git a/src/keycache.cpp b/src/keycache.cpp index f885694..523ab31 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -953,6 +953,8 @@ do_locate (LPVOID arg) anonstr (k.primaryFingerprint())); KeyCache::instance ()->setPgpKey (addr, k); } + log_debug ("%s:%s pgp locate done", + SRCNAME, __func__); if (opt.enable_smime) { @@ -966,6 +968,12 @@ do_locate (LPVOID arg) KeyCache::instance()->setSmimeKey (addr, candidate); TRETURN 0; } + if (!opt.search_smime_servers || (!k.isNull() && !opt.prefer_smime)) + { + log_debug ("%s:%s Found no S/MIME key locally and external " + "search is disabled.", SRCNAME, __func__); + TRETURN 0; + } /* Search for extern keys and import them */ const auto externs = get_extern_smime_keys (addr, true); if (externs.empty()) diff --git a/src/main.c b/src/main.c index 73d8f04..50f5061 100644 --- a/src/main.c +++ b/src/main.c @@ -321,6 +321,7 @@ read_options (void) opt.automation = get_conf_bool ("automation", 1); opt.autosecure = get_conf_bool ("autosecure", 1); opt.autotrust = get_conf_bool ("autotrust", 0); + opt.search_smime_servers = get_conf_bool ("searchSmimeServers", 0); opt.smime_html_warn_shown = get_conf_bool ("smimeHtmlWarnShown", 0); if (!opt.automation) ----------------------------------------------------------------------- Summary of changes: src/common_indep.h | 2 ++ src/keycache.cpp | 8 ++++++++ src/main.c | 1 + 3 files changed, 11 insertions(+) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 10 03:16:42 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 10 Oct 2018 03:16:42 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-21-g6167f3c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 6167f3c461a4e53ccc5af620cdbfa28bfa9234f5 (commit) from f4f0da74f526d7e35cedbc2e93454df6440dbfa5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6167f3c461a4e53ccc5af620cdbfa28bfa9234f5 Author: NIIBE Yutaka Date: Wed Oct 10 10:14:26 2018 +0900 gpg-error-config: Add PKG_CONFIG_SYSROOT_DIR support. * src/gpg-error-config-new.in (sysroot): New function. (want_cflags, want_libs): Use sysroot. * src/gpg-error-config-test.sh: Test with PKG_CONFIG_SYSROOT_DIR. -- PKG_CONFIG_SYSROOT_DIR is for cross build. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in index 3b31a68..8bf92cf 100644 --- a/src/gpg-error-config-new.in +++ b/src/gpg-error-config-new.in @@ -395,6 +395,29 @@ all_required_config_files () { PKG_LIST=$(list_only_once $all_list) } +# +# Modify -I or -L by PKG_CONFIG_SYSROOT_DIR variable +# +sysroot () { + _opt="$1" + _result="" + shift + + while [ $# -gt 0 ]; do + if [ $1 = $_opt ]; then + _result="$_result${_result:+ }$_opt" + shift + _result="$_result $PKG_CONFIG_SYSROOT_DIR$1" + elif expr "$1" : "^$_opt" >/dev/null; then + _result="$_result${_result:+ }$_opt$PKG_CONFIG_SYSROOT_DIR$(expr "$1" : "^$_opt\(.*\)")" + else + _result="$_result${_result:+ }$1" + fi + shift + done + echo "$_result" +} + #### end of functions for this script myname=${0##*/} @@ -446,6 +469,13 @@ mtlibs="" delimiter=" " output="" +VAR_list=VAR_pc_sysrootdir +if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then + VAR_pc_sysrootdir="/" +else + VAR_pc_sysrootdir="$PKG_CONFIG_SYSROOT_DIR" +fi + while test $# -gt 0; do case $1 in --prefix) @@ -524,14 +554,14 @@ done if [ -z "$want_var" -a -z "$want_attr" ]; then if [ -n "$want_cflags" ]; then - output="$output${output:+ }$(list_only_once $cflags)" + output="$output${output:+ }$(sysroot -I $(list_only_once $cflags))" # Backward compatibility to old gpg-error-config if [ $mt = yes -a -n "$mtcflags" ]; then output="$output${output:+ }$mtcflags" fi fi if [ -n "$want_libs" ]; then - output="$output${output:+ }$(list_only_once_for_libs $libs)" + output="$output${output:+ }$(sysroot -L $(list_only_once_for_libs $libs))" # Backward compatibility to old gpg-error-config if [ $mt = yes -a -n "$mtlibs" ]; then output="$output${output:+ }$mtlibs" diff --git a/src/gpg-error-config-test.sh b/src/gpg-error-config-test.sh index 0501c8d..527e118 100755 --- a/src/gpg-error-config-test.sh +++ b/src/gpg-error-config-test.sh @@ -7,6 +7,8 @@ export PKG_CONFIG_PATH if [ "$1" = --old-new ]; then PKG_CONFIG_CMD=./gpg-error-config-old else + PKG_CONFIG_SYSROOT_DIR="/var/example-target" + export PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_CMD="pkg-config gpg-error" if ! $PKG_CONFIG_CMD --exists >/dev/null; then exit 77 # Skip tests ----------------------------------------------------------------------- Summary of changes: src/gpg-error-config-new.in | 34 ++++++++++++++++++++++++++++++++-- src/gpg-error-config-test.sh | 2 ++ 2 files changed, 34 insertions(+), 2 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 10 03:38:23 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 10 Oct 2018 03:38:23 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-22-g9f71b28 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 9f71b28dcb38e1d5d9001692e2f64009396aaf9b (commit) from 6167f3c461a4e53ccc5af620cdbfa28bfa9234f5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9f71b28dcb38e1d5d9001692e2f64009396aaf9b Author: NIIBE Yutaka Date: Wed Oct 10 10:32:18 2018 +0900 gpg-error-config: Fix the place of *.pc (for multilib). * src/Makefile.am (pkgconfigdir): It should be under libdir. * src/gpg-error-config-new.in: Likewise. -- Reported-by: Alon Bar-Lev Signed-off-by: NIIBE Yutaka diff --git a/src/Makefile.am b/src/Makefile.am index c74baae..03e0b68 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -88,7 +88,7 @@ nodist_bin_SCRIPTS = gpgrt-config m4datadir = $(datadir)/aclocal m4data_DATA = gpg-error.m4 gpgrt.m4 -pkgconfigdir = $(datadir)/pkgconfig +pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gpg-error.pc EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in index 8bf92cf..e16e753 100644 --- a/src/gpg-error-config-new.in +++ b/src/gpg-error-config-new.in @@ -11,9 +11,9 @@ # SPDX-License-Identifier: FSFULLR prefix=@prefix@ -datarootdir=@datarootdir@ -datadir=@datadir@ -PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}${datadir}/pkgconfig" +exec_prefix=@exec_prefix@ +libdir=@libdir@ +PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}${libdir}/pkgconfig" # #### start of functions for this script ----------------------------------------------------------------------- Summary of changes: src/Makefile.am | 2 +- src/gpg-error-config-new.in | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 10 06:48:38 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 10 Oct 2018 06:48:38 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-8-g85dd0fa Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 85dd0fa4b5f026a13da842bf64ab8a37a68918d4 (commit) from c565cf42a38a8bda936df8c52936589cc8a06ca3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 85dd0fa4b5f026a13da842bf64ab8a37a68918d4 Author: NIIBE Yutaka Date: Wed Oct 10 13:39:42 2018 +0900 build: Let configure create the VERSION file. * autogen.sh: Update from libgpg-error. * configure.ac: Use mym4_version to create VERSION file. * Makefile.am (dist-hook): Do not create VERSION. (EXTRA_DIST): Add VERSION. -- GnuPG-bug-id: 3283 Signed-off-by: NIIBE Yutaka diff --git a/.gitignore b/.gitignore index cef37ad..59ca6d2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /conf/config.h.in /conf/config.h /libtool +/VERSION Makefile.in Makefile stamp-h1 diff --git a/Makefile.am b/Makefile.am index 829cf14..1264618 100644 --- a/Makefile.am +++ b/Makefile.am @@ -35,7 +35,7 @@ DISTCHECK_CONFIGURE_FLAGS = EXTRA_DIST = autogen.sh autogen.rc gpgme.spec.in \ ChangeLog-2011 m4/ChangeLog-2011 contrib/ChangeLog-2011 \ - conf/whatisthis + conf/whatisthis VERSION if RUN_GPG_TESTS @@ -46,13 +46,11 @@ endif SUBDIRS = src ${tests} doc lang -# Fix the version of the spec file and create a file named VERSION -# to be used for patch's Prereq: feature. +# Fix the version of the spec file. dist-hook: gen-ChangeLog @set -e; \ sed -e 's/@pkg_version@/$(PACKAGE_VERSION)/g' \ $(top_srcdir)/gpgme.spec.in > $(distdir)/gpgme.spec - echo "$(PACKAGE_VERSION)" > $(distdir)/VERSION distcheck-hook: set -e; ( \ diff --git a/autogen.sh b/autogen.sh index e5ba5bf..9b36158 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #! /bin/sh # autogen.sh -# Copyright (C) 2003, 2014, 2017 g10 Code GmbH +# Copyright (C) 2003, 2014, 2017, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -15,7 +15,7 @@ # configure it for the respective package. It is maintained as part of # GnuPG and source copied by other packages. # -# Version: 2017-01-17 +# Version: 2018-07-10 configure_ac="configure.ac" @@ -74,7 +74,6 @@ PRINT_HOST=no PRINT_BUILD=no tmp=$(dirname "$0") tsdir=$(cd "${tmp}"; pwd) -version_parts=3 if [ -n "${AUTOGEN_SH_SILENT}" ]; then SILENT=" --silent" @@ -85,9 +84,10 @@ if test x"$1" = x"--help"; then echo " --silent Silent operation" echo " --force Pass --force to autoconf" echo " --find-version Helper for configure.ac" - echo " --build-TYPE Configure to cross build for TYPE" + echo " --git-build Run all commands to build from a Git" echo " --print-host Print only the host triplet" echo " --print-build Print only the build platform triplet" + echo " --build-TYPE Configure to cross build for TYPE" echo "" echo " ARGS are passed to configure in --build-TYPE mode." echo " Configuration for this script is expected in autogen.rc" @@ -159,6 +159,10 @@ case "$1" in SILENT=" --silent" shift ;; + --git-build) + myhost="git-build" + shift + ;; --build-w32) myhost="w32" shift @@ -187,6 +191,25 @@ esac die_p +# **** GIT BUILD **** +# This is a helper to build from git. +if [ "$myhost" = "git-build" ]; then + tmp="$(pwd)" + cd "$tsdir" || fatal "error cd-ing to $tsdir" + ./autogen.sh || fatal "error running ./autogen.sh" + cd "$tmp" || fatal "error cd-ing back to $tmp" + die_p + "$tsdir"/configure || fatal "error running $tsdir/configure" + die_p + make || fatal "error running make" + die_p + make check || fatal "error running male check" + die_p + exit 0 +fi +# **** end GIT BUILD **** + + # Source our configuration if [ -f "${tsdir}/autogen.rc" ]; then . "${tsdir}/autogen.rc" @@ -215,18 +238,15 @@ if [ "$myhost" = "find-version" ]; then exit 1 fi - case "$version_parts" in - 2) - matchstr1="$package-$major.[0-9]*" - matchstr2="$package-$major-base" - vers="$major.$minor" - ;; - *) - matchstr1="$package-$major.$minor.[0-9]*" - matchstr2="$package-$major.$minor-base" - vers="$major.$minor.$micro" - ;; - esac + if [ -z "$micro" ]; then + matchstr1="$package-$major.[0-9]*" + matchstr2="$package-$major-base" + vers="$major.$minor" + else + matchstr1="$package-$major.$minor.[0-9]*" + matchstr2="$package-$major.$minor-base" + vers="$major.$minor.$micro" + fi beta=no if [ -e .git ]; then @@ -467,6 +487,10 @@ EOF EOF $CP build-aux/git-hooks/commit-msg .git/hooks/commit-msg chmod +x .git/hooks/commit-msg + if [ x"${display_name}" != x ]; then + git config format.subjectPrefix "PATCH ${display_name}" + git config sendemail.to "${patches_to}" + fi fi fi diff --git a/configure.ac b/configure.ac index 0d90e2b..e0823f5 100644 --- a/configure.ac +++ b/configure.ac @@ -26,33 +26,29 @@ min_automake_version="1.14" # bump the version number immediately after the release and do another # commit and push so that the git magic is able to work. See below # for the LT versions. -m4_define(mym4_version_major, [1]) -m4_define(mym4_version_minor, [12]) -m4_define(mym4_version_micro, [1]) - -# Below is m4 magic to extract and compute the revision number, the -# decimalized short revision number, a beta version string, and a flag -# indicating a development version (mym4_isgit). Note that the m4 -# processing is done by autoconf and not during the configure run. -m4_define(mym4_version, - [mym4_version_major.mym4_version_minor.mym4_version_micro]) -m4_define([mym4_revision], - m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) -m4_define([mym4_revision_dec], - m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) -m4_define([mym4_betastring], - m4_esyscmd_s([git describe --match 'gpgme-[0-9].*[0-9]' --long|\ - awk -F- '$3!=0{print"-beta"$3}'])) -m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) -m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) - -AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org]) +m4_define([mym4_package],[gpgme]) +m4_define([mym4_major], [1]) +m4_define([mym4_minor], [12]) +m4_define([mym4_micro], [1]) + +# Below is m4 magic to extract and compute the git revision number, +# the decimalized short revision number, a beta version string and a +# flag indicating a development version (mym4_isbeta). Note that the +# m4 processing is done by autoconf and not during the configure run. +m4_define([mym4_verslist], m4_split(m4_esyscmd([./autogen.sh --find-version] \ + mym4_package mym4_major mym4_minor mym4_micro),[:])) +m4_define([mym4_isbeta], m4_argn(2, mym4_verslist)) +m4_define([mym4_version], m4_argn(4, mym4_verslist)) +m4_define([mym4_revision], m4_argn(7, mym4_verslist)) +m4_define([mym4_revision_dec], m4_argn(8, mym4_verslist)) +m4_esyscmd([echo ]mym4_version[>VERSION]) +AC_INIT([mym4_package],[mym4_version], [https://bugs.gnupg.org]) # LT Version numbers, remember to change them just *before* a release. # (Code changed: REVISION++) # (Interfaces added/removed/changed: CURRENT++, REVISION=0) # (Interfaces added: AGE++) -# (Interfaces removed/changed: AGE=0) +# (Interfaces removed: AGE=0) # LIBGPGME_LT_CURRENT=32 LIBGPGME_LT_AGE=21 @@ -68,6 +64,19 @@ LIBGPGMEPP_LT_REVISION=0 LIBQGPGME_LT_CURRENT=10 LIBQGPGME_LT_AGE=3 LIBQGPGME_LT_REVISION=2 +################################################ + +AC_SUBST(LIBGPGME_LT_CURRENT) +AC_SUBST(LIBGPGME_LT_AGE) +AC_SUBST(LIBGPGME_LT_REVISION) + +AC_SUBST(LIBGPGMEPP_LT_CURRENT) +AC_SUBST(LIBGPGMEPP_LT_AGE) +AC_SUBST(LIBGPGMEPP_LT_REVISION) + +AC_SUBST(LIBQGPGME_LT_CURRENT) +AC_SUBST(LIBQGPGME_LT_AGE) +AC_SUBST(LIBQGPGME_LT_REVISION) # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 @@ -78,12 +87,9 @@ NEED_LIBASSUAN_API=2 NEED_LIBASSUAN_VERSION=2.4.2 -PACKAGE=$PACKAGE_NAME -VERSION=$PACKAGE_VERSION - -VERSION_MAJOR=mym4_version_major -VERSION_MINOR=mym4_version_minor -VERSION_MICRO=mym4_version_micro +VERSION_MAJOR=mym4_major +VERSION_MINOR=mym4_minor +VERSION_MICRO=mym4_micro AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) @@ -114,25 +120,12 @@ AC_PROG_CXX # Note: A suitable gitlog-to-changelog script can be found in GnuPG master. AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog, [gitlog-to-changelog]) -AC_SUBST(LIBGPGME_LT_CURRENT) -AC_SUBST(LIBGPGME_LT_AGE) -AC_SUBST(LIBGPGME_LT_REVISION) -AC_SUBST(LIBGPGMEPP_LT_CURRENT) -AC_SUBST(LIBGPGMEPP_LT_AGE) -AC_SUBST(LIBGPGMEPP_LT_REVISION) -AC_SUBST(LIBQGPGME_LT_CURRENT) -AC_SUBST(LIBQGPGME_LT_AGE) -AC_SUBST(LIBQGPGME_LT_REVISION) - -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) AC_SUBST(VERSION_MAJOR) AC_SUBST(VERSION_MINOR) AC_SUBST(VERSION_MICRO) -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) -VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_version_major \ - mym4_version_minor mym4_version_micro) + +VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \ + mym4_minor mym4_micro) AC_SUBST(VERSION_NUMBER) # We need to compile and run a program on the build machine. A @@ -488,9 +481,11 @@ AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION", [GIT commit id revision used to build this package]) changequote(,)dnl -BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` +BUILD_VERSION=`echo "$PACKAGE_VERSION" | sed 's/\([0-9.]*\).*/\1./'` changequote([,])dnl -BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec" +BUILD_VERSION="${BUILD_VERSION}mym4_revision_dec" +BUILD_FILEVERSION=`echo "${BUILD_VERSION}" | tr . ,` +AC_SUBST(BUILD_VERSION) AC_SUBST(BUILD_FILEVERSION) AC_ARG_ENABLE([build-timestamp], ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + Makefile.am | 6 ++--- autogen.sh | 56 +++++++++++++++++++++++++++----------- configure.ac | 87 ++++++++++++++++++++++++++++-------------------------------- 4 files changed, 84 insertions(+), 66 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 10 11:47:25 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 10 Oct 2018 11:47:25 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-222-g150a33d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 150a33df41944d764621f037038683f3d605aa3f (commit) from b6275f3bda8edff34274c5b921508567f491ab9c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 150a33df41944d764621f037038683f3d605aa3f Author: Werner Koch Date: Wed Oct 10 11:46:16 2018 +0200 gpg: Don't take the a TOFU trust model from the trustdb, * g10/tdbio.c (tdbio_update_version_record): Never store a TOFU model. (create_version_record): Don't init as TOFU. (tdbio_db_matches_options): Don't indicate a change in case TOFU is stored in an old trustdb file. -- This change allows to switch between a tofu and pgp or tofu+pgp trust model without an auto rebuild of the trustdb. This also requires that the tofu trust model is requested on the command line. If TOFU will ever be the default we need to tweak the model detection via TM_AUTO by also looking into the TOFU data base, GnuPG-bug-id: 4134 diff --git a/doc/gpg.texi b/doc/gpg.texi index 843e91c..ba1df4b 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -1724,7 +1724,8 @@ Set what trust model GnuPG should follow. The models are: @opindex trust-model:auto Select the trust model depending on whatever the internal trust database says. This is the default model if such a database already - exists. + exists. Note that a tofu trust model is not considered here and + must be enabled explicitly. @end table @item --auto-key-locate @var{mechanisms} diff --git a/g10/tdbio.c b/g10/tdbio.c index fed0cf5..8f75306 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -562,6 +562,12 @@ tdbio_update_version_record (ctrl_t ctrl) { TRUSTREC rec; int rc; + int opt_tm; + + /* Never store a TOFU trust model in the trustdb. Use PGP instead. */ + opt_tm = opt.trust_model; + if (opt_tm == TM_TOFU || opt_tm == TM_TOFU_PGP) + opt_tm = TM_PGP; memset (&rec, 0, sizeof rec); @@ -572,7 +578,7 @@ tdbio_update_version_record (ctrl_t ctrl) rec.r.ver.marginals = opt.marginals_needed; rec.r.ver.completes = opt.completes_needed; rec.r.ver.cert_depth = opt.max_cert_depth; - rec.r.ver.trust_model = opt.trust_model; + rec.r.ver.trust_model = opt_tm; rec.r.ver.min_cert_level = opt.min_cert_level; rc = tdbio_write_record (ctrl, &rec); } @@ -591,6 +597,12 @@ create_version_record (ctrl_t ctrl) { TRUSTREC rec; int rc; + int opt_tm; + + /* Never store a TOFU trust model in the trustdb. Use PGP instead. */ + opt_tm = opt.trust_model; + if (opt_tm == TM_TOFU || opt_tm == TM_TOFU_PGP) + opt_tm = TM_PGP; memset (&rec, 0, sizeof rec); rec.r.ver.version = 3; @@ -598,8 +610,8 @@ create_version_record (ctrl_t ctrl) rec.r.ver.marginals = opt.marginals_needed; rec.r.ver.completes = opt.completes_needed; rec.r.ver.cert_depth = opt.max_cert_depth; - if (opt.trust_model == TM_PGP || opt.trust_model == TM_CLASSIC) - rec.r.ver.trust_model = opt.trust_model; + if (opt_tm == TM_PGP || opt_tm == TM_CLASSIC) + rec.r.ver.trust_model = opt_tm; else rec.r.ver.trust_model = TM_PGP; rec.r.ver.min_cert_level = opt.min_cert_level; @@ -883,16 +895,25 @@ tdbio_db_matches_options() { TRUSTREC vr; int rc; + int opt_tm, tm; rc = tdbio_read_record (0, &vr, RECTYPE_VER); if( rc ) log_fatal( _("%s: error reading version record: %s\n"), db_name, gpg_strerror (rc) ); + /* Consider tofu and pgp the same. */ + tm = vr.r.ver.trust_model; + if (tm == TM_TOFU || tm == TM_TOFU_PGP) + tm = TM_PGP; + opt_tm = opt.trust_model; + if (opt_tm == TM_TOFU || opt_tm == TM_TOFU_PGP) + opt_tm = TM_PGP; + yes_no = vr.r.ver.marginals == opt.marginals_needed && vr.r.ver.completes == opt.completes_needed && vr.r.ver.cert_depth == opt.max_cert_depth - && vr.r.ver.trust_model == opt.trust_model + && tm == opt_tm && vr.r.ver.min_cert_level == opt.min_cert_level; } ----------------------------------------------------------------------- Summary of changes: doc/gpg.texi | 3 ++- g10/tdbio.c | 29 +++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 5 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 10 19:15:24 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 10 Oct 2018 19:15:24 +0200 Subject: [git] gnupg-doc - branch, master, updated. b0a7e26f768492122691f819ec4530c512f8baa5 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via b0a7e26f768492122691f819ec4530c512f8baa5 (commit) from 05b61018582e22978900e63c5cfd59a0136e46ec (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b0a7e26f768492122691f819ec4530c512f8baa5 Author: Werner Koch Date: Wed Oct 10 19:14:44 2018 +0200 web: Add BSI PR for EasyGPG diff --git a/web/documentation/pressreview.org b/web/documentation/pressreview.org index 612f5b5..6d7cca8 100644 --- a/web/documentation/pressreview.org +++ b/web/documentation/pressreview.org @@ -109,6 +109,13 @@ Here are articles originally published in English. Here are articles originally published in German. +** BSI, 2018-09-27 + + BSI-Projekt "EasyGPG": E-Mail Verschl?sselung vereinfachen + + [[https://www.bsi.bund.de/DE/Themen/Kryptografie_Kryptotechnologie/Kryptografie/EasyGPG/EasyGPG.html][Artikel]] + + ** Heise, 2017-06-06 Neue Crowdfunding-Runde f?r GnuPG-Entwicklung\\ Christiane Schulzki-Haddouti ----------------------------------------------------------------------- Summary of changes: web/documentation/pressreview.org | 7 +++++++ 1 file changed, 7 insertions(+) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 11 08:46:18 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 11 Oct 2018 08:46:18 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-224-g7a5a4c4 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 7a5a4c4cac8709f7c413e94cd0b40f4123baa1e5 (commit) via 827529339a4854886dbb5625238e7e01013efdcd (commit) from 150a33df41944d764621f037038683f3d605aa3f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7a5a4c4cac8709f7c413e94cd0b40f4123baa1e5 Author: NIIBE Yutaka Date: Thu Oct 11 15:41:49 2018 +0900 scd: Support "acknowledge button" feature. * scd/apdu.c (set_prompt_cb): New member function. (set_prompt_cb_ccid_reader): New function. (open_ccid_reader): Initialize with set_prompt_cb_ccid_reader. (apdu_set_prompt_cb): New. * scd/app.c (lock_app, unlock_app): Add call to apdu_set_prompt_cb. * ccid-driver.c (ccid_set_prompt_cb): New. (bulk_in): Call ->prompt_cb when timer extension. * scd/command.c (popup_prompt): New. Signed-off-by: NIIBE Yutaka diff --git a/scd/apdu.c b/scd/apdu.c index ce7f41f..c0b1bbe 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -105,6 +105,7 @@ struct reader_table_s { int (*check_pinpad)(int, int, pininfo_t *); void (*dump_status_reader)(int); int (*set_progress_cb)(int, gcry_handler_progress_t, void*); + int (*set_prompt_cb)(int, void (*) (void *, int), void*); int (*pinpad_verify)(int, int, int, int, int, pininfo_t *); int (*pinpad_modify)(int, int, int, int, int, pininfo_t *); @@ -444,6 +445,7 @@ new_reader_slot (void) reader_table[reader].check_pinpad = check_pcsc_pinpad; reader_table[reader].dump_status_reader = NULL; reader_table[reader].set_progress_cb = NULL; + reader_table[reader].set_prompt_cb = NULL; reader_table[reader].pinpad_verify = pcsc_pinpad_verify; reader_table[reader].pinpad_modify = pcsc_pinpad_modify; @@ -1404,6 +1406,14 @@ set_progress_cb_ccid_reader (int slot, gcry_handler_progress_t cb, void *cb_arg) return ccid_set_progress_cb (slotp->ccid.handle, cb, cb_arg); } +static int +set_prompt_cb_ccid_reader (int slot, void (*cb) (void *, int ), void *cb_arg) +{ + reader_table_t slotp = reader_table + slot; + + return ccid_set_prompt_cb (slotp->ccid.handle, cb, cb_arg); +} + static int get_status_ccid (int slot, unsigned int *status, int on_wire) @@ -1543,6 +1553,7 @@ open_ccid_reader (struct dev_list *dl) reader_table[slot].check_pinpad = check_ccid_pinpad; reader_table[slot].dump_status_reader = dump_ccid_reader_status; reader_table[slot].set_progress_cb = set_progress_cb_ccid_reader; + reader_table[slot].set_prompt_cb = set_prompt_cb_ccid_reader; reader_table[slot].pinpad_verify = ccid_pinpad_operation; reader_table[slot].pinpad_modify = ccid_pinpad_operation; /* Our CCID reader code does not support T=0 at all, thus reset the @@ -2382,6 +2393,29 @@ apdu_set_progress_cb (int slot, gcry_handler_progress_t cb, void *cb_arg) } +int +apdu_set_prompt_cb (int slot, void (*cb) (void *, int), void *cb_arg) +{ + int sw; + + if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) + return SW_HOST_NO_DRIVER; + + if (reader_table[slot].set_prompt_cb) + { + sw = lock_slot (slot); + if (!sw) + { + sw = reader_table[slot].set_prompt_cb (slot, cb, cb_arg); + unlock_slot (slot); + } + } + else + sw = 0; + return sw; +} + + /* Do a reset for the card in reader at SLOT. */ int apdu_reset (int slot) diff --git a/scd/apdu.h b/scd/apdu.h index 8a0d4bd..8621ddc 100644 --- a/scd/apdu.h +++ b/scd/apdu.h @@ -117,6 +117,7 @@ int apdu_connect (int slot); int apdu_disconnect (int slot); int apdu_set_progress_cb (int slot, gcry_handler_progress_t cb, void *cb_arg); +int apdu_set_prompt_cb (int slot, void (*cb) (void *, int), void *cb_arg); int apdu_reset (int slot); int apdu_get_status (int slot, int hang, unsigned int *status); diff --git a/scd/app.c b/scd/app.c index f3f1205..a82db26 100644 --- a/scd/app.c +++ b/scd/app.c @@ -67,6 +67,7 @@ lock_app (app_t app, ctrl_t ctrl) } apdu_set_progress_cb (app->slot, print_progress_line, ctrl); + apdu_set_prompt_cb (app->slot, popup_prompt, ctrl); return 0; } @@ -76,6 +77,7 @@ static void unlock_app (app_t app) { apdu_set_progress_cb (app->slot, NULL, NULL); + apdu_set_prompt_cb (app->slot, NULL, NULL); if (npth_mutex_unlock (&app->lock)) { diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index ae40f01..6b0833b 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -255,6 +255,9 @@ struct ccid_driver_s void (*progress_cb)(void *, const char *, int, int, int); void *progress_cb_arg; + void (*prompt_cb)(void *, int); + void *prompt_cb_arg; + unsigned char intr_buf[64]; struct libusb_transfer *transfer; }; @@ -1802,6 +1805,19 @@ ccid_set_progress_cb (ccid_driver_t handle, } +int +ccid_set_prompt_cb (ccid_driver_t handle, + void (*cb)(void *, int), void *cb_arg) +{ + if (!handle) + return CCID_DRIVER_ERR_INV_VALUE; + + handle->prompt_cb = cb; + handle->prompt_cb_arg = cb_arg; + return 0; +} + + /* Close the reader HANDLE. */ int ccid_close_reader (ccid_driver_t handle) @@ -1930,6 +1946,7 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length, { int rc; int msglen; + int notified = 0; /* Fixme: The next line for the current Valgrind without support for USB IOCTLs. */ @@ -1982,14 +1999,25 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length, we got the expected message type. This is in particular required for the Cherry keyboard which sends a time extension request for each key hit. */ - if ( !(buffer[7] & 0x03) && (buffer[7] & 0xC0) == 0x80) + if (!(buffer[7] & 0x03) && (buffer[7] & 0xC0) == 0x80) { /* Card present and active, time extension requested. */ DEBUGOUT_2 ("time extension requested (%02X,%02X)\n", buffer[7], buffer[8]); + + /* Gnuk enhancement to prompt user input by ack button */ + if (buffer[8] == 0xff && !notified) + { + notified = 1; + handle->prompt_cb (handle->prompt_cb_arg, 1); + } + goto retry; } + if (notified) + handle->prompt_cb (handle->prompt_cb_arg, 0); + if (buffer[0] != expected_type && buffer[0] != RDR_to_PC_SlotStatus) { DEBUGOUT_1 ("unexpected bulk-in msg type (%02x)\n", buffer[0]); diff --git a/scd/ccid-driver.h b/scd/ccid-driver.h index c31c25f..1550b3e 100644 --- a/scd/ccid-driver.h +++ b/scd/ccid-driver.h @@ -126,6 +126,8 @@ int ccid_open_reader (const char *spec_reader_name, int ccid_set_progress_cb (ccid_driver_t handle, void (*cb)(void *, const char *, int, int, int), void *cb_arg); +int ccid_set_prompt_cb (ccid_driver_t handle, void (*cb)(void *, int), + void *cb_arg); int ccid_shutdown_reader (ccid_driver_t handle); int ccid_close_reader (ccid_driver_t handle); int ccid_get_atr (ccid_driver_t handle, diff --git a/scd/command.c b/scd/command.c index 66d9fb9..0a96546 100644 --- a/scd/command.c +++ b/scd/command.c @@ -1898,6 +1898,34 @@ send_status_direct (ctrl_t ctrl, const char *keyword, const char *args) } +void +popup_prompt (void *opaque, int on) +{ + ctrl_t ctrl = opaque; + + if (ctrl) + { + assuan_context_t ctx = ctrl->server_local->assuan_ctx; + + if (ctx) + { + const char *cmd; + gpg_error_t err; + unsigned char *value; + size_t valuelen; + + if (on) + cmd = "POPUPPINPADPROMPT --ack"; + else + cmd = "DISMISSPINPADPROMPT"; + err = assuan_inquire (ctx, cmd, &value, &valuelen, 100); + if (!err) + xfree (value); + } + } +} + + /* Helper to send the clients a status change notification. */ void send_client_notifications (app_t app, int removal) diff --git a/scd/scdaemon.h b/scd/scdaemon.h index 4797f3d..238e6a8 100644 --- a/scd/scdaemon.h +++ b/scd/scdaemon.h @@ -123,6 +123,7 @@ int scd_command_handler (ctrl_t, int); void send_status_info (ctrl_t ctrl, const char *keyword, ...) GPGRT_ATTR_SENTINEL(1); void send_status_direct (ctrl_t ctrl, const char *keyword, const char *args); +void popup_prompt (void *opaque, int on); void send_client_notifications (app_t app, int removal); void scd_kick_the_loop (void); int get_active_connection_count (void); commit 827529339a4854886dbb5625238e7e01013efdcd Author: NIIBE Yutaka Date: Thu Oct 11 13:37:24 2018 +0900 agent: Support --ack option for POPUPPINPADPROMPT. * agent/divert-scd.c (getpin_cb): Support --ack option. -- We are now introducing "acknowledge button" feature to scdaemon, so that we can support OpenPGPcard User Interaction Flag. We will (re)use the mechanism of POPUPPINPADPROMPT for this. Perhaps, we will change the name of POPUPPINPADPROMPT, since it will be no longer for PINPAD only. Signed-off-by: NIIBE Yutaka diff --git a/agent/divert-scd.c b/agent/divert-scd.c index b85b490..ad9b9ee 100644 --- a/agent/divert-scd.c +++ b/agent/divert-scd.c @@ -276,7 +276,7 @@ getpin_cb (void *opaque, const char *desc_text, const char *info, } else if (maxbuf == 1) /* Open the pinentry. */ { - if (info) + if (info && strcmp (info, "--ack") != 0) { char *desc, *desc2; ----------------------------------------------------------------------- Summary of changes: agent/divert-scd.c | 2 +- scd/apdu.c | 34 ++++++++++++++++++++++++++++++++++ scd/apdu.h | 1 + scd/app.c | 2 ++ scd/ccid-driver.c | 30 +++++++++++++++++++++++++++++- scd/ccid-driver.h | 2 ++ scd/command.c | 28 ++++++++++++++++++++++++++++ scd/scdaemon.h | 1 + 8 files changed, 98 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 11 15:07:27 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 11 Oct 2018 15:07:27 +0200 Subject: [git] gnupg-doc - branch, master, updated. 89c22291b1bb15e4ba5808070fda0ac7fadcd227 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 89c22291b1bb15e4ba5808070fda0ac7fadcd227 (commit) from b0a7e26f768492122691f819ec4530c512f8baa5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 89c22291b1bb15e4ba5808070fda0ac7fadcd227 Author: Werner Koch Date: Thu Oct 11 15:07:24 2018 +0200 verein: Add contact info diff --git a/web/verein/index.org b/web/verein/index.org index 8569107..e6e52d7 100644 --- a/web/verein/index.org +++ b/web/verein/index.org @@ -29,4 +29,14 @@ Gollowitzer (vice-chair) and Andre Heinecke (treasurer). [German] - [[https://gnupg.org/ftp/verein/beitragsordnung.en.pdf][Membership fee regulations (English)]] [[https://gnupg.org/ftp/verein/beitragsordnung.de.pdf][(German)]] + +** Contact + +Members of the Verein should be subscribed to the Verein's mailing +list and that is the preferred way for communication. + +For other questions you may either write to the board or the office. +That is {[[https://gnupg.org/.well-known/openpgpkey/hu/u41619jxjyqiejhoftu6ks1w7o5zht5b][board]]|[[https://gnupg.org/.well-known/openpgpkey/hu/h3b8ei4jx9oxj6j4qc4preb5tam67ys9][office]]} at gnupg.org. Keys are available via the web +key directory or by using the provided direct links. + # eof ----------------------------------------------------------------------- Summary of changes: web/verein/index.org | 10 ++++++++++ 1 file changed, 10 insertions(+) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 12 04:55:47 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 12 Oct 2018 04:55:47 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-225-g4ed941f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 4ed941ff26783c4fabfe2079029f8e436eb7e340 (commit) from 7a5a4c4cac8709f7c413e94cd0b40f4123baa1e5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4ed941ff26783c4fabfe2079029f8e436eb7e340 Author: NIIBE Yutaka Date: Fri Oct 12 11:36:59 2018 +0900 agent: Fix message for ACK button. * agent/divert-scd.c (getpin_cb): Display correct message. Signed-off-by: NIIBE Yutaka diff --git a/agent/divert-scd.c b/agent/divert-scd.c index ad9b9ee..baa1cc3 100644 --- a/agent/divert-scd.c +++ b/agent/divert-scd.c @@ -276,27 +276,49 @@ getpin_cb (void *opaque, const char *desc_text, const char *info, } else if (maxbuf == 1) /* Open the pinentry. */ { - if (info && strcmp (info, "--ack") != 0) + if (info) { - char *desc, *desc2; + char *desc; + const char *desc2; - if ( asprintf (&desc, - L_("%s%%0A%%0AUse the reader's pinpad for input."), - info) < 0 ) - rc = gpg_error_from_syserror (); + if (!strcmp (info, "--ack")) + { + desc2 = L_("Push ACK button on card/token."); + + if (desc_text) + { + desc = strconcat (desc_text, + has_percent0A_suffix (desc_text) + ? "%0A" : "%0A%0A", + desc2, NULL); + desc2 = NULL; + } + else + desc = NULL; + } else { - /* Prepend DESC_TEXT to INFO. */ + desc2 = NULL; + if (desc_text) - desc2 = strconcat (desc_text, - has_percent0A_suffix (desc_text) - ? "%0A" : "%0A%0A", - desc, NULL); + desc = strconcat (desc_text, + has_percent0A_suffix (desc_text) + ? "%0A" : "%0A%0A", + info, "%0A%0A", + L_("Use the reader's pinpad for input."), + NULL); else - desc2 = NULL; + desc = strconcat (info, "%0A%0A", + L_("Use the reader's pinpad for input."), + NULL); + } + + if (!desc2 && !desc) + rc = gpg_error_from_syserror (); + else + { rc = agent_popup_message_start (ctrl, desc2? desc2:desc, NULL); - xfree (desc2); xfree (desc); } } ----------------------------------------------------------------------- Summary of changes: agent/divert-scd.c | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 12 09:02:28 2018 From: cvs at cvs.gnupg.org (by Guillaume LE VAILLANT) Date: Fri, 12 Oct 2018 09:02:28 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-10-g85d7af8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 85d7af8ff2f6afd63701079e23f31be08d58a15d (commit) via aafadb859497aa8785b7e19f267f1bfd8acfc062 (commit) from 85dd0fa4b5f026a13da842bf64ab8a37a68918d4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 85d7af8ff2f6afd63701079e23f31be08d58a15d Author: Guillaume LE VAILLANT Date: Fri Oct 12 08:49:26 2018 +0200 cl: Several fixes -- * Use wrapper types calling translation functions instead of TRANSLATE-{FROM,TO}-FOREIGN methods as they seem not to be called in some cases. * Use the (:STRUCT SOME-C-STRUCT) notation instead of the deprecated direct reference to SOME-C-STRUCT. * Add missing values in enums and bit fields. * Use cffi-grovel to define system types (SIZE-T, OFF-T, etc). * Wrap GPGME-DATA-T in a class (like contexts). * Use the FINALIZE function from trivial-garbage to free the C objects for contexts, keys and data automatically. * Make DATA-READ-CB and DATA-WRITE-CB run faster. * Update the README file. Signed-off-by: Guillaume LE VAILLANT diff --git a/lang/cl/Makefile.am b/lang/cl/Makefile.am index 553926e..dee0711 100644 --- a/lang/cl/Makefile.am +++ b/lang/cl/Makefile.am @@ -18,7 +18,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA -clfiles = gpgme.asd gpgme-package.lisp gpgme.lisp +clfiles = gpgme.asd gpgme-package.lisp gpgme-grovel.lisp gpgme.lisp # FIXME: Should be configurable. clfilesdir = $(datadir)/common-lisp/source/gpgme diff --git a/lang/cl/README b/lang/cl/README index b4a3c81..7d8e87d 100644 --- a/lang/cl/README +++ b/lang/cl/README @@ -3,33 +3,50 @@ Common Lisp Support for GPGME Requirements: -ASDF Packaging Support -CFFI Foreign Function Interface -gpg-error GPG Error Codes +ASDF Packaging Support +CFFI Foreign Function Interface +trivial-garbage Finalizers +gpg-error GPG Error Codes Use with: -> (asdf:operate 'asdf:load-op ':gpgme) +> (asdf:load-system "gpgme") Examples -------- -(with-open-file (stream "/tmp/myout" :direction :output - :if-exists :supersede :element-type '(unsigned-byte 8)) +(with-open-file (out "/tmp/myout" + :direction :output + :if-exists :supersede + :element-type '(unsigned-byte 8)) (with-context (ctx) - (setf (armor-p ctx) t) + (setf (armorp ctx) t) (op-export ctx "DEADBEEF" out))) (with-context (ctx) (with-output-to-string (out) - (setf (armor-p ctx) t) + (setf (armorp ctx) t) (op-export ctx "McTester" out))) (gpgme:with-context (ctx :armor t) (with-output-to-string (out) (gpgme:op-export ctx "McTester" out))) +(gpgme:with-context (ctx :armor t) + (let ((recipient1 (gpgme:get-key ctx "DEADBEEF")) + (recipient2 (gpgme:get-key ctx "Alice")) + (message "Hello, world!")) + (with-output-to-string (out) + (with-input-from-string (in message) + (gpgme:op-encrypt ctx (vector recipient1 recipient2) in out))))) + +(gpgme:with-context (ctx :armor t) + (let ((message "Hello, world!")) + (with-output-to-string (out) + (with-input-from-string (in message) + (gpgme:op-sign ctx in out))))) + TODO ---- diff --git a/lang/cl/gpgme-package.lisp b/lang/cl/gpgme-package.lisp index 239d57f..25e01a8 100644 --- a/lang/cl/gpgme-package.lisp +++ b/lang/cl/gpgme-package.lisp @@ -26,7 +26,8 @@ (defpackage #:gpgme (:use #:common-lisp #:cffi #:gpg-error) - + (:import-from #:trivial-garbage + #:finalize) (:export #:check-version #:*version* #:context diff --git a/lang/cl/gpgme.asd.in b/lang/cl/gpgme.asd.in index 86e8d51..6c5bd1f 100644 --- a/lang/cl/gpgme.asd.in +++ b/lang/cl/gpgme.asd.in @@ -25,11 +25,14 @@ (in-package #:gpgme-system) (defsystem gpgme - :description "GnuPG Made Easy." - :author "g10 Code GmbH" - :version "@VERSION@" - :licence "GPL" - :depends-on ("cffi" "gpg-error") - :components ((:file "gpgme-package") - (:file "gpgme" - :depends-on ("gpgme-package")))) + :description "GnuPG Made Easy." + :author "g10 Code GmbH" + :version "@VERSION@" + :licence "GPL" + :defsystem-depends-on ("cffi-grovel") + :depends-on ("cffi" "gpg-error" "trivial-garbage") + :components ((:file "gpgme-package") + (:cffi-grovel-file "gpgme-grovel" + :depends-on ("gpgme-package")) + (:file "gpgme" + :depends-on ("gpgme-package" "gpgme-grovel")))) diff --git a/lang/cl/gpgme.lisp b/lang/cl/gpgme.lisp index 74cb9ed..b1a38ca 100644 --- a/lang/cl/gpgme.lisp +++ b/lang/cl/gpgme.lisp @@ -24,6 +24,12 @@ (in-package :gpgme) +(deftype byte-array () + '(simple-array (unsigned-byte 8) (*))) + +(deftype character-array () + '(simple-array character (*))) + ;;; Debugging. (defvar *debug* nil "If debugging output should be given or not.") @@ -38,23 +44,15 @@ ;;; System dependencies. -; FIXME: Use cffi-grovel? cffi-unix? - -(defctype size-t :unsigned-int "The system size_t type.") - -(defctype ssize-t :int "The system ssize_t type.") - -; FIXME: Ouch. Grovel? Helper function? -(defconstant +seek-set+ 0) -(defconstant +seek-cur+ 1) -(defconstant +seek-end+ 2) -(defctype off-t :long-long "The system off_t type.") - +; Access to ERRNO. (defcfun ("strerror" c-strerror) :string (err :int)) -; Access to ERRNO. -; FIXME: Ouch. Should be grovel + helper function. +(defun get-errno () + *errno*) + +(defun set-errno (errno) + (setf *errno* errno)) (define-condition system-error (error) ((errno :initarg :errno :reader system-error-errno)) @@ -64,14 +62,6 @@ (c-strerror (system-error-errno c))))) (:documentation "Signalled when an errno is encountered.")) -(defconstant +ebadf+ 1) - -; Ouch. -(defun get-errno () - +ebadf+) - -;;; More about errno below. - ; Needed to write passphrases. (defcfun ("write" c-write) ssize-t (fd :int) @@ -83,14 +73,6 @@ (when (< res 0) (error 'system-error :errno (get-errno))) res)) -;;; More about errno here. - -(defun set-errno (errno) - (cond - ; Works on GNU/Linux. - ((eql errno +ebadf+) (system-write -1 (null-pointer) 0)) - (t (error 'invalid-errno :errno errno)))) - ;;; ;;; C Interface Definitions ;;; @@ -100,22 +82,39 @@ ;;; Some new data types used for easier translation. ;;; The number of include certs. Translates to NIL for default. -(defctype cert-int-t :int) +(defctype cert-int-t + (:wrapper :int + :from-c translate-cert-int-t-from-foreign + :to-c translate-cert-int-t-to-foreign)) ;;; A string that may be NIL to indicate a null pointer. -(defctype string-or-nil-t :string) +(defctype string-or-nil-t + (:wrapper :string + :to-c translate-string-or-nil-t-to-foreign)) ;;; Some opaque data types used by GPGME. -(defctype gpgme-ctx-t :pointer "The GPGME context type.") +(defctype gpgme-ctx-t + (:wrapper :pointer + :to-c translate-gpgme-ctx-t-to-foreign) + "The GPGME context type.") -(defctype gpgme-data-t :pointer "The GPGME data object type.") +(defctype gpgme-data-t + (:wrapper :pointer + :to-c translate-gpgme-data-t-to-foreign) + "The GPGME data object type.") ;;; Wrappers for the libgpg-error library. -(defctype gpgme-error-t gpg-error::gpg-error-t "The GPGME error type.") +(defctype gpgme-error-t + (:wrapper gpg-error::gpg-error-t + :from-c translate-gpgme-error-t-from-foreign + :to-c translate-gpgme-error-t-to-foreign) + "The GPGME error type.") -(defctype gpgme-error-no-signal-t gpg-error::gpg-error-t +(defctype gpgme-error-no-signal-t + (:wrapper gpg-error::gpg-error-t + :from-c translate-gpgme-error-no-signal-t-from-foreign) "The GPGME error type (this version does not signal conditions in translation.") (defctype gpgme-err-code-t gpg-error::gpg-err-code-t @@ -171,7 +170,11 @@ (:none 0) (:binary 1) (:base64 2) - (:armor 3)) + (:armor 3) + (:url 4) + (:urlesc 5) + (:url0 6) + (:mime 7)) ;;; @@ -182,7 +185,11 @@ (:rsa-s 3) (:elg-e 16) (:dsa 17) - (:elg 20)) + (:ecc 18) + (:elg 20) + (:ecdsa 301) + (:ecdh 302) + (:eddsa 303)) (defcenum gpgme-hash-algo-t "Hash algorithms from libgcrypt." @@ -196,6 +203,7 @@ (:sha256 8) (:sha384 9) (:sha512 10) + (:sha224 11) (:md4 301) (:crc32 302) (:crc32-rfc1510 303) @@ -225,7 +233,14 @@ (defcenum gpgme-protocol-t "The available protocols." (:openpgp 0) - (:cms 1)) + (:cms 1) + (:gpgconf 2) + (:assuan 3) + (:g13 4) + (:uiserver 5) + (:spawn 6) + (:default 254) + (:unknown 255)) ;;; @@ -234,6 +249,10 @@ (:local 1) (:extern 2) (:sigs 4) + (:sig-notations) + (:with-secret 16) + (:with-tofu 32) + (:ephemeral 128) (:validate 256)) ;;; @@ -243,7 +262,9 @@ (:human-readable 1) (:critical 2)) -(defctype gpgme-sig-notation-t :pointer +(defctype gpgme-sig-notation-t + (:wrapper :pointer + :from-c translate-gpgme-sig-notation-t-from-foreign) "Signature notation pointer type.") ;; FIXME: Doesn't this depend on endianess? @@ -263,15 +284,115 @@ ;;; -;; FIXME: Add status codes. (defcenum gpgme-status-code-t "The possible status codes for the edit operation." (:eof 0) - (:enter 1)) + (:enter 1) + (:leave 2) + (:abort 3) + (:goodsig 4) + (:badsig 5) + (:errsig 6) + (:badarmor 7) + (:rsa-or-idea 8) + (:keyexpired 9) + (:keyrevoked 10) + (:trust-undefined 11) + (:trust-never 12) + (:trust-marginal 13) + (:trust-fully 14) + (:trust-ultimate 15) + (:shm-info 16) + (:shm-get 17) + (:shm-get-bool 18) + (:shm-get-hidden 19) + (:need-passphrase 20) + (:validsig 21) + (:sig-id 22) + (:enc-to 23) + (:nodata 24) + (:bad-passphrase 25) + (:no-pubkey 26) + (:no-seckey 27) + (:need-passphrase-sym 28) + (:decryption-failed 29) + (:decryption-okay 30) + (:missing-passphrase 31) + (:good-passphrase 32) + (:goodmdc 33) + (:badmdc 34) + (:errmdc 35) + (:imported 36) + (:import-ok 37) + (:import-problem 38) + (:import-res 39) + (:file-start 40) + (:file-done 41) + (:file-error 42) + (:begin-decryption 43) + (:end-decryption 44) + (:begin-encryption 45) + (:end-encryption 46) + (:delete-problem 47) + (:get-bool 48) + (:get-line 49) + (:get-hidden 50) + (:got-it 51) + (:progress 52) + (:sig-created 53) + (:session-key 54) + (:notation-name 55) + (:notation-data 56) + (:policy-url 57) + (:begin-stream 58) + (:end-stream 59) + (:key-created 60) + (:userid-hint 61) + (:unexpected 62) + (:inv-recp 63) + (:no-recp 64) + (:already-signed 65) + (:sigexpired 66) + (:expsig 67) + (:expkeysig 68) + (:truncated 69) + (:error 70) + (:newsig 71) + (:revkeysig 72) + (:sig-subpacket 73) + (:need-passphrase-pin 74) + (:sc-op-failure 75) + (:sc-op-success 76) + (:cardctrl 77) + (:backup-key-created 78) + (:pka-trust-bad 79) + (:pka-trust-good 80) + (:plaintext 81) + (:inv-sgnr 82) + (:no-sgnr 83) + (:success 84) + (:decryption-info 85) + (:plaintext-length 86) + (:mountpoint 87) + (:pinentry-launched 88) + (:attribute 89) + (:begin-signing 90) + (:key-not-created 91) + (:inquire-maxlen 92) + (:failure 93) + (:key-considered 94) + (:tofu-user 95) + (:tofu-stats 96) + (:tofu-stats-long 97) + (:notation-flags 98) + (:decryption-compliance-mode 99) + (:verification-compliance-mode 100)) ;;; -(defctype gpgme-engine-info-t :pointer +(defctype gpgme-engine-info-t + (:wrapper :pointer + :from-c translate-gpgme-engine-info-t-to-foreign) "The engine information structure pointer type.") (defcstruct gpgme-engine-info @@ -285,7 +406,10 @@ ;;; -(defctype gpgme-subkey-t :pointer "A subkey from a key.") +(defctype gpgme-subkey-t + (:wrapper :pointer + :from-c translate-gpgme-subkey-t-from-foreign) + "A subkey from a key.") ;; FIXME: Doesn't this depend on endianess? (defbitfield (gpgme-subkey-bitfield :unsigned-int) @@ -299,7 +423,9 @@ (:can-certify 64) (:secret 128) (:can-authenticate 256) - (:is-qualified 512)) + (:is-qualified 512) + (:is-cardkey 1024) + (:is-de-vs 2048)) (defcstruct gpgme-subkey "Subkey from a key." @@ -314,7 +440,9 @@ (expires :long)) -(defctype gpgme-key-sig-t :pointer +(defctype gpgme-key-sig-t + (:wrapper :pointer + :from-c translate-gpgme-key-sig-t-from-foreign) "A signature on a user ID.") ;; FIXME: Doesn't this depend on endianess? @@ -343,7 +471,9 @@ (sig-class :unsigned-int)) -(defctype gpgme-user-id-t :pointer +(defctype gpgme-user-id-t + (:wrapper :pointer + :from-c translate-gpgme-user-id-t-from-foreign) "A user ID from a key.") ;; FIXME: Doesn't this depend on endianess? @@ -365,7 +495,10 @@ (-last-keysig gpgme-key-sig-t)) -(defctype gpgme-key-t :pointer +(defctype gpgme-key-t + (:wrapper :pointer + :from-c translate-gpgme-key-t-from-foreign + :to-c translate-gpgme-key-t-to-foreign) "A key from the keyring.") ;; FIXME: Doesn't this depend on endianess? @@ -693,7 +826,9 @@ ;;; -(defctype gpgme-invalid-key-t :pointer +(defctype gpgme-invalid-key-t + (:wrapper :pointer + :from-c translate-gpgme-invalid-key-t-from-foreign) "An invalid key structure.") (defcstruct gpgme-invalid-key @@ -708,7 +843,9 @@ "Encryption result structure." (invalid-recipients gpgme-invalid-key-t)) -(defctype gpgme-op-encrypt-result-t :pointer +(defctype gpgme-op-encrypt-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-encrypt-result-t-from-foreign) "An encryption result structure.") (defcfun ("gpgme_op_encrypt_result" c-gpgme-op-encrypt-result) @@ -716,7 +853,15 @@ (ctx gpgme-ctx-t)) (defbitfield gpgme-encrypt-flags-t - (:always-trust 1)) + (:always-trust 1) + (:no-encrypt-to 2) + (:prepare 4) + (:expect-sign 8) + (:no-compress 16) + (:symmetric 32) + (:throw-keyids 64) + (:wrap 128) + (:want-address 256)) (defcfun ("gpgme_op_encrypt_start" c-gpgme-op-encrypt-start) gpgme-error-t (ctx gpgme-ctx-t) @@ -749,7 +894,9 @@ ;;; Decryption. -(defctype gpgme-recipient-t :pointer +(defctype gpgme-recipient-t + (:wrapper :pointer + :from-c translate-gpgme-recipient-t-from-foreign) "A recipient structure.") (defcstruct gpgme-recipient @@ -762,7 +909,9 @@ (defbitfield gpgme-op-decrypt-result-bitfield "Decryption result structure bitfield." - (:wrong-key-usage 1)) + (:wrong-key-usage 1) + (:is-de-vs 2) + (:is-mine 4)) (defcstruct gpgme-op-decrypt-result "Decryption result structure." @@ -771,7 +920,9 @@ (recipients gpgme-recipient-t) (file-name :string)) -(defctype gpgme-op-decrypt-result-t :pointer +(defctype gpgme-op-decrypt-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-decrypt-result-t-from-foreign) "A decryption result structure.") (defcfun ("gpgme_op_decrypt_result" c-gpgme-op-decrypt-result) @@ -801,7 +952,9 @@ ;;; Signing. -(defctype gpgme-new-signature-t :pointer +(defctype gpgme-new-signature-t + (:wrapper :pointer + :from-c translate-gpgme-new-signature-t-from-foreign) "A new signature structure.") (defcstruct gpgme-new-signature @@ -821,7 +974,9 @@ (invalid-signers gpgme-invalid-key-t) (signatures gpgme-new-signature-t)) -(defctype gpgme-op-sign-result-t :pointer +(defctype gpgme-op-sign-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-sign-result-t-from-foreign) "A signing result structure.") (defcfun ("gpgme_op_sign_result" c-gpgme-op-sign-result) @@ -854,15 +1009,21 @@ (:crl-missing #x0100) (:crl-too-old #x0200) (:bad-policy #x0400) - (:sys-error #x0800)) + (:sys-error #x0800) + (:tofu-conflict #x1000)) -(defctype gpgme-signature-t :pointer +(defctype gpgme-signature-t + (:wrapper :pointer + :from-c translate-gpgme-signature-t-from-foreign) "A signature structure.") ;; FIXME: Doesn't this depend on endianess? (defbitfield (gpgme-signature-bitfield :unsigned-int) "The signature bitfield." - (:wrong-key-usage 1)) + (:wrong-key-usage 1) + (:pka-trust 2) + (:chain-model 4) + (:is-de-vs 8)) (defcstruct gpgme-signature "Signature structure." @@ -884,7 +1045,9 @@ (signatures gpgme-signature-t) (file-name :string)) -(defctype gpgme-op-verify-result-t :pointer +(defctype gpgme-op-verify-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-verify-result-t-from-foreign) "A verify result structure.") (defcfun ("gpgme_op_verify_result" c-gpgme-op-verify-result) @@ -913,7 +1076,9 @@ (:subkey #x0008) (:secret #x0010)) -(defctype gpgme-import-status-t :pointer +(defctype gpgme-import-status-t + (:wrapper :pointer + :from-c translate-gpgme-import-status-t-from-foreign) "An import status structure.") (defcstruct gpgme-import-status @@ -941,7 +1106,9 @@ (not-imported :int) (imports gpgme-import-status-t)) -(defctype gpgme-op-import-result-t :pointer +(defctype gpgme-op-import-result-t + (:wrapper :pointer + :from-c translate-gpgme-op-import-result-t-from-foreign) "An import status result structure.") (defcfun ("gpgme_op_import_result" c-gpgme-op-import-result) @@ -977,7 +1144,8 @@ (defbitfield (gpgme-genkey-flags-t :unsigned-int) "Flags used for the key generation result bitfield." (:primary #x0001) - (:sub #x0002)) + (:sub #x0002) + (:uid #x0004)) (defcstruct gpgme-op-genkey-result "Key generation result structure." @@ -1078,21 +1246,20 @@ ;;; cert-int-t is a helper type that takes care of representing the ;;; default number of certs as NIL. -(defmethod translate-from-foreign (value (type (eql 'cert-int-t))) +(defun translate-cert-int-t-from-foreign (value) (cond ((eql value +include-certs-default+) nil) (t value))) -(defmethod translate-to-foreign (value (type (eql 'cert-int-t))) +(defun translate-cert-int-t-to-foreign (value) (cond (value value) (t +include-certs-default+))) ;;; string-or-nil-t translates a null pointer to NIL and vice versa. ;;; Translation from foreign null pointer already works as expected. -;;; FIXME: May the "to foreign" conversion problem be a bug in CFFI? -(defmethod translate-to-foreign (value (type (eql 'string-or-nil-t))) +(defun translate-string-or-nil-t-to-foreign (value) (cond (value value) (t (null-pointer)))) @@ -1109,12 +1276,12 @@ ;;; FIXME: Should we use a hash table (or struct, or clos) instead of ;;; property list, as recommended by the Lisp FAQ? -(defmethod translate-from-foreign (value (type (eql 'gpgme-engine-info-t))) +(defun translate-gpgme-engine-info-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next protocol file-name version req-version home-dir) - value gpgme-engine-info) + value (:struct gpgme-engine-info)) (append (list protocol (list :file-name file-name :version version @@ -1122,55 +1289,53 @@ :home-dir home-dir)) next))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-invalid-key-t))) +(defun translate-gpgme-invalid-key-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next fpr reason) - value gpgme-invalid-key) + value (:struct gpgme-invalid-key)) (append (list (list :fpr fpr :reason reason)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-encrypt-result-t))) +(defun translate-gpgme-op-encrypt-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((invalid-recipients) - value gpgme-op-encrypt-result) + value (:struct gpgme-op-encrypt-result)) (list :encrypt (list :invalid-recipients invalid-recipients)))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-recipient-t))) +(defun translate-gpgme-recipient-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next keyid pubkey-algo status) - value gpgme-recipient) + value (:struct gpgme-recipient)) (append (list (list :keyid keyid :pubkey-algo pubkey-algo :status status)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-decrypt-result-t))) +(defun translate-gpgme-op-decrypt-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((unsupported-algorithm bitfield recipients file-name) - value gpgme-op-decrypt-result) + value (:struct gpgme-op-decrypt-result)) (list :decrypt (list :unsupported-algorithm unsupported-algorithm :bitfield bitfield :recipients recipients :file-name file-name)))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-new-signature-t))) +(defun translate-gpgme-new-signature-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next type pubkey-algo hash-algo timestamp fpr sig-class) - value gpgme-new-signature) + value (:struct gpgme-new-signature)) (append (list (list :type type :pubkey-algo pubkey-algo :hash-algo hash-algo @@ -1179,24 +1344,23 @@ :sig-class sig-class)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-sign-result-t))) +(defun translate-gpgme-op-sign-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((invalid-signers signatures) - value gpgme-op-sign-result) + value (:struct gpgme-op-sign-result)) (list :sign (list :invalid-signers invalid-signers :signatures signatures)))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-signature-t))) +(defun translate-gpgme-signature-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next summary fpr status notations timestamp exp-timestamp bitfield validity validity-reason pubkey-algo hash-algo) - value gpgme-signature) + value (:struct gpgme-signature)) (append (list (list :summary summary :fpr fpr :status status @@ -1209,29 +1373,27 @@ :pubkey-algo pubkey-algo)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-verify-result-t))) +(defun translate-gpgme-op-verify-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((signatures file-name) - value gpgme-op-verify-result) + value (:struct gpgme-op-verify-result)) (list :verify (list :signatures signatures :file-name file-name)))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-import-status-t))) +(defun translate-gpgme-import-status-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next fpr result status) - value gpgme-import-status) + value (:struct gpgme-import-status)) (append (list (list :fpr fpr :result result :status status)) next))))) -(defmethod translate-from-foreign (value - (type (eql 'gpgme-op-import-result-t))) +(defun translate-gpgme-op-import-result-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots @@ -1240,7 +1402,7 @@ new-revocations secret-read secret-imported secret-unchanged skipped-new-keys not-imported imports) - value gpgme-op-import-result) + value (:struct gpgme-op-import-result)) (list :verify (list :considered considered :no-user-id no-user-id :imported imported @@ -1272,19 +1434,19 @@ (gpgme-strsource (gpgme-error-value c))))) (:documentation "Signalled when a GPGME function returns an error.")) -(defmethod translate-from-foreign (value (name (eql 'gpgme-error-t))) +(defun translate-gpgme-error-t-from-foreign (value) "Raise a GPGME-ERROR if VALUE is non-zero." (when (not (eql (gpgme-err-code value) :gpg-err-no-error)) (error 'gpgme-error :gpgme-error value)) (gpg-err-canonicalize value)) -(defmethod translate-to-foreign (value (name (eql 'gpgme-error-t))) +(defun translate-gpgme-error-t-to-foreign (value) "Canonicalize the error value." (if (eql (gpgme-err-code value) :gpg-err-no-error) 0 (gpg-err-as-value value))) -(defmethod translate-from-foreign (value (name (eql 'gpgme-error-no-signal-t))) +(defun translate-gpgme-error-no-signal-t-from-foreign (value) "Canonicalize the error value." (gpg-err-canonicalize value)) @@ -1528,61 +1690,68 @@ (when (not (null-pointer-p handle)) (foreign-free handle)))) (defcallback data-read-cb ssize-t ((handle :pointer) (buffer :pointer) - (size size-t)) + (size size-t)) (when *debug* (format t "DEBUG: gpgme-data-read-cb: want ~A~%" size)) (let ((stream (gethash (pointer-address handle) *data-handles*))) (cond (stream (let* ((stream-type (stream-element-type stream)) - (seq (make-array size :element-type stream-type)) - (read (read-sequence seq stream))) - (loop for i from 0 to (- read 1) - do (setf (mem-aref buffer :unsigned-char i) - ;;; FIXME: This is a half-assed attempt at - ;;; supporting character streams. - (cond - ((eql stream-type 'character) - (char-code (elt seq i))) - (t (coerce (elt seq i) stream-type))))) - (when *debug* (format t "DEBUG: gpgme-data-read-cb: read ~A~%" read)) - read)) - (t (set-errno +ebadf+) - -1)))) + (seq (make-array size :element-type stream-type)) + (read (read-sequence seq stream))) + (cond + ((equal stream-type '(unsigned-byte 8)) + (dotimes (i read) + (setf (mem-aref buffer :unsigned-char i) + (aref (the byte-array seq) i)))) + ((eql stream-type 'character) + (dotimes (i read) + (setf (mem-aref buffer :unsigned-char i) + (char-code (aref (the character-array seq) i))))) + (t + (dotimes (i read) + (setf (mem-aref buffer :unsigned-char i) + (coerce (aref seq i) '(unsigned-byte 8)))))) + (when *debug* (format t "DEBUG: gpgme-data-read-cb: read ~A~%" read)) + read)) + (t + (set-errno +ebadf+) + -1)))) (defcallback data-write-cb ssize-t ((handle :pointer) (buffer :pointer) - (size size-t)) + (size size-t)) (when *debug* (format t "DEBUG: gpgme-data-write-cb: want ~A~%" size)) (let ((stream (gethash (pointer-address handle) *data-handles*))) (cond (stream (let* ((stream-type (stream-element-type stream)) - (seq (make-array size :element-type stream-type))) - (loop for i from 0 to (- size 1) - do (setf (elt seq i) - ;;; FIXME: This is a half-assed attempt at - ;;; supporting character streams. - (cond - ((eql stream-type 'character) - (code-char (mem-aref buffer :unsigned-char i))) - (t (coerce (mem-aref buffer :unsigned-char i) - stream-type))))) - (write-sequence seq stream) - ;;; FIXME: What about write errors? - size)) - (t (set-errno +ebadf+) - -1)))) + (seq (make-array size :element-type stream-type))) + (cond + ((equal stream-type '(unsigned-byte 8)) + (dotimes (i size) + (setf (aref (the byte-array seq) i) + (mem-aref buffer :unsigned-char i)))) + ((eql stream-type 'character) + (dotimes (i size) + (setf (aref (the character-array seq) i) + (code-char (mem-aref buffer :unsigned-char i))))) + (t + (dotimes (i size) + (setf (aref seq i) + (coerce (mem-aref buffer :unsigned-char i) stream-type))))) + (write-sequence seq stream) + size)) + (t + (set-errno +ebadf+) + -1)))) ;;; This little helper macro allows us to swallow the cbs structure by ;;; simply setting it to a null pointer, but still protect against ;;; conditions. (defmacro with-cbs-swallowed ((cbs) &body body) - `(let ((,cbs (foreign-alloc 'gpgme-data-cbs))) + `(let ((,cbs (foreign-alloc '(:struct gpgme-data-cbs)))) (unwind-protect (progn , at body) (when (not (null-pointer-p ,cbs)) (foreign-free ,cbs))))) -;;; FIXME: Wrap the object and attach to it a finalizer. Requires new -;;; CFFI. Should we use an OO interface, ie make-instance? For now, -;;; we do not provide direct access to data objects. (defun gpgme-data-new (stream &key encoding file-name) "Allocate a new GPGME data object for STREAM." (with-foreign-object (dh-p 'gpgme-data-t) @@ -1592,12 +1761,14 @@ ;;; unique C pointer as handle anyway to look up the stream in the ;;; callback. This is a convenient one to use. (with-cbs-swallowed (cbs) - (setf - (foreign-slot-value cbs 'gpgme-data-cbs 'read) (callback data-read-cb) - (foreign-slot-value cbs 'gpgme-data-cbs 'write) (callback data-write-cb) - (foreign-slot-value cbs 'gpgme-data-cbs 'seek) (null-pointer) - (foreign-slot-value cbs 'gpgme-data-cbs 'release) (callback - data-release-cb)) + (setf (foreign-slot-value cbs '(:struct gpgme-data-cbs) 'read) + (callback data-read-cb)) + (setf (foreign-slot-value cbs '(:struct gpgme-data-cbs) 'write) + (callback data-write-cb)) + (setf (foreign-slot-value cbs '(:struct gpgme-data-cbs) 'seek) + (null-pointer)) + (setf (foreign-slot-value cbs '(:struct gpgme-data-cbs) 'release) + (callback data-release-cb)) (c-gpgme-data-new-from-cbs dh-p cbs cbs) (let ((dh (mem-ref dh-p 'gpgme-data-t))) (when encoding (gpgme-data-set-encoding dh encoding)) @@ -1619,12 +1790,33 @@ (when *debug* (format t "DEBUG: gpgme-data-release: ~A~%" dh)) (c-gpgme-data-release dh)) +(defclass data () + (c-data) ; The C data object pointer + (:documentation "The GPGME data type.")) + +(defmethod initialize-instance :after ((data data) &key streamspec + &allow-other-keys) + (let ((c-data (if (listp streamspec) + (apply #'gpgme-data-new streamspec) + (gpgme-data-new streamspec))) + (cleanup t)) + (unwind-protect + (progn + (setf (slot-value data 'c-data) c-data) + (finalize data (lambda () (gpgme-data-release c-data))) + (setf cleanup nil)) + (if cleanup (gpgme-data-release c-data))))) + +(defun translate-gpgme-data-t-to-foreign (value) + ;; Allow a pointer to be passed directly for the finalizer to work. + (cond + ((null value) (null-pointer)) + ((pointerp value) value) + (t (slot-value value 'c-data)))) + (defmacro with-gpgme-data ((dh streamspec) &body body) - `(let ((,dh (if (listp ,streamspec) - (apply 'gpgme-data-new ,streamspec) - (gpgme-data-new ,streamspec)))) - (unwind-protect (progn , at body) - (when (not (null-pointer-p ,dh)) (gpgme-data-release ,dh))))) + `(let ((,dh (make-instance 'data :streamspec ,streamspec))) + , at body)) (defun gpgme-data-get-encoding (dh) "Get the encoding associated with the data object DH." @@ -1693,7 +1885,7 @@ (setf cleanup nil)) (if cleanup (gpgme-release c-ctx))))) -(defmethod translate-to-foreign (value (type (eql 'gpgme-ctx-t))) +(defun translate-gpgme-ctx-t-to-foreign (value) ;; Allow a pointer to be passed directly for the finalizer to work. (if (pointerp value) value (slot-value value 'c-ctx))) @@ -1848,11 +2040,11 @@ (setf (slot-value key 'c-key) c-key) (finalize key (lambda () (gpgme-key-unref c-key)))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-key-t))) +(defun translate-gpgme-key-t-from-foreign (value) (when *debug* (format t "DEBUG: import key: ~A~%" value)) (make-instance 'key :c-key value)) -(defmethod translate-to-foreign (value (type (eql 'gpgme-key-t))) +(defun translate-gpgme-key-t-to-foreign (value) ;; Allow a pointer to be passed directly for the finalizer to work. (if (pointerp value) value (slot-value value 'c-key))) @@ -1867,12 +2059,12 @@ ;;; and zero length value (omit?) and human-readable (convert to string). ;;; FIXME: Turn binary data into sequence or vector or what it should be. ;;; FIXME: Turn the whole thing into a hash? -(defmethod translate-from-foreign (value (type (eql 'gpgme-sig-notation-t))) +(defun translate-gpgme-sig-notation-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next name value name-len value-len flags bitfield) - value gpgme-sig-notation) + value (:struct gpgme-sig-notation)) (append (list (list :name name :value value @@ -1883,12 +2075,12 @@ next))))) ;;; FIXME: Deal nicer with timestamps. bitfield field name? -(defmethod translate-from-foreign (value (type (eql 'gpgme-subkey-t))) +(defun translate-gpgme-subkey-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next bitfield pubkey-algo length keyid fpr timestamp expires) - value gpgme-subkey) + value (:struct gpgme-subkey)) (append (list (list :bitfield bitfield :pubkey-algo pubkey-algo @@ -1899,13 +2091,13 @@ :expires expires)) next))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-key-sig-t))) +(defun translate-gpgme-key-sig-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next bitfield pubkey-algo keyid timestamp expires status uid name email comment sig-class) - value gpgme-key-sig) + value (:struct gpgme-key-sig)) (append (list (list :bitfield bitfield :pubkey-algo pubkey-algo @@ -1920,12 +2112,12 @@ :sig-class sig-class)) next))))) -(defmethod translate-from-foreign (value (type (eql 'gpgme-user-id-t))) +(defun translate-gpgme-user-id-t-from-foreign (value) (cond ((null-pointer-p value) nil) (t (with-foreign-slots ((next bitfield validity uid name email comment signatures) - value gpgme-user-id) + value (:struct gpgme-user-id)) (append (list (list :bitfield bitfield :validity validity @@ -1941,7 +2133,7 @@ (with-foreign-slots ((bitfield protocol issuer-serial issuer-name chain-id owner-trust subkeys uids keylist-mode) - c-key gpgme-key) + c-key (:struct gpgme-key)) (list :bitfield bitfield :protocol protocol commit aafadb859497aa8785b7e19f267f1bfd8acfc062 Author: Werner Koch Date: Fri Oct 12 08:38:10 2018 +0200 Register DCO for Guillaume LE VAILLANT -- diff --git a/AUTHORS b/AUTHORS index 64a675e..3109446 100644 --- a/AUTHORS +++ b/AUTHORS @@ -66,6 +66,9 @@ Ben McGinnes Jacob Adams 2018-06-03:ad5141df-b6cc-6c2a-59df-b2f18f7160fd at gmail.com: +Guillaume LE VAILLANT +2018-10-11:20181011113825.76f9752a at yamatai: + Copyright 2001, 2002, 2012, 2013 g10 Code GmbH ----------------------------------------------------------------------- Summary of changes: AUTHORS | 3 + lang/cl/Makefile.am | 2 +- lang/cl/README | 33 ++- lang/cl/gpgme-package.lisp | 3 +- lang/cl/gpgme.asd.in | 19 +- lang/cl/gpgme.lisp | 502 +++++++++++++++++++++++++++++++-------------- 6 files changed, 389 insertions(+), 173 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 12 09:05:47 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 12 Oct 2018 09:05:47 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-11-g233d2f3 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 233d2f3d351c5d3109740e79762ebd723b0d82fa (commit) from 85d7af8ff2f6afd63701079e23f31be08d58a15d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 233d2f3d351c5d3109740e79762ebd723b0d82fa Author: Werner Koch Date: Fri Oct 12 09:05:41 2018 +0200 cl: Add missing file -- Fixes-commit: 85d7af8ff2f6afd63701079e23f31be08d58a15d My fault, sorry. Signed-off-by: Werner Koch diff --git a/lang/cl/gpgme-grovel.lisp b/lang/cl/gpgme-grovel.lisp new file mode 100644 index 0000000..52dce6c --- /dev/null +++ b/lang/cl/gpgme-grovel.lisp @@ -0,0 +1,31 @@ +;;;; gpgme-grovel.lisp + +;;; This file is part of GPGME-CL. +;;; +;;; GPGME-CL is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 2 of the License, or +;;; (at your option) any later version. +;;; +;;; GPGME-CL is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; Lesser General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GPGME; if not, write to the Free Software Foundation, +;;; Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +(in-package :gpgme) + + +(include "errno.h" "sys/types.h") + +(constant (+ebadf+ "EBADF")) + +(ctype off-t "off_t") +(ctype size-t "size_t") +(ctype ssize-t "ssize_t") + +(cvar ("errno" *errno*) :int) ----------------------------------------------------------------------- Summary of changes: lang/cl/gpgme-grovel.lisp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lang/cl/gpgme-grovel.lisp hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 12 16:45:40 2018 From: cvs at cvs.gnupg.org (by Wookey) Date: Fri, 12 Oct 2018 16:45:40 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-23-ga3f4e88 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via a3f4e8838036a14e87cca811e40c9f670f152fcd (commit) from 9f71b28dcb38e1d5d9001692e2f64009396aaf9b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a3f4e8838036a14e87cca811e40c9f670f152fcd Author: Wookey Date: Fri Oct 12 09:57:23 2018 -0400 syscfg: Add support for arm64ilp32 * src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h: New. * src/Makefile.am (lock_obj_pub): Add it. -- Debian-bug-id: 869605 Co-authored-by: Wookey Signed-off-by: Daniel Kahn Gillmor diff --git a/src/Makefile.am b/src/Makefile.am index 03e0b68..d568d73 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -45,6 +45,7 @@ endif # Distributed lock object definitions for cross compilation. lock_obj_pub = \ syscfg/lock-obj-pub.aarch64-unknown-linux-gnu.h \ + syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h \ syscfg/lock-obj-pub.aarch64-apple-darwin.h \ syscfg/lock-obj-pub.alpha-unknown-linux-gnu.h \ syscfg/lock-obj-pub.arm-unknown-linux-androideabi.h \ diff --git a/src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h b/src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h new file mode 100644 index 0000000..61239c3 --- /dev/null +++ b/src/syscfg/lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h @@ -0,0 +1,24 @@ +## lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h +## File created by gen-posix-lock-obj - DO NOT EDIT +## To be included by mkheader into gpg-error.h + +typedef struct +{ + long _vers; + union { + volatile char _priv[32]; + long _x_align; + long *_xp_align; + } u; +} gpgrt_lock_t; + +#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \ + 0,0,0,0,0,0,0,0, \ + 0,0,0,0,0,0,0,0, \ + 0,0,0,0,0,0,0,0}}} +## +## Local Variables: +## mode: c +## buffer-read-only: t +## End: +## ----------------------------------------------------------------------- Summary of changes: src/Makefile.am | 1 + ...686-unknown-gnu.h => lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h} | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) copy src/syscfg/{lock-obj-pub.i686-unknown-gnu.h => lock-obj-pub.aarch64-unknown-linux-gnu_ilp32.h} (91%) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 15 04:19:53 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 15 Oct 2018 04:19:53 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-226-g78f542e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 78f542e1f4495195db2e668f9cd41657fb1afc77 (commit) from 4ed941ff26783c4fabfe2079029f8e436eb7e340 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 78f542e1f4495195db2e668f9cd41657fb1afc77 Author: NIIBE Yutaka Date: Mon Oct 15 11:10:15 2018 +0900 scd: Fix signing authentication status. * scd/app-openpgp.c (do_sign): Clear DID_CHV1 after signing. -- We have a corner case: In "not forced" situation and authenticated, and it is changed to "forced", card implementaiton can actually accept signing, but GnuPG requires authentication, because it is "forced". GnuPG-bug-id: 4177 Signed-off-by: NIIBE Yutaka diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 8df9fab..87804f5 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -4393,7 +4393,7 @@ do_sign (app_t app, const char *keyidstr, int hashalgo, log_info (_("signatures created so far: %lu\n"), sigcount); /* Check CHV if needed. */ - if (!app->did_chv1 || app->force_chv1 ) + if (!app->did_chv1 || app->force_chv1) { char *pinvalue; int pinlen; @@ -4441,6 +4441,9 @@ do_sign (app_t app, const char *keyidstr, int hashalgo, } rc = iso7816_compute_ds (app->slot, exmode, data, datalen, le_value, outdata, outdatalen); + if (!rc && app->force_chv1) + app->did_chv1 = 0; + return rc; } ----------------------------------------------------------------------- Summary of changes: scd/app-openpgp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 15 04:21:20 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 15 Oct 2018 04:21:20 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-8-g7e2b048 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via 7e2b0488d13561be2b754e28801de654747a8dcc (commit) from 8f844ae1cd16e27ad07d45784b1f0ff2917da2b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7e2b0488d13561be2b754e28801de654747a8dcc Author: NIIBE Yutaka Date: Mon Oct 15 11:10:15 2018 +0900 scd: Fix signing authentication status. * scd/app-openpgp.c (do_sign): Clear DID_CHV1 after signing. -- Cherry-picked from master commit of: 78f542e1f4495195db2e668f9cd41657fb1afc77 We have a corner case: In "not forced" situation and authenticated, and it is changed to "forced", card implementaiton can actually accept signing, but GnuPG requires authentication, because it is "forced". GnuPG-bug-id: 4177 Signed-off-by: NIIBE Yutaka diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 9fcfa19..911bd88 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -4381,7 +4381,7 @@ do_sign (app_t app, const char *keyidstr, int hashalgo, log_info (_("signatures created so far: %lu\n"), sigcount); /* Check CHV if needed. */ - if (!app->did_chv1 || app->force_chv1 ) + if (!app->did_chv1 || app->force_chv1) { char *pinvalue; int pinlen; @@ -4429,6 +4429,9 @@ do_sign (app_t app, const char *keyidstr, int hashalgo, } rc = iso7816_compute_ds (app->slot, exmode, data, datalen, le_value, outdata, outdatalen); + if (!rc && app->force_chv1) + app->did_chv1 = 0; + return rc; } ----------------------------------------------------------------------- Summary of changes: scd/app-openpgp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 15 09:00:44 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 15 Oct 2018 09:00:44 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-84-gca19968 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via ca19968b22e6659d7bff26bbca5b5d1c6ebb4571 (commit) via cee0d5aa843aa6b2ed1a6c2635b698d8c9102b8a (commit) via 26c4c8de6730a05c466d760edebe66c48af5aa10 (commit) via b34d4a3fa04502f093f89172b8802ec497161d31 (commit) from 1b37aa01cc67d942de06c882fd9d30d39866b111 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ca19968b22e6659d7bff26bbca5b5d1c6ebb4571 Author: Andre Heinecke Date: Mon Oct 15 08:59:05 2018 +0200 Pass address book overrides to keyresolver * src/cryptcontroller.cpp (CryptController::resolve_keys): Pass overrides. * src/keycache.cpp, src/keycache.h (KeyCache::getOverrides): Expose overrides directly. -- GnuPG-Bug-Id: T4122 diff --git a/src/cryptcontroller.cpp b/src/cryptcontroller.cpp index 39ac448..217bc87 100644 --- a/src/cryptcontroller.cpp +++ b/src/cryptcontroller.cpp @@ -534,13 +534,29 @@ CryptController::resolve_keys () // Get the recipients that are cached from OOM for (const auto &addr: m_recipient_addrs) { - args.push_back (GpgME::UserID::addrSpecFromString (addr.c_str())); + const auto mbox = GpgME::UserID::addrSpecFromString (addr.c_str()); + const auto overrides = KeyCache::instance ()->getOverrides (mbox); + if (overrides.size()) + { + std::string overrideStr = mbox + ":"; + for (const auto &key: overrides) + { + if (key.isNull()) + { + TRACEPOINT; + continue; + } + overrideStr += key.primaryFingerprint(); + overrideStr += ","; + } + overrideStr.erase(overrideStr.size() - 1, 1); + args.push_back (std::string ("-o")); + args.push_back (overrideStr); + } + args.push_back (mbox); } } - args.push_back (std::string ("--lang")); - args.push_back (std::string (gettext_localename ())); - // Args are prepared. Spawn the resolver. auto ctx = GpgME::Context::createForEngine (GpgME::SpawnEngine); if (!ctx) diff --git a/src/keycache.cpp b/src/keycache.cpp index 523ab31..69171c6 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -1264,3 +1264,9 @@ KeyCache::onAddrBookImportJobDone (const std::string &mbox, { return d->onAddrBookImportJobDone (mbox, result_fprs); } + +std::vector +KeyCache::getOverrides (const std::string &mbox) +{ + return d->getPGPOverrides (mbox.c_str ()); +} diff --git a/src/keycache.h b/src/keycache.h index e67bcf4..cc5ab77 100644 --- a/src/keycache.h +++ b/src/keycache.h @@ -121,6 +121,10 @@ public: const char *key_data, Mail *mail) const; + /* Get optional overrides for an address. */ + std::vector getOverrides (const std::string &mbox); + + // Internal for thread void setSmimeKey(const std::string &mbox, const GpgME::Key &key); void setPgpKey(const std::string &mbox, const GpgME::Key &key); commit cee0d5aa843aa6b2ed1a6c2635b698d8c9102b8a Author: Andre Heinecke Date: Mon Oct 15 08:58:33 2018 +0200 Add some new strings from the config dialog * src/addin-options.cpp (i18n_noops): Add / update config dlg strings. diff --git a/src/addin-options.cpp b/src/addin-options.cpp index b42bfd8..d82b095 100644 --- a/src/addin-options.cpp +++ b/src/addin-options.cpp @@ -54,7 +54,7 @@ i18n_noops[] = { "attachments as PGP/Inline"), N_("S&elect crypto settings automatically " "for reply and forward"), - N_("&Prefer S/MIME when automatically resolving recipients"), + N_("&Prefer S/MIME"), /* Tooltips */ N_("Enable or disable any automated key handling."), @@ -70,6 +70,14 @@ i18n_noops[] = { "the deprecated PGP/Inline is used.\n" "This can be required for compatibility but should generally not " "be used."), + N_("Prefer S/MIME over OpenPGP if both are possible."), + + /* TRANSLATORS: Part of the config dialog. */ + N_("Search and import &X509 certificates in the configured directory services"), + /* TRANSLATORS: Part of the config dialog. Tooltip */ + N_("Searches for X509 certificates automatically and imports them. This option searches in all configured services."), + /* TRANSLATORS: Part of the config dialog. Warning about privacy leak. */ + N_("Warning: The configured services will receive information about whom you send Emails!"), /* Not options but strings for the key adder */ /* TRANSLATORS: Part of address book key configuration dialog. commit 26c4c8de6730a05c466d760edebe66c48af5aa10 Author: Andre Heinecke Date: Mon Oct 15 08:55:38 2018 +0200 Pass preferred protocol to keyresolver * src/cryptcontroller.cpp (CryptController::resolve_keys): Pass preferred protocol. -- GnuPG-Bug-Id: T4178 diff --git a/src/cryptcontroller.cpp b/src/cryptcontroller.cpp index e54560d..39ac448 100644 --- a/src/cryptcontroller.cpp +++ b/src/cryptcontroller.cpp @@ -519,6 +519,14 @@ CryptController::resolve_keys () args.push_back (std::string ("--alwaysShow")); } + if (opt.prefer_smime) + { + args.push_back (std::string ("--preferred-protocol")); + args.push_back (std::string ("cms")); + } + + args.push_back (std::string ("--lang")); + args.push_back (std::string (gettext_localename ())); if (m_encrypt) { commit b34d4a3fa04502f093f89172b8802ec497161d31 Author: Andre Heinecke Date: Wed Oct 10 08:52:30 2018 +0200 Update pt translation * po/pt.po: Update -- Thanks Marco A.G.Pinto diff --git a/po/pt.po b/po/pt.po index 23bf233..5fddbd1 100644 --- a/po/pt.po +++ b/po/pt.po @@ -9,15 +9,15 @@ msgstr "" "Project-Id-Version: GpgOL 1.1.1\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" "POT-Creation-Date: 2018-10-08 18:03+0200\n" -"PO-Revision-Date: 2018-08-30 15:00+0100\n" -"Last-Translator: aheinecke \n" +"PO-Revision-Date: 2018-10-09 16:56+0100\n" +"Last-Translator: Marco A.G.Pinto \n" "Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-SourceCharset: UTF-8\n" -"X-Generator: Lokalize 2.0\n" +"X-Generator: Poedit 2.2\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/addin-options.cpp:39 @@ -66,11 +66,11 @@ msgstr "&Resolver automaticamente as chaves dos destinat?rios" #: src/addin-options.cpp:51 msgid "&Encrypt new messages by default" -msgstr "&Encriptar novas mensagens por omiss?o" +msgstr "&Encriptar novas mensagens por padr?o" #: src/addin-options.cpp:52 msgid "&Sign new messages by default" -msgstr "Assinar novas mensagens por omiss?o" +msgstr "Assinar novas mensagens por padr?o" #: src/addin-options.cpp:53 msgid "&Send OpenPGP mails without attachments as PGP/Inline" @@ -144,32 +144,29 @@ msgstr "" #. TRANSLATORS: Part of address book key configuration dialog. #. The contacts name follows. #: src/addin-options.cpp:77 -#, fuzzy msgid "Configure key for:" -msgstr "Configurar o GpgOL" +msgstr "Configurar a chave para:" #. TRANSLATORS: Part of address book key configuration dialog. #. An example for a public key follows. #: src/addin-options.cpp:80 msgid "Paste a public key export here. It should look like:" -msgstr "" +msgstr "Cola uma exporta??o de chave p?blica aqui. Deve parecer assim:" #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:82 -#, fuzzy msgid "Failed to parse any public key." -msgstr "Falha ao interpretar o e-mail." +msgstr "Falha ao interpretar qualquer chave p?blica." #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:84 -#, fuzzy msgid "Error" -msgstr "I/O-Erro" +msgstr "Erro" #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:86 msgid "Secret key detected." -msgstr "" +msgstr "Chave secreta detetada." #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:88 @@ -177,106 +174,108 @@ msgid "" "You can only configure public keys in Outlook. Import secret keys with " "Kleopatra." msgstr "" +"S? podes configurar chaves p?blicas no Outlook. Importa chaves secretas com " +"o Kleopatra." #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:91 msgid "" "The key is unusable for Outlook. Please check Kleopatra for more information." msgstr "" +"A chave ? inutiliz?vel para o Outlook. Por favor, verifica o Kleopatra para " +"obter mais informa??es." #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:94 msgid "Invalid key detected." -msgstr "" +msgstr "Chave inv?lida detetada." #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:96 msgid "Created:" -msgstr "" +msgstr "Criada:" #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:98 msgid "User Ids:" -msgstr "" +msgstr "IDs de utilizador:" #. TRANSLATORS: Part of address book key configuration dialog. %1 is #. a placeholder for the plual for key / keys. #: src/addin-options.cpp:101 msgid "You are about to configure the following %1 for:" -msgstr "" +msgstr "Est?s prestes a configurar o seguinte %1 para:" #. TRANSLATORS: Part of address book key configuration dialog. #. used in a sentence as plural form. #: src/addin-options.cpp:104 msgid "keys" -msgstr "" +msgstr "chaves" #. TRANSLATORS: Part of address book key configuration dialog. #. used in a sentence as singular form. #: src/addin-options.cpp:107 msgid "key" -msgstr "" +msgstr "chave" #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:109 msgid "Continue?" -msgstr "" +msgstr "Continuar?" #. TRANSLATORS: Part of address book key configuration dialog. #: src/addin-options.cpp:111 -#, fuzzy msgid "Confirm keys" -msgstr "Confirmar o registo?" +msgstr "Confirmar chaves" #. TRANSLATORS: Part of debugging configuration. #: src/addin-options.cpp:113 msgid "Enable Logging" -msgstr "" +msgstr "Ativar logs" #: src/addin-options.cpp:114 msgid "Default" -msgstr "" +msgstr "Padr?o" #. TRANSLATORS: Part of debugging configuration. The plus should #. mean in the combo box that it is added to the above. #: src/addin-options.cpp:117 msgid "+Outlook API calls" -msgstr "" +msgstr "+Chamadas da API do Outlook" #. TRANSLATORS: Part of debugging configuration. The plus should #. mean in the combo box that it is added to the above. #: src/addin-options.cpp:120 msgid "+Memory analysis" -msgstr "" +msgstr "+An?lise de mem?ria" #. TRANSLATORS: Part of debugging configuration. The plus should #. mean in the combo box that it is added to the above. #: src/addin-options.cpp:123 msgid "+Call tracing" -msgstr "" +msgstr "+Rastreamento de chamadas" #. TRANSLATORS: Part of debugging configuration. #: src/addin-options.cpp:125 msgid "Log File (required):" -msgstr "" +msgstr "Ficheiro de log (obrigat?rio):" #. TRANSLATORS: Part of debugging configuration. This is a checkbox #. to select if even potentially private data should be included in the #. debug log. #: src/addin-options.cpp:129 msgid "Include Mail contents (decrypted!) and meta information." -msgstr "" +msgstr "Incluir conte?do do e-mail (decifrado!) e meta-informa??o." #. TRANSLATORS: Dialog title for the log file selection #: src/addin-options.cpp:131 -#, fuzzy msgid "Select log file" -msgstr "Selecciona chave de assinatura" +msgstr "Selecionar ficheiro de log" #. TRANSLATORS: Part of debugging configuration. #: src/addin-options.cpp:133 msgid "Log level:" -msgstr "" +msgstr "N?vel de log:" #. TRANSLATORS: Part of debugging configuration. Warning shown #. in case the highest log level is selected. Please try to @@ -285,38 +284,37 @@ msgstr "" #. level. #: src/addin-options.cpp:139 msgid "Warning: Decreased performance. Huge logs!" -msgstr "" +msgstr "Aviso: Desempenho reduzido. Logs enormes!" #. TRANSLATORS: Config dialog category for debug options. #: src/addin-options.cpp:141 -#, fuzzy msgid "Debug" -msgstr "Debug..." +msgstr "Debug" #. TRANSLATORS: Config dialog category for debug options. #: src/addin-options.cpp:143 msgid "Configuaration of debug options" -msgstr "" +msgstr "Configura??o de op??es de debug" #. TRANSLATORS: Config dialog debug page, can be technical. #: src/addin-options.cpp:145 msgid "Potential workarounds" -msgstr "" +msgstr "Poss?veis solu??es alternativas" #. TRANSLATORS: Config dialog debug page, can be technical. #: src/addin-options.cpp:147 msgid "Block Outlook during encrypt / sign" -msgstr "" +msgstr "Bloquear o Outlook durante a encripta??o / assinatura" #. TRANSLATORS: Config dialog debug page, can be technical. #: src/addin-options.cpp:149 msgid "Block Outlook during decrypt / verify" -msgstr "" +msgstr "Bloquear o Outlook durante a desencripta??o / verifica??o" #. TRANSLATORS: Config dialog debug page, link to report bug page. #: src/addin-options.cpp:151 msgid "How to report a problem?" -msgstr "" +msgstr "Como relatar um problema?" #: src/common.cpp:768 msgid "GpgOL Error" @@ -391,14 +389,13 @@ msgid "&Print decrypted" msgstr "&Imprimir desencriptado" #: src/gpgoladdin.cpp:1101 -#, fuzzy msgid "OpenPGP Key" -msgstr "Die GPG Schl?sselverwaltung ?ffnen" +msgstr "Chave OpenPGP" #. TRANSLATORS: Tooltip caption #: src/gpgoladdin.cpp:1103 msgid "Configure the OpenPGP key for this contact." -msgstr "" +msgstr "Configurar a chave OpenPGP para este contacto." #. TRANSLATORS: Tooltip content #: src/gpgoladdin.cpp:1105 @@ -406,6 +403,8 @@ msgid "" "The configured key or keys will be used for this contact even if they are " "not certified." msgstr "" +"A chave ou chaves configuradas ser?o utilizadas para este contacto, mesmo " +"que n?o sejam certificadas." #: src/mail.cpp:383 msgid "" @@ -483,8 +482,7 @@ msgstr "mensagem" #: src/mail.cpp:1087 msgid "Please wait while the message is being decrypted / verified..." msgstr "" -"Por favor, aguarda enquanto a mensagem est? a ser desencriptada / " -"verificada..." +"Por favor, aguarda enquanto a mensagem est? a ser desencriptada / verificada?" #: src/mail.cpp:1297 src/mail.cpp:1366 msgid "HTML display disabled." @@ -492,7 +490,7 @@ msgstr "Mostrar HTML desativado." #: src/mail.cpp:1298 src/mail.cpp:1367 msgid "HTML content in unsigned S/MIME mails is insecure." -msgstr "O conte?do HTML em e-mails S/MIME n?o assinados ? inseguro." +msgstr "O conte?do HTML em e-mails S/MIME n?o-assinados ? inseguro." #: src/mail.cpp:1301 src/mail.cpp:1370 msgid "GpgOL will only show such mails as text." @@ -772,7 +770,7 @@ msgstr "" #: src/mail.cpp:3166 msgid "GpgOL: Encryption not possible!" -msgstr "GpgOL: Encripta??o n?o poss?vel!" +msgstr "GpgOL: Encripta??o n?o ? poss?vel!" #: src/mail.cpp:3168 msgid "" @@ -806,7 +804,7 @@ msgid "" "For example by right clicking but not selecting the message.\n" msgstr "" "O GpgOL impediu a altera??o para a propriedade \"%s\".\n" -"As altera??es de propriedade n?o s?o ainda manipuladas para mensagens " +"As altera??es de propriedades n?o s?o ainda manipuladas para mensagens " "criptogr?ficas.\n" "\n" "Para contornar esta limita??o, por favor altera a propriedade quando a " @@ -1002,19 +1000,19 @@ msgstr "N?o foram selecionados destinat?rios para a encripta??o." #: src/cryptcontroller.cpp:488 msgid "Resolving recipients..." -msgstr "A resolver destinat?rios..." +msgstr "A resolver destinat?rios?" #: src/cryptcontroller.cpp:492 msgid "Resolving signers..." -msgstr "A resolver assinantes..." +msgstr "A resolver signat?rios?" #: src/cryptcontroller.cpp:1150 msgid "Encrypting..." -msgstr "A encriptar..." +msgstr "A encriptar?" #: src/cryptcontroller.cpp:1154 msgid "Signing..." -msgstr "A assinar..." +msgstr "A assinar?" #~ msgid "Message sending" #~ msgstr "Envio de mensagem" @@ -2037,4 +2035,4 @@ msgstr "A assinar..." #~ msgid "[No attestation computed (e.g. messages was not signed)" #~ msgstr "" -#~ "[Kein Testat berechnet (z.B. da die Nachricht nicht unterschrieben war)" +#~ "[Kein Testat berechnet (z.B. da die Nachricht nicht unterschrieben war)" \ No newline at end of file ----------------------------------------------------------------------- Summary of changes: po/pt.po | 104 ++++++++++++++++++++++++------------------------ src/addin-options.cpp | 10 ++++- src/cryptcontroller.cpp | 32 +++++++++++++-- src/keycache.cpp | 6 +++ src/keycache.h | 4 ++ 5 files changed, 98 insertions(+), 58 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 15 13:45:18 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 15 Oct 2018 13:45:18 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.9.10-19-gfea939b Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via fea939b6fe082fa2fd8276f7d59f9018e89af0fe (commit) via f5361478e121415e37ef7ebd665f2221ade0d71d (commit) from 48a685eec1940f1b325da99040cc532aa66be191 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fea939b6fe082fa2fd8276f7d59f9018e89af0fe Author: Werner Koch Date: Mon Oct 15 13:45:07 2018 +0200 Add context menu to copy the fingerprint(s). * src/keymanager.c (key_manager_copy_fpr): New. (key_manager_action_new): Add popup item -- This seems to be a quite useful extension. Signed-off-by: Werner Koch diff --git a/src/keymanager.c b/src/keymanager.c index d90fcc7..a352515 100644 --- a/src/keymanager.c +++ b/src/keymanager.c @@ -879,6 +879,59 @@ key_manager_copy (GtkAction *action, gpointer param) } +/* Copy the fingerprints of the keys into the clipboard. */ +static void +key_manager_copy_fpr (GtkAction *action, gpointer param) +{ + GpaKeyManager *self = param; + GList *selection, *item; + gpgme_protocol_t prot = GPGME_PROTOCOL_UNKNOWN; + gpgme_key_t key; + char *buffer = NULL; + char *p; + + selection = gpa_keylist_get_selected_keys (self->keylist, + GPGME_PROTOCOL_UNKNOWN); + if (!selection) + return; + + for (item = selection; item; item = g_list_next (item)) + { + key = (gpgme_key_t)item->data; + + if (prot == GPGME_PROTOCOL_UNKNOWN) + prot = key->protocol; + else if (prot != key->protocol) + { + gpa_window_error + (_("Only keys of the same procotol may be copied."), NULL); + g_free (buffer); + buffer = NULL; + break; + } + if (prot == GPGME_PROTOCOL_UNKNOWN) + ; + else if (!buffer) + buffer = g_strconcat (key->subkeys->fpr, "\n", NULL); + else + { + p = g_strconcat (buffer, key->subkeys->fpr, "\n", NULL); + g_free (buffer); + buffer = p; + } + } + if (buffer) + { + gtk_clipboard_set_text (gtk_clipboard_get + (GDK_SELECTION_PRIMARY), buffer, -1); + gtk_clipboard_set_text (gtk_clipboard_get + (GDK_SELECTION_CLIPBOARD), buffer, -1); + } + + g_free (buffer); +} + + /* Reload the key list. */ static void key_manager_refresh (GtkAction *action, gpointer param) @@ -922,7 +975,8 @@ key_manager_action_new (GpaKeyManager *self, GtkWidget **menu, GtkWidget **toolbar, GtkWidget **popup) { - static const GtkActionEntry entries[] = + static const + GtkActionEntry entries[] = { /* Toplevel. */ { "File", NULL, N_("_File"), NULL }, @@ -941,6 +995,8 @@ key_manager_action_new (GpaKeyManager *self, /* Edit menu. */ { "EditCopy", GTK_STOCK_COPY, NULL, NULL, N_("Copy the selection"), G_CALLBACK (key_manager_copy) }, + { "EditCopyFpr", GTK_STOCK_COPY, N_("Copy _Fingerprint"), "F", + N_("Copy the fingerprints"), G_CALLBACK (key_manager_copy_fpr) }, { "EditPaste", GTK_STOCK_PASTE, NULL, NULL, N_("Paste the clipboard"), G_CALLBACK (key_manager_paste) }, { "EditSelectAll", GTK_STOCK_SELECT_ALL, NULL, "A", @@ -1065,6 +1121,7 @@ key_manager_action_new (GpaKeyManager *self, #endif " " " " + " " " " " " " " @@ -1143,6 +1200,9 @@ key_manager_action_new (GpaKeyManager *self, action = gtk_action_group_get_action (action_group, "EditCopy"); add_selection_sensitive_action (self, action, key_manager_has_selection); + action = gtk_action_group_get_action (action_group, "EditCopyFpr"); + add_selection_sensitive_action (self, action, + key_manager_has_selection); action = gtk_action_group_get_action (action_group, "KeysDelete"); add_selection_sensitive_action (self, action, key_manager_has_selection); commit f5361478e121415e37ef7ebd665f2221ade0d71d Author: Werner Koch Date: Mon Oct 15 12:53:11 2018 +0200 Show GPGME version in the about dialog. * src/helpmenu.c (gpa_help_about): Include GPGME version. diff --git a/src/helpmenu.c b/src/helpmenu.c index 7e1b1e8..f269f04 100644 --- a/src/helpmenu.c +++ b/src/helpmenu.c @@ -83,8 +83,9 @@ gpa_help_about (GtkAction *action, GtkWindow *window) for (; engine; engine = engine->next) if (engine->protocol == GPGME_PROTOCOL_OpenPGP) break; - comment = g_strdup_printf ("[%s]\n\n(GnuPG %s)\n\n%s", + comment = g_strdup_printf ("[%s]\n\n(GPGME %s)\n(GnuPG %s)\n\n%s", BUILD_REVISION, + gpgme_check_version (NULL), engine? engine->version : "?", _("GPA is the GNU Privacy Assistant.")); logo = gpa_create_icon_pixbuf ("gpa_logo"); ----------------------------------------------------------------------- Summary of changes: src/helpmenu.c | 3 ++- src/keymanager.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 63 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 15 19:24:13 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 15 Oct 2018 19:24:13 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.9.10-21-g9e11986 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 9e119866c02ceba8f596fa16a990b5fae562c202 (commit) via f160e92d908e01d8d16e8bc1bca59e48b25746da (commit) from fea939b6fe082fa2fd8276f7d59f9018e89af0fe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9e119866c02ceba8f596fa16a990b5fae562c202 Author: Werner Koch Date: Mon Oct 15 16:53:52 2018 +0200 Add diagnostic button to some error report dialogs. * src/gpgmetools.c (_gpa_gpgme_warning): Rename to _gpa_gpgme_warn and add arg CTX. * src/gpgmetools.h (gpa_gpgme_warn): New macro (gpa_gpgme_warning, gpa_gpgme_warning_ext): Adjust macros. * src/gtktools.h: Include gpacontext.h. * src/gtktools.c (show_gtk_message): Add arg CTX and add button to show details. (gpa_show_info): Adjust to provide NULL for new arg. (gpa_show_warning): Renamed to ... (gpa_show_warn): this and add arg CTX. Change all callers to use new name and to pass NULL for CTX. * src/gpacontext.h (_GpaContext): Add field inhibit_gpgme_events. * src/gpacontext.c (gpa_context_get_diag): New. (gpa_context_event_cb): Inhibit events as needed. * src/gpafiledecryptop.c (gpa_file_decrypt_operation_done_error_cb): Pass the gpgme contextto gpa_show_warn or gpa_gpgme_warn. -- We need the inhibit thingy because we use gpgme_op_getauditlog in synchronous mode whilst the context has also been setup for asynchronous mode for the real operations. This is a peculiarity of getauditevent. Signed-off-by: Werner Koch diff --git a/src/confdialog.c b/src/confdialog.c index 35ac05e..7f83165 100644 --- a/src/confdialog.c +++ b/src/confdialog.c @@ -1614,8 +1614,8 @@ gpa_configure_keyserver (GtkWidget *parent) keyserver = gpa_load_configured_keyserver (); if (!keyserver) { - gpa_show_warning - (parent, _("Configuring the backend to use a keyserver failed")); + gpa_show_warn + (parent, NULL, _("Configuring the backend to use a keyserver failed")); return NULL; } return keyserver; diff --git a/src/gpacontext.c b/src/gpacontext.c index b049f84..72d532f 100644 --- a/src/gpacontext.c +++ b/src/gpacontext.c @@ -45,7 +45,7 @@ static void gpa_context_progress (GpaContext *context, int current, int total); /* The GPGME I/O callbacks */ static gpg_error_t gpa_context_register_cb (void *data, int fd, int dir, - gpgme_io_cb_t fnc, void *fnc_data, + gpgme_io_cb_t fnc, void *fnc_data, void **tag); static void gpa_context_remove_cb (void *tag); static void gpa_context_event_cb (void *data, gpgme_event_io_t type, @@ -53,7 +53,7 @@ static void gpa_context_event_cb (void *data, gpgme_event_io_t type, static gpg_error_t gpa_context_passphrase_cb (void *hook, const char *uid_hint, - const char *passphrase_info, int prev_was_bad, + const char *passphrase_info, int prev_was_bad, int fd); static void gpa_context_progress_cb (void *opaque, const char *what, @@ -77,7 +77,7 @@ GType gpa_context_get_type (void) { static GType context_type = 0; - + if (!context_type) { static const GTypeInfo context_info = @@ -92,12 +92,12 @@ gpa_context_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) gpa_context_init, }; - + context_type = g_type_register_static (G_TYPE_OBJECT, "GpaContext", &context_info, 0); } - + return context_type; } @@ -105,7 +105,7 @@ static void gpa_context_class_init (GpaContextClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + parent_class = g_type_class_peek_parent (klass); object_class->finalize = gpa_context_finalize; @@ -169,6 +169,7 @@ gpa_context_init (GpaContext *context) gpg_error_t err; context->busy = FALSE; + context->inhibit_gpgme_events = 0; /* The callback queue */ context->cbs = NULL; @@ -206,11 +207,11 @@ static void gpa_context_finalize (GObject *object) { GpaContext *context = GPA_CONTEXT (object); - + gpgme_release (context->ctx); g_list_free (context->cbs); g_free (context->io_cbs); - + G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -222,7 +223,7 @@ GpaContext * gpa_context_new (void) { GpaContext *context; - + context = g_object_new (GPA_CONTEXT_TYPE, NULL); return context; @@ -239,8 +240,47 @@ gpa_context_busy (GpaContext *context) return context->busy; } -/* - * The GPGME I/O callbacks + +/* Return a malloced string with the last diagnostic data of the + * context. Returns NULL if no diagnostics are available. */ +char * +gpa_context_get_diag (GpaContext *context) +{ +#if GPGME_VERSION_NUMBER >= 0x010c00 /* >= 1.12 */ + gpgme_data_t diag; + char *buffer, *result; + gpg_error_t err; + + if (!context) + return NULL; + if (gpgme_data_new (&diag)) + return NULL; /* Ooops. */ + + context->inhibit_gpgme_events++; + err = gpgme_op_getauditlog (context->ctx, diag, GPGME_AUDITLOG_DIAG); + context->inhibit_gpgme_events--; + if (err) + { + gpgme_data_release (diag); + return NULL; /* No data. */ + } + + /* Append a trailing zero and return the string. */ + gpgme_data_seek (diag, 0, SEEK_END); + gpgme_data_write (diag, "", 1); + buffer = gpgme_data_release_and_get_mem (diag, NULL); + result = g_strdup (buffer); + gpgme_free (buffer); + return result; +#else + return NULL; +#endif +} + + + +/* + * The GPGME I/O callbacks */ /* Registering callbacks with GLib */ @@ -282,7 +322,7 @@ static void register_callback (struct gpa_io_cb_data *cb) { GIOChannel *channel; - + #ifdef G_OS_WIN32 /* We have to ask GPGME for the GIOChannel to use. The "file descriptor" may not be a system file descriptor. */ @@ -292,7 +332,7 @@ register_callback (struct gpa_io_cb_data *cb) channel = g_io_channel_unix_new (cb->fd); #endif - cb->watch = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, + cb->watch = g_io_add_watch_full (channel, G_PRIORITY_DEFAULT, cb->dir ? READ_CONDITION : WRITE_CONDITION, gpa_io_cb, cb, NULL); cb->registered = TRUE; @@ -310,7 +350,7 @@ register_callback (struct gpa_io_cb_data *cb) */ static void add_callback (GpaContext *context, struct gpa_io_cb_data *cb) -{ +{ context->cbs = g_list_append (context->cbs, cb); } @@ -321,7 +361,7 @@ register_all_callbacks (GpaContext *context) { struct gpa_io_cb_data *cb; GList *list; - + for (list = context->cbs; list; list = g_list_next (list)) { cb = list->data; @@ -337,7 +377,7 @@ unregister_all_callbacks (GpaContext *context) { struct gpa_io_cb_data *cb; GList *list; - + for (list = context->cbs; list; list = g_list_next (list)) { cb = list->data; @@ -353,7 +393,7 @@ unregister_all_callbacks (GpaContext *context) /* The real GPGME callbacks */ /* Register a callback. This is called by GPGME when a crypto - operation is initiated in this context. */ + operation is initiated in this context. */ static gpg_error_t gpa_context_register_cb (void *data, int fd, int dir, gpgme_io_cb_t fnc, void *fnc_data, void **tag) @@ -364,7 +404,7 @@ gpa_context_register_cb (void *data, int fd, int dir, gpgme_io_cb_t fnc, cb->registered = FALSE; cb->fd = fd; - cb->dir = dir; + cb->dir = dir; cb->fnc = fnc; cb->fnc_data = fnc_data; cb->context = context; @@ -407,6 +447,9 @@ gpa_context_event_cb (void *data, gpgme_event_io_t type, void *type_data) GpaContext *context = data; gpg_error_t err, op_err; + if (context->inhibit_gpgme_events) + return; + switch (type) { case GPGME_EVENT_START: @@ -474,7 +517,7 @@ gpa_context_progress (GpaContext *context, int current, int total) /* The passphrase callback */ static gpg_error_t gpa_context_passphrase_cb (void *hook, const char *uid_hint, - const char *passphrase_info, int prev_was_bad, + const char *passphrase_info, int prev_was_bad, int fd) { GpaContext *context = hook; @@ -493,6 +536,5 @@ gpa_context_progress_cb (void *opaque, const char *what, int type, int current, int total) { GpaContext *context = opaque; - g_signal_emit (context, signals[PROGRESS], 0, current, total); + g_signal_emit (context, signals[PROGRESS], 0, current, total); } - diff --git a/src/gpacontext.h b/src/gpacontext.h index 42bcfc3..0a091bb 100644 --- a/src/gpacontext.h +++ b/src/gpacontext.h @@ -52,6 +52,8 @@ struct _GpaContext { GList *cbs; /* The IO callback structure */ struct gpgme_io_cbs *io_cbs; + /* Hack to block certain events. */ + int inhibit_gpgme_events; }; struct _GpaContextClass { @@ -77,5 +79,7 @@ GpaContext *gpa_context_new (void); */ gboolean gpa_context_busy (GpaContext *context); -#endif +/* Return a string with the diagnostics from gpgme. */ +char *gpa_context_get_diag (GpaContext *context); +#endif /*GPA_CONTEXT_H*/ diff --git a/src/gpaexportserverop.c b/src/gpaexportserverop.c index de3f781..ceae0b7 100644 --- a/src/gpaexportserverop.c +++ b/src/gpaexportserverop.c @@ -228,7 +228,7 @@ send_keys (GpaExportServerOperation *op, GList *keylist) if (err) { - gpa_show_warning (GPA_OPERATION (op)->window, + gpa_show_warn (GPA_OPERATION (op)->window, NULL, "%s\n\n(%s <%s>)", _("Error sending key(s) to the server."), gpg_strerror (err), gpg_strsource (err)); diff --git a/src/gpafiledecryptop.c b/src/gpafiledecryptop.c index c36da44..da8765d 100644 --- a/src/gpafiledecryptop.c +++ b/src/gpafiledecryptop.c @@ -502,7 +502,6 @@ gpa_file_decrypt_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaFileDecryptOperation *op) { gpa_file_item_t file_item = GPA_FILE_OPERATION (op)->current->data; - gchar *message; switch (gpg_err_code (err)) { @@ -511,33 +510,32 @@ gpa_file_decrypt_operation_done_error_cb (GpaContext *context, gpg_error_t err, /* Ignore these */ break; case GPG_ERR_NO_DATA: - message = g_strdup_printf (file_item->direct_name - ? _("\"%s\" contained no OpenPGP data.") - : _("The file \"%s\" contained no OpenPGP" - "data."), - file_item->direct_name - ? file_item->direct_name - : file_item->filename_in); - gpa_window_error (message, GPA_OPERATION (op)->window); - g_free (message); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + file_item->direct_name + ? _("\"%s\" contained no OpenPGP data.") + : _("The file \"%s\" contained no OpenPGP" + "data."), + file_item->direct_name + ? file_item->direct_name + : file_item->filename_in); break; case GPG_ERR_DECRYPT_FAILED: - message = g_strdup_printf (file_item->direct_name - ? _("\"%s\" contained no valid " - "encrypted data.") - : _("The file \"%s\" contained no valid " - "encrypted data."), - file_item->direct_name - ? file_item->direct_name - : file_item->filename_in); - gpa_window_error (message, GPA_OPERATION (op)->window); - g_free (message); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + file_item->direct_name + ? _("\"%s\" contained no valid " + "encrypted data.") + : _("The file \"%s\" contained no valid " + "encrypted data."), + file_item->direct_name + ? file_item->direct_name + : file_item->filename_in); break; case GPG_ERR_BAD_PASSPHRASE: - gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Wrong passphrase!")); break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpafileimportop.c b/src/gpafileimportop.c index 4cc0dc1..bb78c3f 100644 --- a/src/gpafileimportop.c +++ b/src/gpafileimportop.c @@ -289,7 +289,7 @@ gpa_file_import_operation_done_error_cb (GpaContext *context, gpg_error_t err, break; case GPG_ERR_NO_DATA: - gpa_show_warning (GPA_OPERATION (op)->window, + gpa_show_warn (GPA_OPERATION (op)->window, NULL, file_item->direct_name ? _("\"%s\" contained no OpenPGP data.") : _("The file \"%s\" contained no OpenPGP" @@ -300,7 +300,7 @@ gpa_file_import_operation_done_error_cb (GpaContext *context, gpg_error_t err, break; default: - gpa_show_warning (GPA_OPERATION (op)->window, + gpa_show_warn (GPA_OPERATION (op)->window, NULL, _("Error importing \"%s\": %s <%s>"), file_item->direct_name ? file_item->direct_name diff --git a/src/gpaimportserverop.c b/src/gpaimportserverop.c index fb3e0b9..7e347a2 100644 --- a/src/gpaimportserverop.c +++ b/src/gpaimportserverop.c @@ -166,7 +166,7 @@ search_keys (GpaImportOperation *operation, const char *keyid) { if (nkeys >= MAX_KEYSEARCH_RESULTS) { - gpa_show_warning (GPA_OPERATION (operation)->window, + gpa_show_warn (GPA_OPERATION (operation)->window, NULL, _("More than %d keys match your search pattern.\n" "Use the long keyid or a fingerprint " "for a better match"), nkeys); @@ -182,7 +182,7 @@ search_keys (GpaImportOperation *operation, const char *keyid) if (!err && !nkeys) { - gpa_show_warning (GPA_OPERATION (operation)->window, + gpa_show_warn (GPA_OPERATION (operation)->window, NULL, _("No keys were found.")); } else if (!err) diff --git a/src/gpgmetools.c b/src/gpgmetools.c index 2dfd741..e2631ff 100644 --- a/src/gpgmetools.c +++ b/src/gpgmetools.c @@ -81,14 +81,13 @@ _gpa_gpgme_error (gpg_error_t err, const char *file, int line) } -/* (Please use the gpa_gpgme_warning macros). */ +/* (Please use the gpa_gpgme_warn macros). */ void -_gpa_gpgme_warning (gpg_error_t err, const char *desc, - const char *file, int line) +_gpa_gpgme_warn (gpg_error_t err, const char *desc, GpaContext *ctx, + const char *file, int line) { char *argbuf = NULL; const char *arg; - char *message; if (desc && (!err || gpg_err_code (err) == GPG_ERR_GENERAL)) arg = desc; @@ -100,16 +99,14 @@ _gpa_gpgme_warning (gpg_error_t err, const char *desc, else arg = gpgme_strerror (err); - message = g_strdup_printf - (_("The GPGME library returned an unexpected\n" - "error at %s:%d. The error was:\n\n" - "\t%s\n\n" - "This is either an installation problem or a bug in %s.\n" - "%s will now try to recover from this error."), - strip_path (file), line, arg, GPA_NAME, GPA_NAME); + gpa_show_warn (NULL, ctx, + _("The GPGME library returned an unexpected\n" + "error at %s:%d. The error was:\n\n" + "\t%s\n\n" + "This is either an installation problem or a bug in %s.\n" + "%s will now try to recover from this error."), + strip_path (file), line, arg, GPA_NAME, GPA_NAME); g_free (argbuf); - gpa_window_error (message, NULL); - g_free (message); } @@ -1310,7 +1307,7 @@ gpa_gpgme_show_import_results (GtkWidget *parent, gpa_import_result_t result) if (!result->considered) - gpa_show_warning (parent, "%s%s%s", + gpa_show_warn (parent, NULL, "%s%s%s", _("No keys were found."), buf2? "\n":"", buf2? buf2:""); diff --git a/src/gpgmetools.h b/src/gpgmetools.h index dc39839..95ab4d5 100644 --- a/src/gpgmetools.h +++ b/src/gpgmetools.h @@ -27,6 +27,8 @@ #include #include +#include "gpacontext.h" + /* Internal algorithm identifiers, describing which keys to create. */ typedef enum @@ -96,12 +98,14 @@ void _gpa_gpgme_error (gpg_error_t err, const char *file, int line) G_GNUC_NORETURN; /* The same as gpa_gpgme_error, without quitting. */ +#define gpa_gpgme_warn(err,desc,ctx) \ + do { _gpa_gpgme_warn (err, desc, ctx, __FILE__, __LINE__); } while (0) #define gpa_gpgme_warning_ext(err,desc) \ - do { _gpa_gpgme_warning (err, desc, __FILE__, __LINE__); } while (0) + do { _gpa_gpgme_warn (err, desc, NULL, __FILE__, __LINE__); } while (0) #define gpa_gpgme_warning(err) \ - do { _gpa_gpgme_warning (err, NULL, __FILE__, __LINE__); } while (0) -void _gpa_gpgme_warning (gpg_error_t err, const char *desc, - const char *file, int line); + do { _gpa_gpgme_warn (err, NULL, NULL, __FILE__, __LINE__); } while (0) +void _gpa_gpgme_warn (gpg_error_t err, const char *desc, GpaContext *ctx, + const char *file, int line); /* Initialize a gpgme_ctx_t for use with GPA. */ gpgme_ctx_t gpa_gpgme_new (void); diff --git a/src/gtktools.c b/src/gtktools.c index 8bf2867..b0f9ba8 100644 --- a/src/gtktools.c +++ b/src/gtktools.c @@ -34,12 +34,11 @@ #include "gpawindowkeeper.h" #include "icons.h" - /* Deprecated - use gpa_show_warning instead. */ void gpa_window_error (const gchar *message, GtkWidget *messenger) { - gpa_show_warning (messenger, "%s", message); + gpa_show_warn (messenger, NULL, "%s", message); } @@ -52,7 +51,7 @@ gpa_window_message (const gchar *message, GtkWidget * messenger) static void -show_gtk_message (GtkWidget *parent, GtkMessageType mtype, +show_gtk_message (GtkWidget *parent, GtkMessageType mtype, GpaContext *ctx, const char *format, va_list arg_ptr) { GtkWidget *dialog; @@ -65,9 +64,26 @@ show_gtk_message (GtkWidget *parent, GtkMessageType mtype, GTK_BUTTONS_CLOSE, "%s", buffer); g_free (buffer); + buffer = NULL; + if (ctx) + gtk_dialog_add_buttons (GTK_DIALOG (dialog), + _("_Details"), GTK_RESPONSE_HELP, + NULL); gtk_widget_show_all (dialog); - gtk_dialog_run (GTK_DIALOG (dialog)); + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_HELP && ctx) + { + /* If requested and possible get diagnostics from GPGME. */ + buffer = gpa_context_get_diag (ctx); + if (!buffer) + gpa_show_info (parent, "No diagnostic data available"); + else + { + gpa_show_info (parent, "Diagnostics:\n%s", buffer); + g_free (buffer); + } + } + gtk_widget_destroy (dialog); } @@ -79,19 +95,21 @@ gpa_show_info (GtkWidget *parent, const char *format, ...) va_list arg_ptr; va_start (arg_ptr, format); - show_gtk_message (parent, GTK_MESSAGE_INFO, format, arg_ptr); + show_gtk_message (parent, GTK_MESSAGE_INFO, NULL, format, arg_ptr); va_end (arg_ptr); } -/* Show a modal warning message. */ +/* Show a modal warning message. PARENT is the parent windows, CTX is + * eitehr NULL or a related GPGME context to be used to allow shoing + * additional information. */ void -gpa_show_warning (GtkWidget *parent, const char *format, ...) +gpa_show_warn (GtkWidget *parent, GpaContext *ctx, const char *format, ...) { va_list arg_ptr; va_start (arg_ptr, format); - show_gtk_message (parent, GTK_MESSAGE_WARNING, format, arg_ptr); + show_gtk_message (parent, GTK_MESSAGE_WARNING, ctx, format, arg_ptr); va_end (arg_ptr); } diff --git a/src/gtktools.h b/src/gtktools.h index 41fafc5..ce9a969 100644 --- a/src/gtktools.h +++ b/src/gtktools.h @@ -21,15 +21,18 @@ #ifndef GTK_TOOLS_H_ #define GTK_TOOLS_H_ +#include #include +#include "gpacontext.h" + /* Show a modal info message. */ void gpa_show_info (GtkWidget *parent, const char *format, ...) G_GNUC_PRINTF(2,3); /* Show a modal warning message. */ -void gpa_show_warning (GtkWidget *parent, - const char *format, ...) G_GNUC_PRINTF(2,3); +void gpa_show_warn (GtkWidget *parent, GpaContext *ctx, + const char *format, ...) G_GNUC_PRINTF(3,4); /* Set a tooltip TEXT to WIDGET. TEXT and WIDGET may both be NULL. This function is useful so that GPA can be build with older GTK+ commit f160e92d908e01d8d16e8bc1bca59e48b25746da Author: Werner Koch Date: Mon Oct 15 14:47:25 2018 +0200 Let Server->Retrieve_Key use --locate-key for a mail address. * src/gpaimportserverop.c (search_keys): Detect mbox style keyids and use --locate-key. Signed-off-by: Werner Koch diff --git a/src/gpaimportserverop.c b/src/gpaimportserverop.c index fe383a3..fb3e0b9 100644 --- a/src/gpaimportserverop.c +++ b/src/gpaimportserverop.c @@ -128,6 +128,8 @@ search_keys (GpaImportOperation *operation, const char *keyid) gpgme_key_t key; gpgme_key_t *keyarray; int i, nkeys; + gpgme_keylist_mode_t listmode; + char *mbox = NULL; if (!keyid || !*keyid) return FALSE; @@ -139,8 +141,20 @@ search_keys (GpaImportOperation *operation, const char *keyid) actual import operation done later. */ ctx = gpa_gpgme_new (); gpgme_set_protocol (ctx, GPGME_PROTOCOL_OpenPGP); - /* Switch to extern-only list mode. */ - err = gpgme_set_keylist_mode (ctx, GPGME_KEYLIST_MODE_EXTERN); + /* Switch to extern-only or locate list mode. We use --locate-key + * iff KEYID is a single mail address. */ + listmode = GPGME_KEYLIST_MODE_EXTERN; +#if GPGME_VERSION_NUMBER >= 0x010701 + mbox = gpgme_addrspec_from_uid (keyid); + if (mbox) + { + listmode = GPGME_KEYLIST_MODE_LOCATE; + /* We already extracted the mbox - use it directly than letting + * gnupg extract it. */ + keyid = mbox; + } +#endif /* GPGME >= 1.7.1 */ + err = gpgme_set_keylist_mode (ctx, listmode); if (err) gpa_gpgme_error (err); @@ -187,6 +201,8 @@ search_keys (GpaImportOperation *operation, const char *keyid) gpgme_key_unref (keyarray[i]); g_free (keyarray); } + + gpgme_free (mbox); return result; } ----------------------------------------------------------------------- Summary of changes: src/confdialog.c | 4 +-- src/gpacontext.c | 84 ++++++++++++++++++++++++++++++++++++------------- src/gpacontext.h | 6 +++- src/gpaexportserverop.c | 2 +- src/gpafiledecryptop.c | 42 ++++++++++++------------- src/gpafileimportop.c | 4 +-- src/gpaimportserverop.c | 24 +++++++++++--- src/gpgmetools.c | 25 +++++++-------- src/gpgmetools.h | 12 ++++--- src/gtktools.c | 34 +++++++++++++++----- src/gtktools.h | 7 +++-- 11 files changed, 163 insertions(+), 81 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 15 21:14:03 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 15 Oct 2018 21:14:03 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.9.10-22-gf8d64d1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via f8d64d13a15a4c8eaf8d41c536e1534ea2405ddf (commit) from 9e119866c02ceba8f596fa16a990b5fae562c202 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f8d64d13a15a4c8eaf8d41c536e1534ea2405ddf Author: Werner Koch Date: Mon Oct 15 21:13:46 2018 +0200 Add context menu to copy a private key to the clipboard. * src/gpaexportop.c (PROP_SECRET): New. (gpa_export_operation_get_property): Add new property. (gpa_export_operation_set_property): Add new property. (gpa_export_operation_class_init): Install property. (gpa_export_operation_idle_cb): USe Secret export mode. * src/gpaexportclipop.c (gpa_export_clipboard_operation_complete_export): Improve message. * src/gpaexportclipop.c (gpa_export_clipboard_operation_new): Add arg 'secret' and change caller. * src/keymanager.c (key_manager_copy_sec): New. (key_manager_action_new): Register function. -- GnuPG-bug-id: 4049 Signed-off-by: Werner Koch diff --git a/src/gpaexportclipop.c b/src/gpaexportclipop.c index 1e4c306..b3f9acf 100644 --- a/src/gpaexportclipop.c +++ b/src/gpaexportclipop.c @@ -134,22 +134,33 @@ static void gpa_export_clipboard_operation_complete_export (GpaExportOperation *operation) { GpaExportClipboardOperation *op = GPA_EXPORT_CLIPBOARD_OPERATION (operation); + gboolean is_secret; + GList *keys; + unsigned int nkeys; + + g_object_get (op, "secret", &is_secret, "keys", &keys, NULL); + nkeys = g_list_length (keys); if (!dump_data_to_clipboard (operation->dest, gtk_clipboard_get (GDK_SELECTION_CLIPBOARD))) - gpa_show_info(GPA_OPERATION (op)->window, - _("The keys have been copied to the clipboard.")); + gpa_show_info + (GPA_OPERATION (op)->window, + is_secret? _("The private key has been copied to the clipboard.") : + nkeys==1 ? _("The key has bees copied to the clipboard.") : + /* */ _("The keys have been copied to the clipboard.")); } /* API */ GpaExportClipboardOperation* -gpa_export_clipboard_operation_new (GtkWidget *window, GList *keys) +gpa_export_clipboard_operation_new (GtkWidget *window, GList *keys, + gboolean secret) { GpaExportClipboardOperation *op; op = g_object_new (GPA_EXPORT_CLIPBOARD_OPERATION_TYPE, "window", window, "keys", keys, + "secret", secret, NULL); return op; diff --git a/src/gpaexportclipop.h b/src/gpaexportclipop.h index a0d7b94..c99d595 100644 --- a/src/gpaexportclipop.h +++ b/src/gpaexportclipop.h @@ -54,6 +54,7 @@ GType gpa_export_clipboard_operation_get_type (void) G_GNUC_CONST; /* Creates a new export to file operation. */ GpaExportClipboardOperation* -gpa_export_clipboard_operation_new (GtkWidget *window, GList *keys); + gpa_export_clipboard_operation_new (GtkWidget *window, GList *keys, + gboolean secret); #endif diff --git a/src/gpaexportop.c b/src/gpaexportop.c index 9caf49f..d20f785 100644 --- a/src/gpaexportop.c +++ b/src/gpaexportop.c @@ -32,7 +32,8 @@ static GObjectClass *parent_class = NULL; enum { PROP_0, - PROP_KEYS + PROP_KEYS, + PROP_SECRET }; static gboolean gpa_export_operation_idle_cb (gpointer data); @@ -57,6 +58,9 @@ gpa_export_operation_get_property (GObject *object, case PROP_KEYS: g_value_set_pointer (value, op->keys); break; + case PROP_SECRET: + g_value_set_boolean (value, op->secret); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -78,6 +82,9 @@ gpa_export_operation_set_property (GObject *object, /* Make sure we keep a reference for our keys */ g_list_foreach (op->keys, (GFunc) gpgme_key_ref, NULL); break; + case PROP_SECRET: + op->secret = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -106,6 +113,7 @@ gpa_export_operation_init (GpaExportOperation *op) { op->keys = NULL; op->dest = NULL; + op->secret = 0; } static GObject* @@ -156,7 +164,13 @@ gpa_export_operation_class_init (GpaExportOperationClass *klass) g_param_spec_pointer ("keys", "Keys", "Keys", - G_PARAM_WRITABLE|G_PARAM_CONSTRUCT_ONLY)); + G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property (object_class, + PROP_SECRET, + g_param_spec_boolean + ("secret", "Secret", + "Secret", FALSE, + G_PARAM_READWRITE|G_PARAM_CONSTRUCT_ONLY)); } GType @@ -203,6 +217,7 @@ gpa_export_operation_idle_cb (gpointer data) GList *k; int i; gpgme_protocol_t prot = GPGME_PROTOCOL_UNKNOWN; + gboolean secret; gpgme_set_armor (GPA_OPERATION (op)->context->ctx, armor); /* Create the set of keys to export */ @@ -229,8 +244,11 @@ gpa_export_operation_idle_cb (gpointer data) } gpgme_set_protocol (GPA_OPERATION (op)->context->ctx, prot); /* Export to the gpgme_data_t */ + g_object_get (op, "secret", &secret, NULL); err = gpgme_op_export_ext_start (GPA_OPERATION (op)->context->ctx, - patterns, 0, op->dest); + patterns, + secret? GPGME_EXPORT_MODE_SECRET : 0, + op->dest); if (err) { gpa_gpgme_warning (err); diff --git a/src/gpaexportop.h b/src/gpaexportop.h index 128e903..c88763d 100644 --- a/src/gpaexportop.h +++ b/src/gpaexportop.h @@ -43,6 +43,9 @@ struct _GpaExportOperation { GList *keys; gpgme_data_t dest; + + /*:: private ::*/ + int secret; }; struct _GpaExportOperationClass { diff --git a/src/keymanager.c b/src/keymanager.c index a352515..ff64b0a 100644 --- a/src/keymanager.c +++ b/src/keymanager.c @@ -874,7 +874,25 @@ key_manager_copy (GtkAction *action, gpointer param) if (! selection) return; - op = gpa_export_clipboard_operation_new (GTK_WIDGET (self), selection); + op = gpa_export_clipboard_operation_new (GTK_WIDGET (self), selection, 0); + register_operation (self, GPA_OPERATION (op)); +} + + +/* Copy the secret keys into the clipboard. */ +static void +key_manager_copy_sec (GtkAction *action, gpointer param) +{ + GpaKeyManager *self = param; + GList *selection; + GpaExportClipboardOperation *op; + + selection = gpa_keylist_get_selected_keys (self->keylist, + GPGME_PROTOCOL_UNKNOWN); + if (!selection || g_list_length (selection) != 1) + return; + + op = gpa_export_clipboard_operation_new (GTK_WIDGET (self), selection, 1); register_operation (self, GPA_OPERATION (op)); } @@ -997,6 +1015,8 @@ key_manager_action_new (GpaKeyManager *self, N_("Copy the selection"), G_CALLBACK (key_manager_copy) }, { "EditCopyFpr", GTK_STOCK_COPY, N_("Copy _Fingerprint"), "F", N_("Copy the fingerprints"), G_CALLBACK (key_manager_copy_fpr) }, + { "EditCopySec", GTK_STOCK_COPY, N_("Copy Private Key"), NULL, + N_("Copy a single private key"), G_CALLBACK (key_manager_copy_sec) }, { "EditPaste", GTK_STOCK_PASTE, NULL, NULL, N_("Paste the clipboard"), G_CALLBACK (key_manager_paste) }, { "EditSelectAll", GTK_STOCK_SELECT_ALL, NULL, "A", @@ -1129,6 +1149,7 @@ key_manager_action_new (GpaKeyManager *self, " " " " " " + " " " " " " #ifdef ENABLE_KEYSERVER_SUPPORT @@ -1203,6 +1224,9 @@ key_manager_action_new (GpaKeyManager *self, action = gtk_action_group_get_action (action_group, "EditCopyFpr"); add_selection_sensitive_action (self, action, key_manager_has_selection); + action = gtk_action_group_get_action (action_group, "EditCopySec"); + add_selection_sensitive_action (self, action, + key_manager_has_single_selection); action = gtk_action_group_get_action (action_group, "KeysDelete"); add_selection_sensitive_action (self, action, key_manager_has_selection); ----------------------------------------------------------------------- Summary of changes: src/gpaexportclipop.c | 17 ++++++++++++++--- src/gpaexportclipop.h | 3 ++- src/gpaexportop.c | 24 +++++++++++++++++++++--- src/gpaexportop.h | 3 +++ src/keymanager.c | 26 +++++++++++++++++++++++++- 5 files changed, 65 insertions(+), 8 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 15 21:24:04 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 15 Oct 2018 21:24:04 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.9.10-23-g38bdae2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 38bdae22d127e05903310ea1596d97c562ecd7c5 (commit) from f8d64d13a15a4c8eaf8d41c536e1534ea2405ddf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 38bdae22d127e05903310ea1596d97c562ecd7c5 Author: Werner Koch Date: Mon Oct 15 21:23:45 2018 +0200 po: Update Swedish translation diff --git a/po/sv.po b/po/sv.po index dd70070..0fabd34 100644 --- a/po/sv.po +++ b/po/sv.po @@ -1,6 +1,7 @@ # Swedish translation for GNU Privacy Assistant. # Copyright (C) 2006, 2008 Free Software Foundation # This file is distributed under the same license as the gpa package. +# Andreas R?nnquist , 2014, 2017. # Daniel Nylander , 2006, 2008. # Mick Ohrberg , 2003. # @@ -8,14 +9,15 @@ msgid "" msgstr "" "Project-Id-Version: gpa\n" "Report-Msgid-Bugs-To: translations at gnupg.org\n" -"PO-Revision-Date: 2011-12-12 10:13+0100\n" -"Last-Translator: Daniel Nylander \n" +"PO-Revision-Date: 2017-08-29 01:46+0200\n" +"Last-Translator: Andreas R?nnquist \n" "Language-Team: Swedish \n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.8.11\n" msgid "Open File" msgstr "?ppna fil" @@ -25,9 +27,9 @@ msgstr "GPA-meddelande" #. TRANSLATORS: The arguments are the filename, the integer size #. and the unit (such as KB or MB). -#, fuzzy, c-format +#, c-format msgid "The file %s is %llu%s large. Do you really want to open it?" -msgstr "Filen %s ?r %lli%s stor. Vill du verkligen ?ppna den?" +msgstr "Filen %s ?r %llu%s stor. Vill du verkligen ?ppna den?" msgid "Save As..." msgstr "Spara som..." @@ -95,9 +97,8 @@ msgstr "Nyckelring" msgid "Files" msgstr "Filer" -#, fuzzy msgid "Card" -msgstr "Urklipp" +msgstr "Kort" msgid "Main" msgstr "Allm?nt" @@ -149,11 +150,10 @@ msgid "Expert" msgstr "Expert" msgid "A keyserver has not been configured." -msgstr "" +msgstr "En nyckelserver har inte konfigurerats." -#, fuzzy msgid "Configure backend to use a keyserver?" -msgstr "Konfigurera bak?ndesprogram" +msgstr "Konfigurera bak?ndesprogram f?r att anv?nda en nyckelserver?" msgid "_Yes" msgstr "_Ja" @@ -161,9 +161,9 @@ msgstr "_Ja" msgid "_No" msgstr "_Nej" -#, fuzzy msgid "Configuring the backend to use a keyserver failed" -msgstr "Konfigurera bak?ndesprogram" +msgstr "" +"Misslyckades att konfigurera bak?ndesprogram f?r att anv?nda en nyckelserver" msgid "days" msgstr "dagar" @@ -184,20 +184,19 @@ msgid "unknown" msgstr "ok?nt" msgid "Mr." -msgstr "" +msgstr "Herr" msgid "Ms." -msgstr "" +msgstr "Fru" -#, fuzzy msgid "(unknown)" -msgstr "ok?nt" +msgstr "(ok?nd)" msgid "Encrypt documents" msgstr "Kryptera dokument" msgid "_Public Keys" -msgstr "_Publika nycklar" +msgstr "?_ppna nycklar" msgid "_Sign" msgstr "_Signera" @@ -274,16 +273,14 @@ msgstr "_Frikopplad signatur" msgid "Output version information and exit" msgstr "Skriv ut versionsinformation och avsluta" -#, fuzzy msgid "Open key manager (default)" -msgstr "?ppna nyckelringsredigeraren (standard)" +msgstr "?ppna nyckelhanteraren (standard)" msgid "Open file manager" msgstr "?ppna filhanteraren" -#, fuzzy msgid "Open the card manager" -msgstr "?ppna filhanteraren" +msgstr "?ppna korthanteraren" msgid "Open clipboard" msgstr "?ppna urklipp" @@ -291,18 +288,17 @@ msgstr "?ppna urklipp" msgid "Open the settings dialog" msgstr "?ppna inst?llningsdialogen" -#, fuzzy msgid "Only start the UI server" -msgstr "Aktivera anv?ndargr?nssnittsservern (inneb?r --cms)" +msgstr "Starta endast anv?ndargr?nssnittsservern" msgid "Disable support for X.509" -msgstr "" +msgstr "Inaktivera st?d f?r X.509" msgid "Read options from file" msgstr "L?s flaggor fr?n fil" msgid "Do not connect to a running instance" -msgstr "" +msgstr "Anslut inte till en k?rande instans" msgid "[FILE...]" msgstr "[FIL...]" @@ -334,7 +330,7 @@ msgstr "Inst?llningar f?r bak?nde" msgid "Configure the backend programs" msgstr "Konfigurera bak?ndesprogram" -#, fuzzy, c-format +#, c-format msgid "" "A copy of your secret key has been made to the file:\n" "\n" @@ -345,10 +341,10 @@ msgid "" msgstr "" "En kopia av din hemliga nyckel har skapats i filen:\n" "\n" -"\t\"%s\"\n" +"\t?%s?\n" "\n" -"Detta ?r k?nslig information som b?r lagras p? ett noggrannt\n" -"utvalt st?lle (t.ex. p? en diskett i ett kassask?p)." +"Detta ?r k?nslig information, och b?r f?rvaras noggrant\n" +"(exempelvis p? ett USB-minne som f?rvaras p? en s?ker plats)." msgid "An error ocurred during the backup operation." msgstr "Ett fel intr?ffade under s?kerhetskopieringen." @@ -356,15 +352,15 @@ msgstr "Ett fel intr?ffade under s?kerhetskopieringen." msgid "Backup key to file" msgstr "S?kerhetskopiera nyckel till fil" -#, fuzzy, c-format +#, c-format msgid "Generating backup of key: 0x%s" -msgstr "Skapar s?kerhetskopia av nyckel: %s" +msgstr "Skapar s?kerhetskopia av nyckel: 0x%s" msgid "The keys have been copied to the clipboard." msgstr "Nycklarna har kopierats till urklipp." msgid "Export public keys to file" -msgstr "Exportera publika nycklar till fil" +msgstr "Exportera ?ppna nycklar till fil" msgid "_armor" msgstr "AS_CII-skal" @@ -374,24 +370,21 @@ msgid "The keys have been exported to %s." msgstr "Nycklarna har exporterats till %s." msgid "Only keys of the same procotol may be exported as a collection." -msgstr "" +msgstr "Endast nycklar av samma protokoll f?r exporteras som en samling." -#, fuzzy, c-format +#, c-format msgid "" "The selected key(s) will be sent to a public key\n" "server (\"%s\")." msgstr "" "Den valda nyckeln kommer att skickas till en\n" -"publik nyckelserver (\"%s\").\n" -"?r du s?ker p? att du vill distribuera nyckeln?" +"?ppen nyckelserver (?%s?)." -#, fuzzy msgid "Are you sure you want to distribute this key?" -msgstr "?r du s?ker p? att du vill ta bort denna nyckel?" +msgstr "?r du s?ker p? att du vill distribuera denna nyckel?" -#, fuzzy msgid "Error sending key(s) to the server." -msgstr "Skicka nycklar till server" +msgstr "Fel vid skickande av nycklar till servern." msgid "The keys have been sent to the server." msgstr "Nycklarna har skickats till servern." @@ -401,19 +394,19 @@ msgstr "Dekrypterar..." #, c-format msgid "\"%s\" contained no OpenPGP data." -msgstr "\"%s\" inneh?ll ingen OpenPGP-data." +msgstr "?%s? inneh?ll ingen OpenPGP-data." #, c-format msgid "The file \"%s\" contained no OpenPGPdata." -msgstr "Filen \"%s\" inneh?ll ingen OpenPGP-data." +msgstr "Filen ?%s? inneh?ll ingen OpenPGP-data." #, c-format msgid "\"%s\" contained no valid encrypted data." -msgstr "\"%s\" inneh?ll ingen giltig krypterad data." +msgstr "?%s? inneh?ll ingen giltig krypterad data." -#, fuzzy, c-format +#, c-format msgid "The file \"%s\" contained no valid encrypted data." -msgstr "Filen \"%s\" inneh?ll ingen giltig krypterad data." +msgstr "Filen \"%s\" inneh?ller ingen giltig krypterad data," msgid "Wrong passphrase!" msgstr "Fel l?senfras!" @@ -482,15 +475,16 @@ msgstr "" msgid "Generating Key..." msgstr "Genererar nyckel..." -#, fuzzy msgid "Import keys from file" -msgstr "Importera publika nycklar fr?n fil" +msgstr "Importera nycklar fr?n fil" #, c-format msgid "" "More than %d keys match your search pattern.\n" "Use the long keyid or a fingerprint for a better match" msgstr "" +"Mer ?n %d nycklar matchar din s?kstr?ng.\n" +"Anv?nd l?ngt nyckelid eller ett fingeravtryck f?r en b?ttre matchning" msgid "No keys were found." msgstr "Inga nycklar hittades." @@ -502,13 +496,11 @@ msgstr "" "Ogiltig tid angiven.\n" "(du kan inte st?lla in utg?ngsdatumet till d?tid.)" -#, fuzzy msgid "Created" -msgstr "Skapad den:" +msgstr "Skapad" -#, fuzzy msgid "The Creation Date is the date the certificate was created." -msgstr "Utg?ngsdatum ?r det datum som certifikatet ?r giltigt fram till." +msgstr "?Skapad? ?r datumet d? certifikatet skapades." msgid "User Name" msgstr "Anv?ndarnamn" @@ -525,11 +517,8 @@ msgstr "Den h?r nyckeln har redan signerats med din egen nyckel!" msgid "You haven't selected a default key to sign with!" msgstr "Du har inte valt en standardnyckel att signera med!" -#, fuzzy msgid "Which key do you want to import?" -msgstr "" -"Vilken nyckel vill du importera? (Nyckeln m?ste anges med dess " -"nyckelidentitet)." +msgstr "Vilken nyckel vill du importera?" msgid "Which key do you want to import? (The key must be specified by key ID)." msgstr "" @@ -566,52 +555,50 @@ msgstr "Undernyckelsidentitet" msgid "Status" msgstr "Status" -#, fuzzy msgid "Algo" -msgstr "Algoritm" +msgstr "Algo" msgid "Size" msgstr "Storlek" -#, fuzzy msgid "Expires" -msgstr "Utg?ngen" +msgstr "Utg?r" msgid "S" -msgstr "" +msgstr "S" msgid "Can sign" msgstr "Kan signera" msgid "C" -msgstr "" +msgstr "C" msgid "Can certify" msgstr "Kan certifiera" msgid "E" -msgstr "" +msgstr "K" msgid "Can encrypt" msgstr "Kan kryptera" msgid "A" -msgstr "" +msgstr "A" msgid "Can authenticate" -msgstr "Kan authentisera" +msgstr "Kan autentisera" msgid "T" -msgstr "" +msgstr "T" msgid "Secret key stored on a smartcard." -msgstr "" +msgstr "Hemlig nyckel lagrad p? ett smartkort" msgid "Card S/N" -msgstr "" +msgstr "S/N f?r Kort" msgid "Serial number of the smart card." -msgstr "" +msgstr "Smartkortets serienummer." msgid "Revoked" msgstr "Sp?rrad" @@ -660,12 +647,14 @@ msgstr "" "Ogiltigt infogande av utg?ngsdatum." msgid "(not set)" -msgstr "" +msgstr "(ej satt)" msgid "" "Keys are already stored on the card.\n" "Really replace existing keys?" msgstr "" +"Nycklar lagras redan p? kortet.\n" +"Vill du verkligen ers?tta existerande nycklar?" #, c-format msgid "" @@ -683,7 +672,7 @@ msgstr "" "\n" "Programmet kommer nu att avslutas." -#, fuzzy, c-format +#, c-format msgid "" "The GPGME library returned an unexpected\n" "error at %s:%d. The error was:\n" @@ -694,12 +683,12 @@ msgid "" "%s will now try to recover from this error." msgstr "" "GPGME-biblioteket returnerade ett ov?ntat\n" -"fel. Felet var:\n" +"fel vid %s:%d. Felet var:\n" "\n" "\t%s\n" "\n" -"Det h?r ?r antagligen ett fel i GPA.\n" -"GPA kommer nu att f?rs?ka komma ?ver felet." +"Detta ?r antingen ett installationsproblem eller ett fel i %s\n" +"%s kommer nu att f?rs?ka ?terh?mta sig fr?n detta fel." #, c-format msgid "" @@ -710,11 +699,10 @@ msgstr "" "Vill du skriva ?ver den?" msgid "_Use a different filename" -msgstr "" +msgstr "An_v?nd ett annat filnamn" -#, fuzzy msgid "_Open" -msgstr "/Arkiv/_?ppna" +msgstr "?_ppna" msgid "" "************************************************************************\n" @@ -833,29 +821,28 @@ msgstr "Bra signatur av ok?nd nyckel: %s" msgid "Good signature by unknown key" msgstr "Bra signatur av ok?nd nyckel" -#, fuzzy, c-format +#, c-format msgid "Uncertain signature by %s: %s" -msgstr "Ogiltig signatur av %s: %s" +msgstr "Os?ker signatur av %s: %s" -#, fuzzy, c-format +#, c-format msgid "Uncertain signature by %s" -msgstr "Ogiltig signatur av %s" +msgstr "Os?ker signatur av %s" -#, fuzzy, c-format +#, c-format msgid "Uncertain signature by unknown key %s: %s" -msgstr "Ogiltig signatur av ok?nd nyckel %s: %s" +msgstr "Os?ker signatur av ok?nd nyckel %s: %s" -#, fuzzy, c-format +#, c-format msgid "Uncertain signature by unknown key %s" -msgstr "Ogiltig signatur av ok?nd nyckel %s" +msgstr "Os?ker signatur av ok?nd nyckel %s" -#, fuzzy, c-format +#, c-format msgid "Uncertain signature by unknown key: %s" -msgstr "Ogiltig signatur av ok?nd nyckel: %s" +msgstr "Os?ker signatur av ok?nd nyckel: %s" -#, fuzzy msgid "Uncertain signature by unknown key" -msgstr "Ogiltig signatur av ok?nd nyckel" +msgstr "Os?ker signatur av ok?nd nyckel" msgid "The key can be used for certification, signing and encryption." msgstr "Nyckeln kan anv?ndas f?r certifiering, signering och kryptering." @@ -891,6 +878,8 @@ msgid "" "%u file(s) read\n" "%u file(s) with errors" msgstr "" +"%u fil(er) l?sta\n" +"%u fil(er) med fel" #, c-format msgid "" @@ -901,37 +890,36 @@ msgid "" "%i secret keys imported\n" "%i secret keys unchanged" msgstr "" -"%i publika nycklar inl?sta\n" -"%i publika nycklar importerade\n" -"%i publika nycklar of?r?ndrade\n" +"%i ?ppna nycklar inl?sta\n" +"%i ?ppna nycklar importerade\n" +"%i ?ppna nycklar of?r?ndrade\n" "%i hemliga nycklar inl?sta\n" "%i hemliga nycklar importerade\n" "%i hemliga nycklar of?r?ndrade" msgid "A required engine component is not installed." -msgstr "" +msgstr "En motorkomponent som kr?vs ?r inte installerad." msgid "Calling the crypto engine program failed." -msgstr "" +msgstr "Misslyckades att anropa programmet f?r kryptomotorn." -#, fuzzy msgid "You must enter a name." -msgstr "Du m?ste ange en anv?ndaridentitet." +msgstr "Du m?ste mata in ett namn." msgid "Invalid character in name." -msgstr "" +msgstr "Ogiltigt tecken i namn." msgid "Name may not start with a digit." -msgstr "" +msgstr "Namn f?r inte b?rja med en siffra." msgid "Name is too short." -msgstr "" +msgstr "Namnet ?r f?r kort." msgid "Email address is not valid." -msgstr "" +msgstr "E-postadressen ?r inte giltig." msgid "Invalid character in comments." -msgstr "" +msgstr "Ogiltiga tecken i kommentarer." msgid "GPA is the GNU Privacy Assistant." msgstr "GPA ?r GNU Privacy Assistant." @@ -942,7 +930,7 @@ msgstr "Om GPA" #. TRANSLATORS: The translation of this string should #. be your name and mail msgid "translator-credits" -msgstr "" +msgstr "Andreas R?nnquist , ? 2017" msgid "_Help" msgstr "_Hj?lp" @@ -968,9 +956,8 @@ msgstr "Ko_rtfattat" msgid "_Detailed" msgstr "D_etaljerat" -#, fuzzy msgid "_Keyring Manager" -msgstr "F_ilhanterare" +msgstr "Nyc_kelringshanterare" msgid "_Clipboard" msgstr "_Urklipp" @@ -978,9 +965,8 @@ msgstr "_Urklipp" msgid "_File Manager" msgstr "F_ilhanterare" -#, fuzzy msgid "_Card Manager" -msgstr "F_ilhanterare" +msgstr "Korthanterare" msgid "Removing Secret Key" msgstr "Tar bort hemlig nyckel" @@ -1014,7 +1000,7 @@ msgid "" "although you may be able to get a new copy from the owner or from a key " "server." msgstr "" -"Denna nyckel ?r en publik nyckel. Tar du bort denna nyckel kan du vara " +"Denna nyckel ?r en ?ppen nyckel. Tar du bort denna nyckel kan du vara " "tvungen att kontakta nyckel?garen f?r en ny nyckel, eller s?ka upp den p? en " "nyckelserver." @@ -1034,13 +1020,13 @@ msgid "Change _expiration" msgstr "?ndra _utg?ngsdatum" msgid "RSA" -msgstr "" +msgstr "RSA" msgid "RSA (sign only)" msgstr "RSA (endast signering)" msgid "DSA" -msgstr "" +msgstr "DSA" msgid "DSA (sign only)" msgstr "DSA (endast signering)" @@ -1048,9 +1034,8 @@ msgstr "DSA (endast signering)" msgid "You must enter a key size." msgstr "Du m?ste ange en nyckelstorlek." -#, fuzzy msgid "Generate card key" -msgstr "Skapa nyckel" +msgstr "Skapa kortnyckel" msgid "Generate key" msgstr "Skapa nyckel" @@ -1061,12 +1046,11 @@ msgstr "_Algoritm:" msgid "_Key size (bits): " msgstr "_Nyckelstorlek (bitar): " -#, fuzzy msgid "User ID: " -msgstr "_Anv?ndaridentitet: " +msgstr "Anv?ndaridentitet: " msgid "_Name: " -msgstr "" +msgstr "_Namn:" msgid "_Email: " msgstr "_E-postadress: " @@ -1074,19 +1058,20 @@ msgstr "_E-postadress: " msgid "_Comment: " msgstr "_Kommentar: " -#, fuzzy msgid "_Expires: " -msgstr "G?r ut den:" +msgstr "G?r ut d_en:" -#, fuzzy msgid "Backup: " -msgstr "S?kerhetskopiera nyckel" +msgstr "S?kerhetskopiera:" msgid "" "If checked the encryption key will be created and stored to a backup file " "and then loaded into the card. This is recommended so that encrypted " "messages can be decrypted even if the card has a malfunction." msgstr "" +"Om markerad s? kommer krypteringsnyckeln att skapas och lagras till en " +"s?kerhetskopia och sedan laddas till kortet. Detta rekommenderas s? att " +"krypterade meddelanden kan dekrypteras ?ven om kortet ?r felaktigt." msgid "" "Please insert your full name.\n" @@ -1144,7 +1129,7 @@ msgstr "" "\n" "Detta kan ta tid ?ven p? kraftfulla datorer. Ha t?lamod." -#, fuzzy, c-format +#, c-format msgid "" "Congratulations!\n" "\n" @@ -1153,8 +1138,8 @@ msgid "" msgstr "" "Gratulerar!\n" "\n" -"Du har skapat en nyckel som ?r 1024 bitar l?ng. Giltighetstiden ?r " -"obegr?nsad." +"Du har genererat en nyckel framg?ngsrikt. Nyckeln har en obegr?nsad " +"giltighetstid och ?r %d bitar l?ng." msgid "" "GnuPG is rebuilding the trust database.\n" @@ -1167,8 +1152,8 @@ msgid "" "This columns lists the type of the certificate. A 'P' denotes OpenPGP and a " "'X' denotes X.509 (S/MIME)." msgstr "" -"Denna kolumn listar typen f?r certifikatet. Ett \"P\" betyder OpenPGP och " -"ett \"X\" betyder X.509 (S/MIME)." +"Denna kolumn listar typen f?r certifikatet. Ett ?P? betyder OpenPGP och ett " +"?X? betyder X.509 (S/MIME)." msgid "The Expiry Date is the date until the certificate is valid." msgstr "Utg?ngsdatum ?r det datum som certifikatet ?r giltigt fram till." @@ -1289,13 +1274,11 @@ msgstr "_H?mta nycklar..." msgid "Retrieve keys from server" msgstr "H?mta nycklar fr?n server" -#, fuzzy msgid "Re_fresh Keys" -msgstr "uppdatera nyckelring" +msgstr "Uppdatera Nycklar" -#, fuzzy msgid "Refresh keys from server" -msgstr "H?mta nycklar fr?n server" +msgstr "Uppdatera nycklar fr?n server" msgid "_Send Keys..." msgstr "_Skicka nycklar..." @@ -1330,19 +1313,17 @@ msgstr "Vald standardnyckel:" msgid "No default key selected in the preferences." msgstr "Ingen standardnyckel har valts i inst?llningarna." -#, fuzzy msgid "Key Manager" -msgstr "Filhanterare" +msgstr "Nyckelhanterare" -#, fuzzy msgid "The key has both a smartcard based private part and a public part" -msgstr "Denna nyckel har b?de en privat och en publik del" +msgstr "Nyckeln har b?de en smartkortsbaserad privat del och en ?ppen del" msgid "The key has both a private and a public part" -msgstr "Denna nyckel har b?de en privat och en publik del" +msgstr "Denna nyckel har b?de en privat och en ?ppen del" msgid "The key has only a public part" -msgstr "Denna nyckel har endast en publik del" +msgstr "Denna nyckel har endast en ?ppen del" #, c-format msgid "%s %u bits" @@ -1357,7 +1338,6 @@ msgid_plural "%d keys selected" msgstr[0] "%d nyckel markerad" msgstr[1] "%d nycklar markerade" -#, fuzzy msgid "User name:" msgstr "Anv?ndarnamn:" @@ -1367,11 +1347,9 @@ msgstr "G?r ut den:" msgid "Owner Trust:" msgstr "?gartillit:" -#, fuzzy msgid "Key validity:" msgstr "Nyckelgiltighet:" -#, fuzzy msgid "Key type:" msgstr "Nyckeltyp:" @@ -1384,9 +1362,8 @@ msgstr "Detaljer" msgid "Show signatures on user name:" msgstr "Visa signaturer p? anv?ndarnamn:" -#, fuzzy msgid "Chain" -msgstr "Kan signera" +msgstr "Kedja" msgid "Signatures" msgstr "Signaturer" @@ -1397,12 +1374,11 @@ msgstr "Alla signaturer" msgid "Subkeys" msgstr "Undernycklar" -#, fuzzy msgid "Key" -msgstr "_Nycklar" +msgstr "Nyckel" msgid "Tofu" -msgstr "" +msgstr "Tofu" msgid "Sign Key" msgstr "Signera nyckel" @@ -1434,6 +1410,12 @@ msgid "" "Please install a CMS engine or invoke this program\n" "with the option --disable-x509 ." msgstr "" +"Det verkar som om ingen CMS-motor ?r installerad.\n" +"\n" +"Inaktiverar tempor?rt st?d f?r X.509.\n" +"\n" +"V?nligen installera en CMS-motor eller starta detta program\n" +"med alternativet --disable-x509." msgid "" "The private key you selected as default is no longer available.\n" @@ -1506,7 +1488,7 @@ msgid "" "In \"Passphrase\" and \"Repeat passphrase\",\n" "you must enter the same passphrase." msgstr "" -"I rutorna \"L?senfras\" och \"Repetera l?senfras\"\n" +"I rutorna ?L?senfras? och ?Repetera l?senfras?\n" "m?ste du ange exakt samma l?senfras." msgid "" @@ -1682,7 +1664,7 @@ msgid "" "Connecting to server \"%s\".\n" "Please wait." msgstr "" -"Ansluter till servern \"%s\".\n" +"Ansluter till servern ?%s?.\n" "V?nta." #, c-format @@ -1814,7 +1796,7 @@ msgid "The URL given for the keyserver is not valid." msgstr "URL:en angiven f?r nyckelservern ?r inte giltig." msgid "The data given for \"Auto key locate\" is not valid." -msgstr "Angivet data f?r \"Automatisk s?kning av nyckel\" ?r inte giltig." +msgstr "Angivet data f?r ?Automatisk s?kning av nyckel? ?r inte giltig." msgid "Settings" msgstr "Inst?llningar" @@ -1831,9 +1813,8 @@ msgstr "Utg?ngen nyckel" msgid "Key NOT valid" msgstr "Nyckel ?r INTE giltig" -#, fuzzy msgid "Description" -msgstr "Dekrypterar..." +msgstr "Beskrivning" #, c-format msgid "Verified data in file: %s" @@ -1846,23 +1827,21 @@ msgstr "Signatur: %s" msgid "Signatures:" msgstr "Signaturer:" -#, fuzzy msgid "Card Manager" -msgstr "Filhanterare" +msgstr "Korthanterare" #, c-format msgid "%s card detected." -msgstr "" +msgstr "%s-kort detekterat." msgid "Checking for card..." -msgstr "" +msgstr "S?ker efter kort..." -#, fuzzy msgid "No card found." -msgstr "Inga nycklar hittades." +msgstr "Inget kort hittades." msgid "The selected card application is currently not available." -msgstr "" +msgstr "Den valda kortapplikationen ?r inte tillg?nglig f?r n?rvarande." msgid "" "Another process is using a different card application than the selected " @@ -1871,45 +1850,44 @@ msgid "" "You may change the application selection mode to \"Auto\" to select the " "active application." msgstr "" +"Ytterligare en process k?r en annan kortapplikation som skiljer sig fr?n " +"vald.\n" +"\n" +"Du kan ?ndra applikationsvalsl?get till ?Auto? f?r att v?lja den aktiva " +"applikationen." -#, fuzzy msgid "The selected card application is not available." -msgstr "Vald nyckel kan ej anv?ndas f?r signering." +msgstr "Den valda kortapplikationen finns inte tillg?nglig." msgid "Error accessing the card." -msgstr "" +msgstr "Fel vid ?tkomst till kortet" msgid "Error accessing card" -msgstr "" +msgstr "Fel vid kort?tkomst" msgid "No card" -msgstr "" +msgstr "Inget kort" -#, fuzzy msgid "_Card" -msgstr "_Urklipp" +msgstr "_Kort" msgid "Reload card information" -msgstr "" +msgstr "Ladda om kortinformation" -#, fuzzy msgid "Generate new key on card" -msgstr "Generera en ny nyckel" +msgstr "Generera en ny nyckel p? kort" -#, fuzzy msgid "This card application is not yet supported." -msgstr "?tg?rden st?ds inte" +msgstr "Denna kortapplikation st?ds inte ?n." -#, fuzzy msgid "Application selection:" -msgstr "_Automatiskt val" +msgstr "Applikationsval:" -#, fuzzy msgid "Auto" -msgstr "Anpassad" +msgstr "Auto" msgid "The GPGME library is too old to support smartcards." -msgstr "" +msgstr "GPGME-biblioteket ?r f?r gammalt f?r att st?dja smartkort." msgid "" "Admin-PIN Required\n" @@ -1926,58 +1904,70 @@ msgid "" "\n" "This notice will be shown only once per session." msgstr "" +"Admin-PIN kr?vs\n" +"\n" +"Beroende p? tidigare operationer kan du nu efterfr?gas Admin-PIN. Om du " +"matar in ett felaktigt v?rde f?r Admin-PIN minskar motsvarande " +"f?rs?ksr?knare. Om f?rs?ksr?knaren kommer ner till noll kan inte Admin-PIN " +"?terst?llas mer och d?rmed kan inte data p? kortet f?r?ndras.\n" +"\n" +"Om den inte har f?r?ndras s? har en fr?scht standardkort Admin-PIN satt till " +"v?rdet 12345678. Dock s? kan utf?rdaren av ditt kort ha initierat " +"kortet med en annan Admin-PIN och denna Admin-PIN kanske endast ?r k?nd f?r " +"utf?rdaren. V?nligen kontrollera instruktionerna fr?n din utf?rdare.\n" +"\n" +"Detta meddelande kommer endast att visas en g?ng per session." msgid "PUK retry counter:" -msgstr "" +msgstr "PUK-f?rs?ksr?knare:" msgid "CHV2 retry counter: " -msgstr "" +msgstr "CHV2-f?rs?ksr?knare:" -#, fuzzy msgid "Reset PIN" -msgstr "?terst?ll" +msgstr "?terst?ll PIN" msgid "Change PIN" -msgstr "" +msgstr "?ndra PIN" msgid "Change PUK" -msgstr "" +msgstr "?ndra PUK" -#, fuzzy msgid "Reset PUK" -msgstr "?terst?ll" +msgstr "?terst?ll PUK" #, c-format msgid "" "Error saving the changed values.\n" "(%s <%s>)" msgstr "" +"Fel vid sparande av de f?r?ndrade v?rdena.\n" +"(%s <%s>)" msgid "Only plain ASCII is currently allowed." -msgstr "" +msgstr "Endast ren ASCII till?ts f?r n?rvarande." msgid "The \"<\" character may not be used." -msgstr "" +msgstr "?Unblocking the PIN\n" @@ -1991,6 +1981,16 @@ msgid "" "Code and then to enter a new value for the PIN and repeat that new value " "at another prompt." msgstr "" +"Avblockera PIN\n" +"\n" +"F?rs?ksr?knaren i PIN ?r nere p? noll, men en ?terst?llningskod ?r satt.\n" +"\n" +"?terst?llningskoden liknar en PUK (PIN Unblocking Code) och anv?nds f?r att " +"avblockera en PIN utan att beh?va k?nna till Admin-PIN.\n" +"\n" +"Om du forts?tter kommer du att efterfr?gas att mata in aktuellt v?rde f?r " +"?terst?llningskoden och sedan en nytt v?rde f?r PIN samt att upprepa " +"detta v?rde i ytterligare en inmatning." msgid "" "Changing the PIN\n" @@ -2006,6 +2006,19 @@ msgid "" "the issuer of your card might have initialized the card with a different " "PIN. Please check the instructions of your issuer." msgstr "" +"?ndra PIN\n" +"\n" +"Om du forts?tter kommer du att efterfr?gas det aktuella v?rdet p? PIN och " +"sedan att mata in ett nytt v?rde och upprepa detta v?rde i en ny " +"inmatningsruta.\n" +"\n" +"Om du matar in ett felaktigt v?rde f?r PIN minskas omf?rs?ksr?knaren. Om " +"omf?rs?ksr?knaren f?r PIN och f?r ?terst?llningskoden b?da ?r nere p? noll, " +"kan PIN fortfarande ?terst?llas genom att anv?nda Admin-PIN.\n" +"\n" +"Ett fr?scht standardkort har PIN-v?rdet 123456. Dock kan utgivaren av " +"ditt kort ha initierat kortet med ett annat PIN-v?rde. V?nligen se din " +"utgivares instruktioner." msgid "" "Changing the Reset Code\n" @@ -2017,6 +2030,14 @@ msgid "" "then to enter a new value for the Reset Code and repeat that new value at " "another prompt." msgstr "" +"?ndra ?terst?llningskod\n" +"\n" +"?terst?llningskoden liknar PUK (PIN Unblocking Code) och anv?nds f?r att " +"avblockera en PIN utan att beh?va en Admin-PIN.\n" +"\n" +"Om du forts?tter kommer du efterfr?gas om aktuellt v?rde i PIN-koden och " +"sedan efter ett nytt v?rde f?r ?terst?llningskoden samt upprepa detta nya " +"v?rde i ytterligare en inmatning." msgid "" "Resetting the PIN or the Reset Code\n" @@ -2034,6 +2055,20 @@ msgid "" "PIN and then to enter a new value for the PIN or the Reset Code and " "repeat that new value at another prompt." msgstr "" +"?terst?llning av PIN eller ?terst?llningskod<\\b>\n" +"\n" +"Om omf?rs?ksr?knaren f?r PIN och ?terst?llningskoden b?da ?r nere p? noll, " +"?r det endast m?jligt att ?terst?lla dem om du har tillg?ng till Admin-PIN.\n" +"\n" +"Ett f?rskt standardkort har satt Admin-PIN till v?rdet 12345678. Dock " +"s? kan utf?rdaren av ditt kort ha initierat ditt kort med en annan Admin-PIN " +"och denna Admin-PIN kanske endast ?r k?nd f?r utgivaren. V?nligen se " +"instruktionerna fr?n din utgivare.\n" +"\n" +"Om du forts?tter kommer du att efterfr?gas att mata in det nuvarande v?rdet " +"p? Admin-PIN och sedan att mata in ett nytt v?rde f?r PIN eller " +"?terst?llningskoden och sedan att upprepa detta nya v?rde i ett nytt " +"inmatningsf?lt." msgid "" "Changing the Admin-PIN\n" @@ -2051,103 +2086,109 @@ msgid "" "PIN and then to enter a new value for that Admin-PIN and repeat that new " "value at another prompt." msgstr "" +"?ndra Admin-PIN\n" +"\n" +"Om du k?nner till Admin-PIN kan du ?ndra Admin-PIN.\n" +"\n" +"Admin-PIN kr?vs f?r att skapa nycklar p? kortet samt f?r att f?r?ndra annan " +"data. Antingen kan du eller s? kan du inte Admin-PIN. Ett fr?scht " +"standardkort har satt Admin-PIN till v?rdet 12345678. Dock s? kan " +"utf?rdaren av ditt kort ha initierat kortet med en annan Admin-Pin och denna " +"Admin-PIN kanske bara ?r k?nd f?r utf?rdaren. V?nligen kontrollera din " +"utf?rdares instruktioner.\n" +"\n" +"Om du forts?tter kommer du efterfr?gas aktuellt v?rde av Admin-PIN " +"och sedan efter att mata in ett nytt v?rde f?r denna Admin-PIN samt " +"ytterligare en inmatning av detta nya v?rde i ett nytt inmatningsf?lt." #, c-format msgid "" "Error changing or resetting the PIN/PUK.\n" "(%s <%s>)" msgstr "" +"Fel vid f?r?ndring eller ?terst?llning av PIN/PUK.\n" +"(%s <%s>)" #, c-format msgid "" "Error fetching the key.\n" "(%s <%s>)" msgstr "" +"Fel vid h?mtning av nyckeln.\n" +"(%s <%s>)" #, c-format msgid "Keys found: %d, imported: %d, unchanged: %d" -msgstr "" +msgstr "Hittade nycklar: %d, importerade: %d, of?r?ndrade: %d" msgid "Fetch Key" -msgstr "" +msgstr "H?mta Nyckel" -#, fuzzy msgid "General" -msgstr "Anv?ndargr?nssnitt" +msgstr "Allm?n" msgid "Serial number:" -msgstr "" +msgstr "Serienummer:" msgid "Card version:" -msgstr "" +msgstr "Kortversion:" msgid "Manufacturer:" -msgstr "" +msgstr "Tillverkare:" -#, fuzzy msgid "Personal" -msgstr "Personligen" +msgstr "Personlig" msgid "Salutation:" -msgstr "" +msgstr "H?lsning:" msgid "First name:" -msgstr "" +msgstr "F?rnamn:" -#, fuzzy msgid "Last name:" -msgstr "Anv?ndarnamn:" +msgstr "Efternamn:" msgid "Language:" -msgstr "" +msgstr "Spr?k:" msgid "Login data:" -msgstr "" +msgstr "Logindata:" -#, fuzzy msgid "Public key URL:" -msgstr "_Publika nycklar" +msgstr "URL f?r ?ppen nyckel:" -#, fuzzy msgid "Keys" -msgstr "Allm?nt" +msgstr "Nycklar" -#, fuzzy msgid "Signature key:" -msgstr "Signaturer:" +msgstr "Signaturnyckel:" -#, fuzzy msgid "Encryption key:" -msgstr "Krypterar..." +msgstr "Krypteringsnyckel:" -#, fuzzy msgid "Authentication key:" -msgstr "Kan authentisera" +msgstr "Autentiseringsnyckel:" -#, fuzzy msgid "Signature counter:" -msgstr "Signaturer:" +msgstr "Signaturr?knare:" -#, fuzzy msgid "PIN" -msgstr "Allm?nt" +msgstr "PIN" -#, fuzzy msgid "Force signature PIN:" -msgstr "_Frikopplad signatur" +msgstr "Tvinga signatur-PIN:" msgid "PIN retry counter:" -msgstr "" +msgstr "PIN-f?rs?ksr?knare:" msgid "Admin-PIN retry counter:" -msgstr "" +msgstr "Admin-PIN-f?rs?ksr?knare:" msgid "blocked" -msgstr "" +msgstr "blockerad" -#, fuzzy msgid "Learn keys" -msgstr "exportera nycklar" +msgstr "L?r nycklar" msgid "" "For some or all of the keys available on the card, the GnuPG crypto engine " @@ -2160,10 +2201,18 @@ msgid "" "\n" "If you are unsure what to do, just click the button." msgstr "" +"F?r n?gra eller alla nycklar som finns tillg?ngliga p? kortet, k?nner inte " +"GnuPG-kryptomotorn till motsvarande certifikat.\n" +"\n" +"Om du klickar p? denna knapp kommer GnuPG f?rfr?gas att ?l?ra? detta kort " +"och importera alla certifikat som lagras p? kortet in i sin egen " +"certifikatslagring. Detta g?rs inte automatiskt eftersom det kan ta flera " +"sekunder att l?sa alla certifikat fr?n kortet.\n" +"\n" +"Om du ?r os?ker p? vad du b?r g?ra, kan du bara klicka p? knappen." -#, fuzzy msgid "Learning keys ..." -msgstr "Genererar nyckel..." +msgstr "L?r sig nycklar..." #, c-format msgid "" @@ -2176,30 +2225,50 @@ msgid "" "Please check the documentation of your card to learn for what the NullPIN is " "good.\n" "\n" -"If you proceeed you will be asked to enter a new PIN and later to repeat " -"that PIN. Make sure that you will remember that PIN - it will not be " -"possible to recover the PIN if it has been entered wrongly more than %d " -"times.\n" +"If you proceed you will be asked to enter a new PIN and later to repeat that " +"PIN. Make sure that you will remember that PIN - it will not be possible to " +"recover the PIN if it has been entered wrongly more than %d times.\n" "\n" "%s" msgstr "" +"S?tter en initial PIN (%s)\n" +"\n" +"Du valda att s?tta initial PIN f?r ditt kort. PIN ?r f?r n?rvarande satt " +"till NullPIN. Att s?tta en initial PIN kr?vs men kan inte ?ngras.\n" +"\n" +"V?nligen se dokumentationen f?r ditt kort f?r att l?ra vad en NullPIN ?r bra " +"f?r.\n" +"\n" +"Om du forts?tter kommer du efterfr?gas en ny PIN och senare att upprepa " +"denna PIN. S?kerst?ll att du kommer att komma ih?g denna PIN - Det kommer " +"inte att vara m?jligt att ?terst?lla PIN om den har matats in felaktigt mer " +"?n %d g?nger.\n" +"\n" +"%s" msgid "" "You are now setting the PIN for the SigG key used to create qualified " "signatures. You may want to set the PIN to the same value as used for " "the NKS keys." msgstr "" +"Du s?tter nu PIN f?r SigG-nycklarna som anv?nds f?r att skapa " +"kvalificerade signaturer. Du kan beh?va s?tta PIN till samma v?rde " +"som anv?nds f?r NKS-nycklarna." msgid "" "You are now setting the PIN for the NKS keys used for standard signatures, " "encryption and authentication." msgstr "" +"Du s?tter nu PIN f?r NKS-nycklarna som anv?nds f?r standardsignaturer, " +"kryptering och autentisering." #, c-format msgid "" "Error changing the NullPIN.\n" "(%s <%s>)" msgstr "" +"Fel vid ?ndring av NullPIN.\n" +"(%s <%s>)" msgid "" "Changing a PIN or PUK\n" @@ -2212,6 +2281,15 @@ msgid "" "zero, the keys controlled by the PIN are not anymore usable and there is no " "way to unblock them!" msgstr "" +"F?r?ndra en PIN eller PUK\n" +"\n" +"Om du forts?tter kommer du att efterfr?gas aktuellt v?rde och sedan att mata " +"in ett nytt v?rde samt att upprepa detta v?rde vid en ny inmatning.\n" +"\n" +"Om du matar in ett felaktigt v?rde i aktuellt v?rde minskas " +"f?rs?ksr?knaren. Om f?rs?ksr?knarna f?r PIN och motsvarande PUK b?da g?r " +"ner till noll kommer nycklarna som kontrolleras av denna PIN att inte l?ngre " +"att kunna anv?ndas och det finns inget s?tt att avblockera dem!" msgid "" "Resetting a PUK\n" @@ -2228,6 +2306,19 @@ msgid "" "then to enter a new value for the blocked PUK and repeat that new value at " "another prompt." msgstr "" +"?terst?lla en PUK\n" +"\n" +"?ven om PUK st?r f?r PIN Unblocking Code s? implementerar " +"operativsystemet TCOS fr?n NetKey-kortet det som en alternativ PIN och " +"d?rf?r ?r det m?jligt att anv?nda denna PIN f?r att avblockera PUK.\n" +"\n" +"Om PUK ?r blockerad (f?rs?ksr?knaren ?r nere p? noll), s? kan du avblockera " +"den genom att anv?nda den ickeblockerade PIN. F?rs?ksr?knaren ?terst?lls d? " +"till sitt ursprungliga v?rde.\n" +"\n" +"Om du forts?tter kommer du efterfr?gas att mata in aktuellt v?rde av PIN och " +"sedan att mata in ett nytt v?rde f?r den blockerade PUK och upprepa detta " +"nya v?rde i ytterligare ett inmatningsf?lt." msgid "" "Resetting a PIN\n" @@ -2240,24 +2331,34 @@ msgid "" "then to enter a new value for the blocked PIN and repeat that new value at " "another prompt." msgstr "" +"?terst?lla en PIN\n" +"\n" +"Om PIN ?r blockerad (f?rs?k-r?knaren ?r nere p? noll), s? kan du avblockera " +"den genom att anv?nda den ickeblockerade PUKen. F?rs?ksr?knaren ?terst?lls " +"d? till sitt ursprungliga v?rde.\n" +"\n" +"Om du forts?tter kommer du att efterfr?gas att mata in aktuellt v?rde i " +"PUKen och sedan mata in ett nytt v?rde f?r den blockerade PIN samt upprepa " +"detta nya v?rde i en annan inmatning." msgid "" "A NullPIN is still active on this card.\n" "You need to set a real PIN before you can make use of the card." msgstr "" +"En NullPIN ?r fortfarande aktiv p? detta kort.\n" +"Du m?ste s?tta en riktig PIN innan du kan anv?nda kortet." msgid "Set initial PIN" -msgstr "" +msgstr "S?tt initial PIN" -#, fuzzy msgid "scanning ..." -msgstr "Signerar..." +msgstr "avs?ker ..." msgid "SigG PIN retry counter:" -msgstr "" +msgstr "SigG PIN-f?rs?ksr?knare:" msgid "SigG PUK retry counter:" -msgstr "" +msgstr "SigG PUK-f?rs?ksr?knare:" #, c-format msgid "" @@ -2265,534 +2366,106 @@ msgid "" "the application selector button to switch to another application available " "on this card." msgstr "" +"Det finns inte mycket information att visa f?r ett %s-kort. Du kanske vill " +"anv?nda knappen f?r applikationsval f?r att ?ndra till en annan applikation " +"som finns tillg?nglig p? detta kort." + +#~ msgid "The file \"%s\" contained no validencrypted data." +#~ msgstr "Filen ?%s? inneh?ll ingen giltig krypterad data." #~ msgid "The key ID is a short number to identify a certificate." #~ msgstr "" #~ "Nyckelidentiteten ?r ett kort tal f?r att identifiera ett certifikat." -#, fuzzy -#~ msgid "Error" -#~ msgstr "GPA-fel" - -#, fuzzy -#~ msgid "Message" -#~ msgstr "GPA-meddelande" - -#~ msgid "GNU Privacy Assistant - Clipboard" -#~ msgstr "GNU Privacy Assistant - Urklipp" - -#~ msgid "GNU Privacy Assistant - File Manager" -#~ msgstr "GNU Privacy Assistant - Filhanterare" - -#, fuzzy -#~ msgid "GNU Privacy Assistant - Key Manager" -#~ msgstr "GNU Privacy Assistant - Filhanterare" - -#~ msgid "GNU Privacy Assistant - Settings" -#~ msgstr "GNU Privacy Assistant - Inst?llningar" - -#, fuzzy -#~ msgid "GNU Privacy Assistant - Card Manager" -#~ msgstr "GNU Privacy Assistant - Filhanterare" - -#~ msgid "Please choose a passphrase for the new key." -#~ msgstr "V?lj en l?senfras f?r den nya nyckeln." - #~ msgid "" -#~ "In \"Passphrase\" and \"Repeat passphrase\", you must enter the same " -#~ "passphrase." -#~ msgstr "" -#~ "I rutorna \"L?senfras\" och \"Repetera l?senfras\" m?ste du ange exakt " -#~ "samma l?senfras." - -#~ msgid "Warning: The passphrase you have entered is not very secure." -#~ msgstr "Varning: L?senfrasen som du angav ?r inte s?ker." - -#~ msgid "Quality: " -#~ msgstr "Kvalitet: " - -#, fuzzy -#~ msgid "Status: " -#~ msgstr "Status" - -#, fuzzy -#~ msgid "Generate new keys on card" -#~ msgstr "Generera en ny nyckel" - -#~ msgid "DSA and ElGamal (default)" -#~ msgstr "DSA och ElGamal (standard)" - -#~ msgid "_Keyring Editor" -#~ msgstr "_Nyckelringsredigerare" - -#~ msgid "1024" -#~ msgstr "1024" - -#~ msgid "768" -#~ msgstr "768" - -#~ msgid "2048" -#~ msgstr "2048" - -#~ msgid "_Passphrase: " -#~ msgstr "_L?senfras: " - -#~ msgid "_Repeat passphrase: " -#~ msgstr "_Repetera l?senfras: " - -#~ msgid "GNU Privacy Assistant - Keyring Editor" -#~ msgstr "GNU Privacy Assistant - Nyckelringshanterare" - -#~ msgid "Keyring Editor" -#~ msgstr "Nyckelringshanterare" - -#~ msgid "/File/C_lear" -#~ msgstr "/Arkiv/_T?m" - -#, fuzzy -#~ msgid "/File/Save _As" -#~ msgstr "/Arkiv/St?_ng" - -#~ msgid "/File/sep1" -#~ msgstr "/Arkiv/sep1" - -#~ msgid "/File/_Sign" -#~ msgstr "/Arkiv/_Signera" - -#~ msgid "/File/_Verify" -#~ msgstr "/Arkiv/_Validera" - -#~ msgid "/File/_Encrypt" -#~ msgstr "/Arkiv/_Kryptera" - -#~ msgid "/File/_Decrypt" -#~ msgstr "/Arkiv/_Dekryptera" - -#~ msgid "/File/sep2" -#~ msgstr "/Arkiv/sep2" - -#~ msgid "/File/_Close" -#~ msgstr "/Arkiv/St?_ng" - -#~ msgid "/File/_Quit" -#~ msgstr "/Arkiv/A_vsluta" - -#, fuzzy -#~ msgid "/Edit/_Undo" -#~ msgstr "/Redigera/_Kopiera" - -#, fuzzy -#~ msgid "/Edit/_Redo" -#~ msgstr "/Redigera/_Kopiera" - -#, fuzzy -#~ msgid "/Edit/sep0" -#~ msgstr "/Redigera/sep2" - -#, fuzzy -#~ msgid "/Edit/Cut" -#~ msgstr "/Redigera/Kopiera" - -#~ msgid "/Edit/_Copy" -#~ msgstr "/Redigera/_Kopiera" - -#~ msgid "/Edit/_Paste" -#~ msgstr "/Redigera/Klistra _in" - -#, fuzzy -#~ msgid "/Edit/_Delete" -#~ msgstr "/Redigera/Klistra _in" - -#~ msgid "/Edit/sep1" -#~ msgstr "/Redigera/sep1" - -#~ msgid "/Edit/Select _All" -#~ msgstr "/Redigera/Markera _allt" - -#~ msgid "/Edit/sep2" -#~ msgstr "/Redigera/sep2" - -#~ msgid "/Edit/Pr_eferences..." -#~ msgstr "/Redigera/_Inst?llningar" - -#~ msgid "/Windows/_Keyring Editor" -#~ msgstr "/F?nster/_Nyckelringshanterare" - -#~ msgid "/Windows/_Filemanager" -#~ msgstr "/F?nster/_Filhanterare" - -#~ msgid "/Edit/Copy" -#~ msgstr "/Redigera/Kopiera" - -#, fuzzy -#~ msgid "/Edit/Paste" -#~ msgstr "/Redigera/Klistra _in" - -#~ msgid "open file" -#~ msgstr "?ppna fil" - -#, fuzzy -#~ msgid "save file as" -#~ msgstr "st?ng filer" - -#, fuzzy -#~ msgid "cut the selection" -#~ msgstr "Kryptera markerad fil" - -#, fuzzy -#~ msgid "copy the selection" -#~ msgstr "Kryptera markerad fil" - -#, fuzzy -#~ msgid "Sign the selected text" -#~ msgstr "Signera vald nyckel" - -#, fuzzy -#~ msgid "verify text" -#~ msgstr "validera fil" - -#, fuzzy -#~ msgid "encrypt text" -#~ msgstr "kryptera fil" - -#, fuzzy -#~ msgid "decrypt text" -#~ msgstr "dekryptera fil" - -#~ msgid "preferences" -#~ msgstr "inst?llningar" - -#, fuzzy -#~ msgid "keyring editor" -#~ msgstr "Nyckelringshanterare" - -#~ msgid "file manager" -#~ msgstr "filhanterare" - -#~ msgid "Help" -#~ msgstr "Hj?lp" - -#~ msgid "help" -#~ msgstr "hj?lp" - -#~ msgid "/File/Sign" -#~ msgstr "/Arkiv/Signera" - -#~ msgid "/File/Verify" -#~ msgstr "/Arkiv/Validera" - -#~ msgid "/File/Encrypt" -#~ msgstr "/Arkiv/Kryptera" - -#~ msgid "/File/Decrypt" -#~ msgstr "/Arkiv/Dekryptera" - -#~ msgid "close files" -#~ msgstr "st?ng filer" - -#~ msgid "sign file" -#~ msgstr "signera fil" - -#~ msgid "verify file" -#~ msgstr "validera fil" - -#~ msgid "encrypt file" -#~ msgstr "kryptera fil" - -#~ msgid "decrypt file" -#~ msgstr "dekryptera fil" - -#~ msgid "_Backup to file:" -#~ msgstr "_S?kerhetskopiera till fil:" - -#~ msgid "B_rowse..." -#~ msgstr "_Bl?ddra..." - -#~ msgid "_Back" -#~ msgstr "_Tillbaka" - -#~ msgid "_Forward" -#~ msgstr "_Fram?t" - -#~ msgid "_Apply" -#~ msgstr "_Verkst?ll" - -#~ msgid "Brought to you by:" -#~ msgstr "Skapat av:" - -#, fuzzy -#~ msgid "GPA is Free Software under the" -#~ msgstr "GPA ?r fri programvara utgiven under" - -#~ msgid "GNU General Public License." -#~ msgstr "GNU General Public License." - -#~ msgid "For news see:" -#~ msgstr "F?r nyheter och information, se:" - -#, fuzzy -#~ msgid "http://www.gpg4win.org" -#~ msgstr "http://www.gnupg.org" - -#~ msgid "http://www.gnupg.org" -#~ msgstr "http://www.gnupg.org" - -#, fuzzy -#~ msgid "GNU General Public License" -#~ msgstr "GNU General Public License." - -#, fuzzy -#~ msgid "_GNU General Public License" -#~ msgstr "GNU General Public License." - -#~ msgid "Show Help Text\n" -#~ msgstr "Visa hj?lptext\n" - -#~ msgid "/Help/_Contents" -#~ msgstr "/Hj?lp/_Inneh?ll" - -#~ msgid "/Help/_License" -#~ msgstr "/Hj?lp/_Licens" - -#~ msgid "/Help/_About" -#~ msgstr "/Hj?lp/_Om" - -#~ msgid "Please insert your name" -#~ msgstr "Ange ditt f?r- och efternamn." - -#~ msgid "Please insert your email address" -#~ msgstr "Ange din e-postadress" - -#~ msgid "/Keys/_Refresh" -#~ msgstr "/Nycklar/_Uppdatera" - -#~ msgid "/Keys/sep0" -#~ msgstr "/Nycklar/sep0" - -#~ msgid "/Keys/_Delete Keys..." -#~ msgstr "/Nycklar/_Ta bort nycklar..." - -#~ msgid "/Keys/sep1" -#~ msgstr "/Nycklar/sep1" - -#~ msgid "/Keys/_Sign Keys..." -#~ msgstr "/Nycklar/_Signera nycklar..." - -#~ msgid "/Keys/Set _Owner Trust..." -#~ msgstr "/Nycklar/St?ll in _?gartillit..." - -#~ msgid "/Keys/_Edit Private Key..." -#~ msgstr "/Nycklar/Redigera _privat nyckel..." - -#~ msgid "/Keys/sep2" -#~ msgstr "/Nycklar/sep2" - -#~ msgid "/Keys/_Import Keys..." -#~ msgstr "/Nycklar/_Importera nycklar..." - -#~ msgid "/Keys/E_xport Keys..." -#~ msgstr "/Nycklar/E_xportera nycklar..." - -#~ msgid "/Keys/_Backup..." -#~ msgstr "/Nycklar/S?kerhets_kopiera..." - -#~ msgid "/Server/_Send Keys..." -#~ msgstr "/Server/_Skicka nycklar..." - -#, fuzzy -#~ msgid "/Windows/_File Manager" -#~ msgstr "/F?nster/_Filhanterare" - -#~ msgid "/Keys/Export Keys..." -#~ msgstr "/Nycklar/Exportera nycklar..." - -#~ msgid "/Keys/Delete Keys..." -#~ msgstr "/Nycklar/Ta bort nycklar..." - -#~ msgid "/Server/Send Keys..." -#~ msgstr "/Server/Skicka nycklar..." - -#~ msgid "/Keys/Set Owner Trust..." -#~ msgstr "/Nycklar/St?ll in ?gartillit..." - -#~ msgid "/Keys/Sign Keys..." -#~ msgstr "/Nycklar/Signera nycklar..." - -#~ msgid "/Keys/Edit Private Key..." -#~ msgstr "/Nycklar/Redigera privat nyckel..." - -#~ msgid "/Keys/Backup..." -#~ msgstr "/Nycklar/S?kerhetskopiera..." - -#~ msgid "/_Copy" -#~ msgstr "/_Kopiera" - -#~ msgid "/_Paste" -#~ msgstr "/Klistra _in" - -#~ msgid "/Set Owner Trust..." -#~ msgstr "/St?ll in ?gartillit..." - -#~ msgid "/Sign Keys..." -#~ msgstr "/Signera nycklar..." - -#~ msgid "/Edit Private Key..." -#~ msgstr "/Redigera privat nyckel..." - -#~ msgid "/Backup..." -#~ msgstr "/S?kerhetskopiera..." - -#~ msgid "edit key" -#~ msgstr "redigera nyckel" - -#~ msgid "remove key" -#~ msgstr "ta bort nyckel" - -#~ msgid "sign key" -#~ msgstr "signera nyckel" - -#~ msgid "import keys" -#~ msgstr "importera nycklar" - -#~ msgid "brief" -#~ msgstr "kortfattat" - -#~ msgid "detailed" -#~ msgstr "detaljerat" - -#~ msgid "Sign files" -#~ msgstr "Signera filer" - -#~ msgid "sign in separate _file" -#~ msgstr "signera i separat _fil" - -#~ msgid "a_rmor" -#~ msgstr "ASCII-_skal" - -#~ msgid "display this help and exit" -#~ msgstr "visa denna hj?lp och avsluta" - -#~ msgid "Options" -#~ msgstr "Flaggor" - -#~ msgid "GPA Warning" -#~ msgstr "GPA-varning" - -#~ msgid "" -#~ "One of your secret keys contains an ElGamal signing key. Due to a bug in " -#~ "GnuPG, all ElGamal keys used with GnuPG 1.0.2 and later must be " -#~ "considered compromised.\n" +#~ "Changing the PIN\n" +#~ "\n" +#~ "If you proceed you will be asked to enter the current value of the PIN " +#~ "and then to enter a new value and repeat that value at another prompt.\n" #~ "\n" -#~ "Please revoke your key as soon as possible.\n" +#~ "Entering a wrong value for the PIN decrements the retry counter. If the " +#~ "retry counters of the PIN and of the Reset Code are both down to zero, " +#~ "the PIN can still be reseted by using the Admin-PIN.\n" #~ "\n" -#~ "The affected key is:" +#~ "A fresh standard card has set the PIN to the value 123456. " +#~ "However, the issuer of your card might have initialized the card with a " +#~ "different PIN. Please check the instructions of your issuer." #~ msgstr "" -#~ "En av dina hemliga nycklar inneh?ller en ElGamal-signeringsnyckel. P? " -#~ "grund av ett fel i GnuPG m?ste alla ElGamal-nycklar som anv?nds med GnuPG " -#~ "1.0.2 eller senare anses som komprometterade.\n" +#~ "?ndra PIN\n" #~ "\n" -#~ "Sp?rra din nyckel s? snart som m?jligt.\n" +#~ "Om du forts?tter kommer du att efterfr?gas om aktuellt v?rde i PIN och " +#~ "sedan efterfr?gas ett nytt v?rde och upprepa detta v?rde i en ny " +#~ "inmatning.\n" #~ "\n" -#~ "Den ber?rda nyckeln ?r:" - -#~ msgid "GNU general public license" -#~ msgstr "GNU General Public License" - -#~ msgid "_GNU general public license" -#~ msgstr "_GNU General Public License" - -#~ msgid ">.\n" -#~ msgstr "" -#~ ">.\n" -#~ "Skicka synpunkter p? ?vers?ttningen till .\n" - -#~ msgid "" -#~ "If you want you can supply a comment that further identifies the key to " -#~ "other users. The comment is especially useful if you generate several " -#~ "keys for the same email address. The comment is completely optional. " -#~ "Leave it empty if you don't have a use for it." -#~ msgstr "" -#~ "Om du vill kan du mata in en kommentar som kan g?ra din nyckel ?nnu " -#~ "enklare att finna. Detta ?r speciellt anv?ndbart om du har flera nycklar " -#~ "med samma emailadress. Om du ej ?nskar ha en kommentar, l?mna f?ltet " -#~ "tomt. " - -#~ msgid "sign, do_n't compress" -#~ msgstr "Signera, komprimera _ej" - -#~ msgid "Keyserver did not return any matching keys." -#~ msgstr "Fann ingen matchande nyckel p? servern." - -#~ msgid "_Import" -#~ msgstr "_Importera" - -#~ msgid "Export Key" -#~ msgstr "Exportera nyckel" - -#~ msgid "E_xport to file:" -#~ msgstr "E_xportera till fil: " - -#~ msgid "Import Key" -#~ msgstr "Importera nyckel" - -#~ msgid "I_mport from file:" -#~ msgstr "_Importera fr?n fil:" - -#~ msgid "" -#~ "You have a secret key without the\n" -#~ "corresponding public key in your\n" -#~ "key ring. In order to use this key\n" -#~ "you will need to import the public\n" -#~ "key, too." -#~ msgstr "" -#~ "Du har en privat nyckel utan motsvarande\n" -#~ "?ppna nyckel p? din nyckelring. Du kan inte\n" -#~ "anv?nda denna nyckel f?rr?n du har importerat\n" -#~ "den ?ppna nyckeln." - -#~ msgid "No private key to backup." -#~ msgstr "Ingen privat nyckel att ta s?kerhetskopia av." - -#~ msgid "GPA: Loading keyring" -#~ msgstr "GPA: Laddar nyckelring" - -#~ msgid "Loading secret keys" -#~ msgstr "Laddar privata nycklar" - -#~ msgid "Loading public keys" -#~ msgstr "Ladda ?ppna nycklar" - -#~ msgid "The key you selected is not available for encryption" -#~ msgstr "Vald nyckel kan ej anv?ndas f?r kryptering." - -#~ msgid "" -#~ "No public keys available.\n" -#~ "Currently, there is nobody who could read a\n" -#~ "file encrypted by you." -#~ msgstr "" -#~ "Det finns inga tillg?ngliga ?ppna nycklar.\n" -#~ "Data som krypterats av dig kan d?rf?r inte\n" -#~ "l?sas av n?gon." - -#~ msgid "No secret keys available." -#~ msgstr "Privat nyckel ej tillg?nglig." - -#~ msgid "Files in work" -#~ msgstr "Filer i process" +#~ "Om du matar in ett felaktigt v?rde f?r PIN minskas f?rs?ksr?knaren. Om " +#~ "f?rs?ksr?knaren f?r PIN och ?ven f?r ?terst?llningskoden ?r nere p? noll " +#~ "kan PIN fortfarande ?terst?llas genom att anv?nda sig av Admin-PIN.\n" +#~ "\n" +#~ "En fr?scht standardkort har PIN satt till v?rdet 123456. Dock s? " +#~ "kan utf?rdaren av ditt kort ha initierat kortet med en annan PIN. " +#~ "V?nligen kontrollera instruktionerna fr?n utf?rdaren." #~ msgid "" -#~ "Internal error:\n" -#~ "Invalid sign mode" +#~ "Reseting the PIN or the Reset Code\n" +#~ "\n" +#~ "If the retry counters of the PIN and of the Reset Code are both down to " +#~ "zero, it is only possible to reset them if you have access to the Admin-" +#~ "PIN.\n" +#~ "\n" +#~ "A fresh standard card has set the Admin-PIN to the value 12345678. However, the issuer of your card might have initialized the card " +#~ "with a different Admin-PIN and that Admin-PIN might only be known to the " +#~ "issuer. Please check the instructions of your issuer.\n" +#~ "\n" +#~ "If you proceed you will be asked to enter the current value of the " +#~ "Admin-PIN and then to enter a new value for the PIN or the Reset " +#~ "Code and repeat that new value at another prompt." #~ msgstr "" -#~ "Internt fel:\n" -#~ "Ogiltigt signeringsl?ge" - -#~ msgid "No key selected!" -#~ msgstr "Ingen nyckel markerad!" +#~ "?terst?lla PIN eller ?terst?llningskoden\n" +#~ "\n" +#~ "Om f?rs?ksr?knarna f?r PIN och f?r ?terst?llningskoden b?da ?r nere p? " +#~ "noll, s? ?r det endast m?jligt att ?terst?lla dem om du har ?tkomst till " +#~ "Admin-PIN.\n" +#~ "\n" +#~ "Ett fr?scht standardkort har satt Admin-PIN till v?rdet 12345678. " +#~ "Dock s? kan utf?rdaren av ditt kort ha initierat kortet med en annan " +#~ "Admin-PIN och denna Admin-PIN kanske endast ?r k?nd f?r utf?rdaren. " +#~ "V?nligen kontrollera instruktionerna fr?n utf?rdaren.\n" +#~ "\n" +#~ "Om du forts?tter kommer du efterfr?gas att mata in aktuellt v?rde av " +#~ "Admin-PIN och sedan efterfr?gas ett nytt v?rde f?r PIN eller " +#~ "?terst?llningskod samt att upprepa detta nya v?rde i vid ytterligare en " +#~ "inmatning." #~ msgid "" -#~ "No secret keys available for signing.\n" -#~ "Please generate or import a secret key first." +#~ "Setting the Initial PIN (%s)\n" +#~ "\n" +#~ "You selected to set the initial PIN of your card. The PIN is currently " +#~ "set to the NullPIN. Setting an initial PIN is required but can't be " +#~ "reverted.\n" +#~ "\n" +#~ "Please check the documentation of your card to learn for what the NullPIN " +#~ "is good.\n" +#~ "\n" +#~ "If you proceeed you will be asked to enter a new PIN and later to repeat " +#~ "that PIN. Make sure that you will remember that PIN - it will not be " +#~ "possible to recover the PIN if it has been entered wrongly more than %d " +#~ "times.\n" +#~ "\n" +#~ "%s" #~ msgstr "" -#~ "Ingen hemlig nyckel tillg?nglig f?r signering.\n" -#~ "Skapa eller importera en hemlig nyckel f?rst." +#~ "S?tta initial PIN (%s)\n" +#~ "\n" +#~ "Du valde att s?tta initial PIN i ditt kort. PIN ?r f?r n?rvarande satt " +#~ "till NullPIN. Att s?tta en initial PINkr?vs men kan inte ?terst?llas.\n" +#~ "\n" +#~ "V?nligen kontrollera dokumentationen f?r ditt kort f?r att l?ra dig f?r " +#~ "vad du kan ha NullPIN till.\n" +#~ "\n" +#~ "Om du forts?tter kommer du efterfr?gas att mata in en ny PIN och senare " +#~ "?ven att upprepa denna PIN. S?kerst?ll att du kommer att komma ih?g " +#~ "denna PIN - Den kommer inte att kunna ?terst?llas om den har matats in " +#~ "felaktigt mer ?n %d g?nger.\n" +#~ "\n" +#~ "%s" ----------------------------------------------------------------------- Summary of changes: po/sv.po | 1165 ++++++++++++++++++++++---------------------------------------- 1 file changed, 419 insertions(+), 746 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 03:42:37 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 16 Oct 2018 03:42:37 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-24-ge9566da Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via e9566da20cf9428e3094cbd63277ea2179459232 (commit) from a3f4e8838036a14e87cca811e40c9f670f152fcd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e9566da20cf9428e3094cbd63277ea2179459232 Author: NIIBE Yutaka Date: Tue Oct 16 10:38:43 2018 +0900 gpg-error-config: Support PKG_CONFIG_LIBDIR. * src/gpg-error-config-new.in: Use PKG_CONFIG_LIBDIR if specified. -- This change allows a distribution (like Debian) offering -gpg-error-config wrapper script which invokes gpg-error-config with host specific PKG_CONFIG_LIBDIR. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in index e16e753..a7c1b78 100644 --- a/src/gpg-error-config-new.in +++ b/src/gpg-error-config-new.in @@ -12,7 +12,7 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=@libdir@ +libdir=${PKG_CONFIG_LIBDIR:- at libdir@} PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}${libdir}/pkgconfig" # ----------------------------------------------------------------------- Summary of changes: src/gpg-error-config-new.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 07:23:10 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 16 Oct 2018 07:23:10 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-3-g9d54948 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via 9d54948d6ca3e3e3e3040dab0c5fded0757472e9 (commit) from 0b56e5c076ae22853bf919c696db1e994acd1ef0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9d54948d6ca3e3e3e3040dab0c5fded0757472e9 Author: NIIBE Yutaka Date: Tue Oct 16 14:22:38 2018 +0900 Update autogen.sh from libgpg-error. * autogen.sh: Update. Signed-off-by: NIIBE Yutaka diff --git a/autogen.sh b/autogen.sh index 0943d5c..9b36158 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #! /bin/sh # autogen.sh -# Copyright (C) 2003, 2014 g10 Code GmbH +# Copyright (C) 2003, 2014, 2017, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -15,7 +15,7 @@ # configure it for the respective package. It is maintained as part of # GnuPG and source copied by other packages. # -# Version: 2014-06-06 +# Version: 2018-07-10 configure_ac="configure.ac" @@ -74,13 +74,23 @@ PRINT_HOST=no PRINT_BUILD=no tmp=$(dirname "$0") tsdir=$(cd "${tmp}"; pwd) -version_parts=3 if [ -n "${AUTOGEN_SH_SILENT}" ]; then SILENT=" --silent" fi if test x"$1" = x"--help"; then - echo "usage: ./autogen.sh [--silent] [--force] [--build-TYPE] [ARGS]" + echo "usage: ./autogen.sh [OPTIONS] [ARGS]" + echo " Options:" + echo " --silent Silent operation" + echo " --force Pass --force to autoconf" + echo " --find-version Helper for configure.ac" + echo " --git-build Run all commands to build from a Git" + echo " --print-host Print only the host triplet" + echo " --print-build Print only the build platform triplet" + echo " --build-TYPE Configure to cross build for TYPE" + echo "" + echo " ARGS are passed to configure in --build-TYPE mode." + echo " Configuration for this script is expected in autogen.rc" exit 0 fi if test x"$1" = x"--silent"; then @@ -149,6 +159,10 @@ case "$1" in SILENT=" --silent" shift ;; + --git-build) + myhost="git-build" + shift + ;; --build-w32) myhost="w32" shift @@ -177,6 +191,25 @@ esac die_p +# **** GIT BUILD **** +# This is a helper to build from git. +if [ "$myhost" = "git-build" ]; then + tmp="$(pwd)" + cd "$tsdir" || fatal "error cd-ing to $tsdir" + ./autogen.sh || fatal "error running ./autogen.sh" + cd "$tmp" || fatal "error cd-ing back to $tmp" + die_p + "$tsdir"/configure || fatal "error running $tsdir/configure" + die_p + make || fatal "error running make" + die_p + make check || fatal "error running male check" + die_p + exit 0 +fi +# **** end GIT BUILD **** + + # Source our configuration if [ -f "${tsdir}/autogen.rc" ]; then . "${tsdir}/autogen.rc" @@ -200,32 +233,36 @@ if [ "$myhost" = "find-version" ]; then minor="$3" micro="$4" - case "$version_parts" in - 2) - matchstr1="$package-$major.[0-9][0-9]*" - matchstr2="$package-$major-base" - vers="$major.$minor" - ;; - *) - matchstr1="$package-$major.$minor.[0-9][0-9]*" - matchstr2="$package-$major.$minor-base" - vers="$major.$minor.$micro" - ;; - esac + if [ -z "$package" -o -z "$major" -o -z "$minor" ]; then + echo "usage: ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]" >&2 + exit 1 + fi + + if [ -z "$micro" ]; then + matchstr1="$package-$major.[0-9]*" + matchstr2="$package-$major-base" + vers="$major.$minor" + else + matchstr1="$package-$major.$minor.[0-9]*" + matchstr2="$package-$major.$minor-base" + vers="$major.$minor.$micro" + fi beta=no if [ -e .git ]; then ingit=yes tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null) + tmp=$(echo "$tmp" | sed s/^"$package"//) if [ -n "$tmp" ]; then - tmp=$(echo "$tmp"|awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}') + tmp=$(echo "$tmp" | sed s/^"$package"// \ + | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}') else tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null \ | awk -F- '$4!=0{print"-beta"$4}') fi [ -n "$tmp" ] && beta=yes rev=$(git rev-parse --short HEAD | tr -d '\n\r') - rvd=$((0x$(echo ${rev} | head -c 4))) + rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null))) else ingit=no beta=yes @@ -310,7 +347,8 @@ if [ "$myhost" = "w32" ]; then $tsdir/configure --enable-maintainer-mode ${SILENT} \ --prefix=${w32root} \ - --host=${host} --build=${build} \ + --host=${host} --build=${build} SYSROOT=${w32root} \ + PKG_CONFIG_LIBDIR=${w32root}/lib/pkgconfig \ ${configure_opts} ${extraoptions} "$@" rc=$? exit $rc @@ -416,13 +454,16 @@ fi # Check the git setup. if [ -d .git ]; then - CP="cp -a" - [ -z "${SILENT}" ] && CP="$CP -v" + CP="cp -p" + # If we have a GNU cp we can add -v + if cp --version >/dev/null 2>/dev/null; then + [ -z "${SILENT}" ] && CP="$CP -v" + fi if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then [ -z "${SILENT}" ] && cat < This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 0f2c6ce2c9504c6df435463243edaa669e57b109 (commit) from 86e5e06a97ae13b8bbf6923ecc76e02b9c429b46 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0f2c6ce2c9504c6df435463243edaa669e57b109 Author: NIIBE Yutaka Date: Tue Oct 16 14:46:55 2018 +0900 build: Let configure create the VERSION file. * autogen.sh: Update from libgpg-error. * configure.ac: Use mym4_versoin to create VERSION file. * Makefile.am (dist-hook): Do not create VERSION file. (EXTRA_DIST): Add VERSION. -- GnuPG-bug-id: 3283 Signed-off-by: NIIBE Yutaka diff --git a/.gitignore b/.gitignore index 5d481aa..704d3ca 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ po/messages.mo /libtool /stamp-h1 /Makefile.in +/VERSION cipher/Makefile.in cipher/gost-s-box cipher/gost-sb.h diff --git a/Makefile.am b/Makefile.am index f97af7f..21e91ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,14 +38,12 @@ EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \ ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \ m4/ChangeLog-2011 cipher/ChangeLog-2011 src/ChangeLog-2011 \ random/ChangeLog-2011 tests/ChangeLog-2011 mpi/ChangeLog-2011 \ - build-aux/git-log-footer build-aux/git-log-fix + build-aux/git-log-footer build-aux/git-log-fix VERSION DISTCLEANFILES = -# Add all the files listed in "distfiles" files to the distribution, -# apply version number s to some files and create a VERSION file which -# we need for the Prereq: patch file trick. +# Add all the files listed in "distfiles" files to the distribution dist-hook: gen-ChangeLog @set -e; \ for file in `cd $(top_srcdir); \ @@ -56,8 +54,6 @@ dist-hook: gen-ChangeLog || cp -p $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i; \ done ; \ done - @set -e; \ - echo "$(VERSION)" > $(distdir)/VERSION distcheck-hook: set -e; ( \ diff --git a/autogen.sh b/autogen.sh index 471193c..9b36158 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,6 @@ #! /bin/sh # autogen.sh -# Copyright (C) 2003, 2014 g10 Code GmbH +# Copyright (C) 2003, 2014, 2017, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -15,7 +15,7 @@ # configure it for the respective package. It is maintained as part of # GnuPG and source copied by other packages. # -# Version: 2014-01-10 +# Version: 2018-07-10 configure_ac="configure.ac" @@ -41,7 +41,7 @@ fatal () { info () { if [ -z "${SILENT}" ]; then - echo "autogen.sh:" "$*" + echo "autogen.sh:" "$*" >&2 fi } @@ -70,6 +70,8 @@ MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX} DIE=no FORCE= SILENT= +PRINT_HOST=no +PRINT_BUILD=no tmp=$(dirname "$0") tsdir=$(cd "${tmp}"; pwd) @@ -77,7 +79,18 @@ if [ -n "${AUTOGEN_SH_SILENT}" ]; then SILENT=" --silent" fi if test x"$1" = x"--help"; then - echo "usage: ./autogen.sh [--silent] [--force] [--build-TYPE] [ARGS]" + echo "usage: ./autogen.sh [OPTIONS] [ARGS]" + echo " Options:" + echo " --silent Silent operation" + echo " --force Pass --force to autoconf" + echo " --find-version Helper for configure.ac" + echo " --git-build Run all commands to build from a Git" + echo " --print-host Print only the host triplet" + echo " --print-build Print only the build platform triplet" + echo " --build-TYPE Configure to cross build for TYPE" + echo "" + echo " ARGS are passed to configure in --build-TYPE mode." + echo " Configuration for this script is expected in autogen.rc" exit 0 fi if test x"$1" = x"--silent"; then @@ -88,6 +101,14 @@ if test x"$1" = x"--force"; then FORCE=" --force" shift fi +if test x"$1" = x"--print-host"; then + PRINT_HOST=yes + shift +fi +if test x"$1" = x"--print-build"; then + PRINT_BUILD=yes + shift +fi # Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces @@ -133,6 +154,15 @@ amd64_toolprefixes= myhost="" myhostsub="" case "$1" in + --find-version) + myhost="find-version" + SILENT=" --silent" + shift + ;; + --git-build) + myhost="git-build" + shift + ;; --build-w32) myhost="w32" shift @@ -161,6 +191,25 @@ esac die_p +# **** GIT BUILD **** +# This is a helper to build from git. +if [ "$myhost" = "git-build" ]; then + tmp="$(pwd)" + cd "$tsdir" || fatal "error cd-ing to $tsdir" + ./autogen.sh || fatal "error running ./autogen.sh" + cd "$tmp" || fatal "error cd-ing back to $tmp" + die_p + "$tsdir"/configure || fatal "error running $tsdir/configure" + die_p + make || fatal "error running make" + die_p + make check || fatal "error running male check" + die_p + exit 0 +fi +# **** end GIT BUILD **** + + # Source our configuration if [ -f "${tsdir}/autogen.rc" ]; then . "${tsdir}/autogen.rc" @@ -172,16 +221,78 @@ if [ -f "$HOME/.gnupg-autogen.rc" ]; then . "$HOME/.gnupg-autogen.rc" fi + +# **** FIND VERSION **** +# This is a helper for the configure.ac M4 magic +# Called +# ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO] +# returns a complete version string with automatic beta numbering. +if [ "$myhost" = "find-version" ]; then + package="$1" + major="$2" + minor="$3" + micro="$4" + + if [ -z "$package" -o -z "$major" -o -z "$minor" ]; then + echo "usage: ./autogen.sh --find-version PACKAGE MAJOR MINOR [MICRO]" >&2 + exit 1 + fi + + if [ -z "$micro" ]; then + matchstr1="$package-$major.[0-9]*" + matchstr2="$package-$major-base" + vers="$major.$minor" + else + matchstr1="$package-$major.$minor.[0-9]*" + matchstr2="$package-$major.$minor-base" + vers="$major.$minor.$micro" + fi + + beta=no + if [ -e .git ]; then + ingit=yes + tmp=$(git describe --match "${matchstr1}" --long 2>/dev/null) + tmp=$(echo "$tmp" | sed s/^"$package"//) + if [ -n "$tmp" ]; then + tmp=$(echo "$tmp" | sed s/^"$package"// \ + | awk -F- '$3!=0 && $3 !~ /^beta/ {print"-beta"$3}') + else + tmp=$(git describe --match "${matchstr2}" --long 2>/dev/null \ + | awk -F- '$4!=0{print"-beta"$4}') + fi + [ -n "$tmp" ] && beta=yes + rev=$(git rev-parse --short HEAD | tr -d '\n\r') + rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null))) + else + ingit=no + beta=yes + tmp="-unknown" + rev="0000000" + rvd="0" + fi + + echo "$package-$vers$tmp:$beta:$ingit:$vers$tmp:$vers:$tmp:$rev:$rvd:" + exit 0 +fi +# **** end FIND VERSION **** + + +if [ ! -f "$tsdir/build-aux/config.guess" ]; then + fatal "$tsdir/build-aux/config.guess not found" + exit 1 +fi +build=`$tsdir/build-aux/config.guess` +if [ $PRINT_BUILD = yes ]; then + echo "$build" + exit 0 +fi + + + # ****************** # W32 build script # ****************** if [ "$myhost" = "w32" ]; then - if [ ! -f "$tsdir/build-aux/config.guess" ]; then - fatal "$tsdir/build-aux/config.guess not found" - exit 1 - fi - build=`$tsdir/build-aux/config.guess` - case $myhostsub in ce) w32root="$w32ce_root" @@ -222,6 +333,10 @@ if [ "$myhost" = "w32" ]; then fi die_p fi + if [ $PRINT_HOST = yes ]; then + echo "$host" + exit 0 + fi if [ -f "$tsdir/config.log" ]; then if ! head $tsdir/config.log | grep "$host" >/dev/null; then @@ -232,7 +347,8 @@ if [ "$myhost" = "w32" ]; then $tsdir/configure --enable-maintainer-mode ${SILENT} \ --prefix=${w32root} \ - --host=${host} --build=${build} \ + --host=${host} --build=${build} SYSROOT=${w32root} \ + PKG_CONFIG_LIBDIR=${w32root}/lib/pkgconfig \ ${configure_opts} ${extraoptions} "$@" rc=$? exit $rc @@ -242,13 +358,6 @@ fi # ***** AMD64 cross build script ******* # Used to cross-compile for AMD64 (for testing) if [ "$myhost" = "amd64" ]; then - shift - if [ ! -f $tsdir/build-aux/config.guess ]; then - echo "$tsdir/build-aux/config.guess not found" >&2 - exit 1 - fi - build=`$tsdir/build-aux/config.guess` - [ -z "$amd64root" ] && amd64root="$HOME/amd64root" info "Using $amd64root as standard install directory" replace_sysroot @@ -269,6 +378,10 @@ if [ "$myhost" = "amd64" ]; then echo "Stop." >&2 exit 1 fi + if [ $PRINT_HOST = yes ]; then + echo "$host" + exit 0 + fi if [ -f "$tsdir/config.log" ]; then if ! head $tsdir/config.log | grep "$host" >/dev/null; then @@ -341,13 +454,16 @@ fi # Check the git setup. if [ -d .git ]; then - CP="cp -a" - [ -z "${SILENT}" ] && CP="$CP -v" + CP="cp -p" + # If we have a GNU cp we can add -v + if cp --version >/dev/null 2>/dev/null; then + [ -z "${SILENT}" ] && CP="$CP -v" + fi if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then [ -z "${SILENT}" ] && cat <VERSION]) +AC_INIT([mym4_package],[mym4_version], [https://bugs.gnupg.org]) # LT Version numbers, remember to change them just *before* a release. +# (Code changed: REVISION++) +# (Interfaces added/removed/changed: CURRENT++, REVISION=0) +# (Interfaces added: AGE++) +# (Interfaces removed: AGE=0) +# # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) # (Interfaces added: CURRENT++, AGE++, REVISION=0) # (No interfaces changed: REVISION++) LIBGCRYPT_LT_CURRENT=23 LIBGCRYPT_LT_AGE=3 LIBGCRYPT_LT_REVISION=0 +################################################ +AC_SUBST(LIBGCRYPT_LT_CURRENT) +AC_SUBST(LIBGCRYPT_LT_AGE) +AC_SUBST(LIBGCRYPT_LT_REVISION) # If the API is changed in an incompatible way: increment the next counter. # @@ -69,9 +74,6 @@ LIBGCRYPT_CONFIG_API_VERSION=1 # unnecessary error code defines in src/gcrypt-int.h. NEED_GPG_ERROR_VERSION=1.25 -PACKAGE=$PACKAGE_NAME -VERSION=$PACKAGE_VERSION - AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/libgcrypt.vers]) AM_INIT_AUTOMAKE([serial-tests dist-bzip2]) @@ -123,18 +125,6 @@ AH_VERBATIM([_REENTRANT], ]) -AC_SUBST(LIBGCRYPT_LT_CURRENT) -AC_SUBST(LIBGCRYPT_LT_AGE) -AC_SUBST(LIBGCRYPT_LT_REVISION) -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) -VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_version_major \ - mym4_version_minor mym4_version_micro) -AC_SUBST(VERSION_NUMBER) - - ###################### ## Basic checks. ### (we need some results later on (e.g. $GCC) ###################### @@ -156,6 +146,10 @@ AC_PROG_AWK AC_GNU_SOURCE +VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \ + mym4_minor mym4_micro) +AC_SUBST(VERSION_NUMBER) + # We need to compile and run a program on the build machine. A # comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in # the AC archive is broken for autoconf 2.57. Given that there is no @@ -2642,9 +2636,11 @@ AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION", [GIT commit id revision used to build this package]) changequote(,)dnl -BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` +BUILD_VERSION=`echo "$PACKAGE_VERSION" | sed 's/\([0-9.]*\).*/\1./'` changequote([,])dnl -BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec" +BUILD_VERSION="${BUILD_VERSION}mym4_revision_dec" +BUILD_FILEVERSION=`echo "${BUILD_VERSION}" | tr . ,` +AC_SUBST(BUILD_VERSION) AC_SUBST(BUILD_FILEVERSION) AC_ARG_ENABLE([build-timestamp], ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + Makefile.am | 8 +-- autogen.sh | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- configure.ac | 72 +++++++++++++------------- 4 files changed, 178 insertions(+), 65 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 10:33:33 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 16 Oct 2018 10:33:33 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-86-g94c0354 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 94c0354fb1f31782fcf7ddb2ee26f8ab1bddd036 (commit) via 55e93a84061b0c35f360e9e1ab78070777798526 (commit) from ca19968b22e6659d7bff26bbca5b5d1c6ebb4571 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 94c0354fb1f31782fcf7ddb2ee26f8ab1bddd036 Author: Andre Heinecke Date: Tue Oct 16 10:24:05 2018 +0200 Add signature info to verify category * src/categorymanager.cpp, src/categorymanager.h: New. * src/Makefile.am: Add it. * src/cpphelp.cpp, src/cpphelp.h (join): New. * src/gpgoladdin.cpp, src/gpgoladdin.h (Gpgoladdin::get_category_mngr): New. * src/mail.cpp (Mail::~Mail): Remove categories. (Mail::updateCategories_o): Use new code for categories. (Mail::storeID): New carry store info. * src/oomhelp.cpp (create_category): Fix dbg. (get_store_for_id): New helper. (ensure_category_exists): Remove need for appl. (remove_category): Rewrite to allow partial matches. (_delete_category): New helper. (delete_category): New. Delete a category. (delete_all_categories_starting_with): New. * src/oomhelp.h: Update accordingly. -- On startup we delete all old categories to cleanup e.g. after we crashed and a category was left over. The categories are only created on the stores where they are required and only temporary as long as the mail is loaded. As several mails can share the same category we need the categorymanager to do some ref counting and help a bit. GnuPG-Bug-Id: T4183 diff --git a/src/Makefile.am b/src/Makefile.am index 0993bd5..369ce6d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,6 +31,7 @@ gpgol_SOURCES = \ addressbook.cpp addressbook.h \ application-events.cpp \ attachment.h attachment.cpp \ + categorymanager.h categorymanager.cpp \ common.h common.cpp \ common_indep.h common_indep.c \ cpphelp.cpp cpphelp.h \ diff --git a/src/categorymanager.cpp b/src/categorymanager.cpp new file mode 100644 index 0000000..1716b52 --- /dev/null +++ b/src/categorymanager.cpp @@ -0,0 +1,250 @@ +/* @file categorymanager.cpp + * @brief Handles category management + * + * Copyright (C) 2018 Intevation GmbH + * + * This file is part of GpgOL. + * + * GpgOL is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * GpgOL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +#include "categorymanager.h" +#include "common.h" +#include "mail.h" +#include "gpgoladdin.h" +#include "oomhelp.h" + +#include + +class CategoryManager::Private +{ +public: + Private() + { + } + + void createCategory (shared_disp_t store, + const std::string &category, int color) + { + TSTART; + LPDISPATCH categories = get_oom_object (store.get(), "Categories"); + if (!categories) + { + STRANGEPOINT; + TRETURN; + } + if (create_category (categories, category.c_str (), color)) + { + log_debug ("%s:%s: Failed to create category %s", + SRCNAME, __func__, anonstr (category.c_str())); + TRETURN; + } + TRETURN; + } + + void registerCategory (const std::string &storeID, + const std::string &category) + { + TSTART; + auto storeIt = mCategoryStoreMap.find (storeID); + if (storeIt == mCategoryStoreMap.end()) + { + /* First category for this store. Create a new + category ref map. */ + std::unordered_map categoryMap; + categoryMap.insert (std::make_pair (category, 1)); + mCategoryStoreMap.insert (std::make_pair (storeID, categoryMap)); + log_debug ("%s:%s: Register category %s in new store %s ref now 1", + SRCNAME, __func__, anonstr (category.c_str()), + anonstr (storeID.c_str())); + TRETURN; + } + auto categoryIt = storeIt->second.find (category); + if (categoryIt == storeIt->second.end ()) + { + storeIt->second.insert (std::make_pair (category, 1)); + log_debug ("%s:%s: Register category %s in store %s ref now 1", + SRCNAME, __func__, anonstr (category.c_str()), + anonstr (storeID.c_str())); + } + else + { + categoryIt->second++; + log_debug ("%s:%s: Register category %s in store %s ref now %i", + SRCNAME, __func__, anonstr (category.c_str()), + anonstr (storeID.c_str()), categoryIt->second); + } + TRETURN; + } + + void unregisterCategory (const std::string &storeID, + const std::string &category) + { + TSTART; + auto storeIt = mCategoryStoreMap.find (storeID); + if (storeIt == mCategoryStoreMap.end ()) + { + log_error ("%s:%s: Unregister called for unregistered store %s", + SRCNAME, __func__, anonstr (storeID.c_str())); + TRETURN; + } + auto categoryIt = storeIt->second.find (category); + if (categoryIt == storeIt->second.end ()) + { + log_debug ("%s:%s: Unregister %s not found for store %s", + SRCNAME, __func__, anonstr (category.c_str()), + anonstr (storeID.c_str())); + TRETURN; + } + categoryIt->second--; + log_debug ("%s:%s: Unregister category %s in store %s ref now %i", + SRCNAME, __func__, anonstr (category.c_str()), + anonstr (storeID.c_str()), categoryIt->second); + if (categoryIt->second < 0) + { + log_debug ("%s:%s: Unregister %s negative for store %s", + SRCNAME, __func__, anonstr (category.c_str()), + anonstr (storeID.c_str())); + TRETURN; + } + if (categoryIt->second == 0) + { + log_debug ("%s:%s: Deleting %s for store %s", + SRCNAME, __func__, anonstr (category.c_str()), + anonstr (storeID.c_str())); + + LPDISPATCH store = get_store_for_id (storeID.c_str()); + if (!store) + { + STRANGEPOINT; + TRETURN; + } + delete_category (store, category.c_str ()); + storeIt->second.erase (categoryIt); + } + TRETURN; + } + + bool categoryExistsInMap (const std::string &storeID, + const std::string &category) + { + const auto it = mCategoryStoreMap.find (storeID); + if (it == mCategoryStoreMap.end ()) + { + return false; + } + return it->second.find (category) != it->second.end(); + } + +private: + /* Map from: store to map of category -> refs. */ + std::unordered_map > mCategoryStoreMap; +}; + +/* static */ +std::shared_ptr +CategoryManager::instance () +{ + return GpgolAddin::get_instance ()->get_category_mngr (); +} + +CategoryManager::CategoryManager(): + d(new Private) +{ +} + +std::string +CategoryManager::addCategoryToMail (Mail *mail, const std::string &category, int color) +{ + TSTART; + std::string ret; + if (!mail || category.empty()) + { + TRETURN ret; + } + + auto store = MAKE_SHARED (get_oom_object (mail->item (), "Parent.Store")); + if (!store) + { + log_error ("%s:%s Failed to obtain store", + SRCNAME, __func__); + TRETURN std::string (); + } + char *storeID = get_oom_string (store.get (), "StoreID"); + if (!storeID) + { + log_error ("%s:%s Failed to obtain storeID", + SRCNAME, __func__); + TRETURN std::string (); + } + ret = storeID; + xfree (storeID); + + if (!d->categoryExistsInMap (ret, category)) + { + d->createCategory (store, category, color); + } + d->registerCategory (ret, category); + + if (add_category (mail->item (), category.c_str())) + { + /* Probably the category already existed there + so it is not super worrysome. */ + log_debug ("%s:%s Failed to add category.", + SRCNAME, __func__); + } + return ret; +} + +void +CategoryManager::removeCategory (Mail *mail, const std::string &category) +{ + TSTART; + if (!mail || category.empty()) + { + STRANGEPOINT; + TRETURN; + } + if (remove_category (mail->item (), category.c_str (), true)) + { + log_debug ("%s:%s Failed to remvoe category.", + SRCNAME, __func__); + } + d->unregisterCategory (mail->storeID (), category.c_str ()); + + TRETURN; +} + +/* static */ +void +CategoryManager::removeAllGpgOLCategories () +{ + TSTART; + delete_all_categories_starting_with ("GpgOL: "); + TRETURN; +} + +/* static */ +const std::string & +CategoryManager::getEncMailCategory () +{ + static std::string decStr; + if (decStr.empty()) + { + decStr = std::string ("GpgOL: ") + + std::string (_("Encrypted Message")); + } + return decStr; +} diff --git a/src/categorymanager.h b/src/categorymanager.h new file mode 100644 index 0000000..0e96485 --- /dev/null +++ b/src/categorymanager.h @@ -0,0 +1,69 @@ +#ifndef CATEGORYMANAGER_H +#define CATEGORYMANAGER_H + +/* @file categorymanager.h + * @brief Handles category management + * + * Copyright (C) 2018 Intevation GmbH + * + * This file is part of GpgOL. + * + * GpgOL is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * GpgOL is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +#include "config.h" + +#include +#include + +class Mail; +class GpgolAddin; + +/* The category manager is supposed to be only accessed from + the main thread and is not guarded by locks. */ +class CategoryManager +{ + friend class GpgolAddin; + +protected: + /** Internal ctor */ + explicit CategoryManager (); + +public: + /** Get the CategoryManager */ + static std::shared_ptr instance (); + + /** Add a category to a mail. + + @returns the storeID of the mail / category. + */ + std::string addCategoryToMail (Mail *mail, const std::string &category, + int color); + + /** Remove the category @category */ + void removeCategory (Mail * mail, + const std::string &category); + + /** Remove all GpgOL categories from all stores. */ + static void removeAllGpgOLCategories (); + + /** Get the name of the encryption category. */ + static const std::string & getEncMailCategory (); + +private: + class Private; + std::shared_ptr d; +}; + +#endif diff --git a/src/cpphelp.cpp b/src/cpphelp.cpp index 6ed5ad0..30daa9e 100644 --- a/src/cpphelp.cpp +++ b/src/cpphelp.cpp @@ -72,6 +72,20 @@ trim(std::string &s) rtrim (s); } +void +join(const std::vector& v, const char *c, std::string& s) +{ + s.clear(); + for (auto p = v.begin(); p != v.end(); ++p) + { + s += *p; + if (p != v.end() - 1) + { + s += c; + } + } +} + char ** vector_to_cArray(const std::vector &vec) { diff --git a/src/cpphelp.h b/src/cpphelp.h index 0b905b1..cd56349 100644 --- a/src/cpphelp.h +++ b/src/cpphelp.h @@ -38,6 +38,9 @@ void rtrim (std::string &s); void ltrim (std::string &s); void trim (std::string &s); +/* Join a string vector */ +void join(const std::vector& v, const char *c, std::string& s); + /* Convert a string vector to a null terminated char array */ char **vector_to_cArray (const std::vector &vec); std::vector cArray_to_vector (const char **cArray); diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp index acc1969..aca9943 100644 --- a/src/gpgoladdin.cpp +++ b/src/gpgoladdin.cpp @@ -48,6 +48,7 @@ #include "addin-options.h" #include "cpphelp.h" #include "dispcache.h" +#include "categorymanager.h" #include #include @@ -511,11 +512,11 @@ GpgolAddin::OnStartupComplete (SAFEARRAY** custom) SRCNAME, __func__); } - /* Set up categories */ - const char *decCategory = _("GpgOL: Encrypted Message"); - const char *verifyCategory = _("GpgOL: Trusted Sender Address"); - ensure_category_exists (m_application, decCategory, 8); - ensure_category_exists (m_application, verifyCategory, 5); + /* Clean GpgOL prefixed categories. + They might be left over from a crash or something unexpected + error. We want to avoid pollution with the signed by categories. + */ + CategoryManager::removeAllGpgOLCategories (); install_forms (); m_applicationEventSink = install_ApplicationEvents_sink (m_application); m_explorersEventSink = install_explorer_sinks (m_application); @@ -1251,3 +1252,14 @@ GpgolAddin::unregisterExplorerSink (LPDISPATCH sink) log_error ("%s:%s: Unregister %p which was not registered.", SRCNAME, __func__, sink); } + +std::shared_ptr +GpgolAddin::get_category_mngr () +{ + if (!m_category_mngr) + { + m_category_mngr = std::shared_ptr ( + new CategoryManager ()); + } + return m_category_mngr; +} diff --git a/src/gpgoladdin.h b/src/gpgoladdin.h index 3627a01..0bd6f78 100644 --- a/src/gpgoladdin.h +++ b/src/gpgoladdin.h @@ -32,6 +32,7 @@ class GpgolAddinRibbonExt; class ApplicationEventListener; class DispCache; +class CategoryManager; /* Enums for the IDTExtensibility2 interface*/ typedef enum @@ -223,6 +224,8 @@ public: /* Invalidate the ribbons. */ void invalidateRibbons (); + std::shared_ptr get_category_mngr (); + private: ULONG m_lRef; GpgolRibbonExtender* m_ribbonExtender; @@ -238,6 +241,7 @@ private: std::vector m_explorerEventSinks; std::shared_ptr m_dispcache; std::vector m_ribbon_uis; + std::shared_ptr m_category_mngr; }; class GpgolAddinFactory: public IClassFactory diff --git a/src/mail.cpp b/src/mail.cpp index bfff980..134ea9d 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -21,6 +21,8 @@ */ #include "config.h" + +#include "categorymanager.h" #include "dialogs.h" #include "common.h" #include "mail.h" @@ -50,6 +52,7 @@ #include #include +#include #include #include #include @@ -192,6 +195,10 @@ Mail::~Mail() gpgol_unlock (&uid_map_lock); } + log_oom ("%s:%s: removing categories", + SRCNAME, __func__); + removeCategories_o (); + log_oom ("%s:%s: releasing mailitem", SRCNAME, __func__); gpgol_release(m_mailitem); @@ -2133,7 +2140,8 @@ Mail::updateSigstate () anonstr (sender.c_str ())); } } - + /* Sigsum valid or green is somehow not set in this case. + * Which is strange as AFAIK this worked in the past. */ if ((sig.summary() & Signature::Summary::Valid) && m_uid.origin() == GpgME::Key::OriginWKD && (sig.validity() == Signature::Validity::Unknown || @@ -2190,10 +2198,20 @@ void Mail::removeCategories_o () { TSTART; - const char *decCategory = _("GpgOL: Encrypted Message"); - const char *verifyCategory = _("GpgOL: Trusted Sender Address"); - remove_category (m_mailitem, decCategory); - remove_category (m_mailitem, verifyCategory); + if (!m_store_id.empty () && !m_verify_category.empty ()) + { + log_oom ("%s:%s: Unreffing verify category", + SRCNAME, __func__); + CategoryManager::instance ()->removeCategory (this, + m_verify_category); + } + if (!m_store_id.empty () && !m_decrypt_result.isNull()) + { + log_oom ("%s:%s: Unreffing dec category", + SRCNAME, __func__); + CategoryManager::instance ()->removeCategory (this, + CategoryManager::getEncMailCategory ()); + } TRETURN; } @@ -2261,30 +2279,116 @@ resize_active_window () TRETURN; } +#if 0 +static std::string +pretty_id (const char *keyId) +{ + /* Three spaces, four quads and a NULL */ + char buf[20]; + buf[19] = '\0'; + if (!keyId) + { + return std::string ("null"); + } + size_t len = strlen (keyId); + if (!len) + { + return std::string ("empty"); + } + if (len < 16) + { + return std::string (_("Invalid Key")); + } + const char *p = keyId + (len - 16); + int j = 0; + for (size_t i = 0; i < 16; i++) + { + if (i && i % 4 == 0) + { + buf[j++] = ' '; + } + buf[j++] = *(p + i); + } + return std::string (buf); +} +#endif + void Mail::updateCategories_o () { TSTART; - const char *decCategory = _("GpgOL: Encrypted Message"); - const char *verifyCategory = _("GpgOL: Trusted Sender Address"); + + auto mngr = CategoryManager::instance (); if (isValidSig ()) { - add_category (m_mailitem, verifyCategory); + char *buf; + /* Resolve to the primary fingerprint */ +#if 0 + const auto sigKey = KeyCache::instance ()->getByFpr (m_sig.fingerprint (), + true); + const char *sigFpr; + if (sigKey.isNull()) + { + sigFpr = m_sig.fingerprint (); + } + else + { + sigFpr = sigKey.primaryFingerprint (); + } +#endif + /* If m_uid addrSpec would not return a result we would never + * have gotten the UID. */ + int lvl = get_signature_level (); + gpgrt_asprintf (&buf, "GpgOL: %s %i %s '%s'", _("Level"), lvl, + _("trust in"), + m_uid.addrSpec ().c_str ()); + memdbg_alloc (buf); + + int color = 0; + if (lvl == 2) + { + color = 7; + } + if (lvl == 3) + { + color = 5; + } + if (lvl == 4) + { + color = 20; + } + m_store_id = mngr->addCategoryToMail (this, buf, color); + m_verify_category = buf; + xfree (buf); } else { - remove_category (m_mailitem, verifyCategory); + remove_category (m_mailitem, "GpgOL: ", false); } if (!m_decrypt_result.isNull()) { - add_category (m_mailitem, decCategory); + const auto id = mngr->addCategoryToMail (this, + CategoryManager::getEncMailCategory (), + 8); + if (m_store_id.empty()) + { + m_store_id = id; + } + if (m_store_id != id) + { + log_error ("%s:%s unexpected store mismatch " + "between '%s' and dec cat '%s'", + SRCNAME, __func__, m_store_id.c_str(), id.c_str()); + } } else { /* As a small safeguard against fakes we remove our categories */ - remove_category (m_mailitem, decCategory); + remove_category (m_mailitem, + CategoryManager::getEncMailCategory ().c_str (), + true); } resize_active_window(); diff --git a/src/mail.h b/src/mail.h index c4f2369..05d26d0 100644 --- a/src/mail.h +++ b/src/mail.h @@ -598,6 +598,9 @@ public: /* Gets an additional reference for GetInspector.CurrentItem */ void refCurrentItem (); + /* Get the storeID for this mail */ + std::string storeID() { return m_store_id; } + private: void updateCategories_o (); void updateSigstate (); @@ -649,5 +652,7 @@ private: int m_locate_count; /* The number of key locates pending for this mail. */ bool m_is_about_to_be_moved; bool m_locate_in_progress; /* Simplified state variable for locate */ + std::string m_store_id; /* Store id for categories */ + std::string m_verify_category; /* The category string for the verify result */ }; #endif // MAIL_H diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp index 7cc922a..1cc2d0b 100644 --- a/src/oomhelp.cpp +++ b/src/oomhelp.cpp @@ -27,11 +27,14 @@ #include #include #include +#include +#include #include #include "common.h" #include "oomhelp.h" +#include "cpphelp.h" #include "gpgoladdin.h" HRESULT @@ -1763,7 +1766,7 @@ get_oom_mapi_session () TRETURN session; } -static int +int create_category (LPDISPATCH categories, const char *category, int color) { TSTART; @@ -1838,21 +1841,66 @@ create_category (LPDISPATCH categories, const char *category, int color) } VariantClear (&rVariant); log_oom ("%s:%s: Created category '%s'", - SRCNAME, __func__, category); + SRCNAME, __func__, anonstr (category)); TRETURN 0; } +LPDISPATCH +get_store_for_id (const char *storeID) +{ + TSTART; + LPDISPATCH application = GpgolAddin::get_instance ()->get_application (); + if (!application || !storeID) + { + TRACEPOINT; + TRETURN nullptr; + } + + LPDISPATCH stores = get_oom_object (application, "Session.Stores"); + if (!stores) + { + log_error ("%s:%s: No stores found.", + SRCNAME, __func__); + TRETURN nullptr; + } + auto store_count = get_oom_int (stores, "Count"); + + for (int n = 1; n <= store_count; n++) + { + const auto store_str = std::string("Item(") + std::to_string(n) + ")"; + LPDISPATCH store = get_oom_object (stores, store_str.c_str()); + + if (!store) + { + TRACEPOINT; + continue; + } + char *id = get_oom_string (store, "StoreID"); + if (id && !strcmp (id, storeID)) + { + gpgol_release (stores); + return store; + } + gpgol_release (store); + } + gpgol_release (stores); + return nullptr; +} + void -ensure_category_exists (LPDISPATCH application, const char *category, int color) +ensure_category_exists (const char *category, int color) { TSTART; + LPDISPATCH application = GpgolAddin::get_instance ()->get_application (); if (!application || !category) { TRACEPOINT; TRETURN; } - log_oom ("Ensure category exists called for %s, %i", category, color); + log_oom ("%s:%s: Ensure category exists called for %s, %i", + SRCNAME, __func__, + category, color); LPDISPATCH stores = get_oom_object (application, "Session.Stores"); if (!stores) @@ -1955,7 +2003,7 @@ add_category (LPDISPATCH mail, const char *category) } int -remove_category (LPDISPATCH mail, const char *category) +remove_category (LPDISPATCH mail, const char *category, bool exactMatch) { TSTART; char *tmp = get_oom_string (mail, "Categories"); @@ -1964,29 +2012,192 @@ remove_category (LPDISPATCH mail, const char *category) TRACEPOINT; TRETURN 1; } - std::string newstr (tmp); + + std::vector categories; + std::istringstream f(tmp); + std::string s; + while (std::getline(f, s, ',')) + { + ltrim(s); + categories.push_back(s); + } xfree (tmp); - std::string cat (category); - size_t pos1 = newstr.find (cat); - size_t pos2 = newstr.find (std::string(", ") + cat); - if (pos1 == std::string::npos && pos2 == std::string::npos) + const std::string categoryStr = category; + + categories.erase (std::remove_if (categories.begin(), + categories.end(), + [categoryStr, exactMatch] (const std::string &cat) { - log_oom ("%s:%s: category '%s' not found.", - SRCNAME, __func__, category); - TRETURN 0; + if (exactMatch) + { + return cat == categoryStr; + } + return cat.compare (0, categoryStr.size(), categoryStr) == 0; + }), categories.end ()); + std::string newCategories; + join (categories, ", ", newCategories); + + TRETURN put_oom_string (mail, "Categories", newCategories.c_str ()); +} + +static int +_delete_category (LPDISPATCH categories, int idx) +{ + TSTART; + VARIANT aVariant[1]; + DISPPARAMS dispparams; + + dispparams.rgvarg = aVariant; + dispparams.rgvarg[0].vt = VT_INT; + dispparams.rgvarg[0].intVal = idx; + dispparams.cArgs = 1; + dispparams.cNamedArgs = 0; + + TRETURN invoke_oom_method_with_parms (categories, "Remove", NULL, + &dispparams); +} + +int +delete_category (LPDISPATCH store, const char *category) +{ + TSTART; + if (!store || !category) + { + TRETURN -1; } - size_t len = cat.size(); - if (pos2) + LPDISPATCH categories = get_oom_object (store, "Categories"); + if (!categories) { - len += 2; + categories = get_oom_object ( + GpgolAddin::get_instance ()->get_application (), + "Session.Categories"); + if (!categories) + { + TRACEPOINT; + TRETURN -1; + } } - newstr.erase (pos2 != std::string::npos ? pos2 : pos1, len); - log_oom ("%s:%s: removing category '%s'", - SRCNAME, __func__, category); - TRETURN put_oom_string (mail, "Categories", newstr.c_str ()); + auto count = get_oom_int (categories, "Count"); + int ret = 0; + for (int i = 1; i <= count; i++) + { + const auto item_str = std::string("Item(") + std::to_string(i) + ")"; + LPDISPATCH category_obj = get_oom_object (categories, item_str.c_str()); + if (!category_obj) + { + TRACEPOINT; + gpgol_release (categories); + break; + } + char *name = get_oom_string (category_obj, "Name"); + gpgol_release (category_obj); + if (name && !strcmp (category, name)) + { + if ((ret = _delete_category (categories, i))) + { + log_error ("%s:%s: Failed to delete category '%s'", + SRCNAME, __func__, anonstr (category)); + } + else + { + log_debug ("%s:%s: Deleted category '%s'", + SRCNAME, __func__, anonstr (category)); + } + break; + } + xfree (name); + } + + gpgol_release (categories); + TRETURN ret; +} + +void +delete_all_categories_starting_with (const char *string) +{ + LPDISPATCH application = GpgolAddin::get_instance ()->get_application (); + if (!application || !string) + { + TRACEPOINT; + TRETURN; + } + + log_oom ("%s:%s: Delete categories starting with: \"%s\"", + SRCNAME, __func__, string); + + LPDISPATCH stores = get_oom_object (application, "Session.Stores"); + if (!stores) + { + log_error ("%s:%s: No stores found.", + SRCNAME, __func__); + TRETURN; + } + + auto store_count = get_oom_int (stores, "Count"); + + for (int n = 1; n <= store_count; n++) + { + const auto store_str = std::string("Item(") + std::to_string(n) + ")"; + LPDISPATCH store = get_oom_object (stores, store_str.c_str()); + + if (!store) + { + TRACEPOINT; + continue; + } + + LPDISPATCH categories = get_oom_object (store, "Categories"); + if (!categories) + { + categories = get_oom_object (application, "Session.Categories"); + if (!categories) + { + TRACEPOINT; + gpgol_release (store); + continue; + } + } + + auto count = get_oom_int (categories, "Count"); + std::vector to_delete; + for (int i = 1; i <= count; i++) + { + const auto item_str = std::string("Item(") + std::to_string(i) + ")"; + LPDISPATCH category_obj = get_oom_object (categories, item_str.c_str()); + if (!category_obj) + { + TRACEPOINT; + gpgol_release (categories); + break; + } + char *name = get_oom_string (category_obj, "Name"); + if (name && !strncmp (string, name, strlen (string))) + { + log_oom ("%s:%s: Found category for deletion '%s'", + SRCNAME, __func__, anonstr(name)); + to_delete.push_back (name); + } + /* We don't check the color here as the user may change that. */ + gpgol_release (category_obj); + xfree (name); + } + + /* Do this one after another to avoid messing with indexes. */ + for (const auto &str: to_delete) + { + delete_category (store, str.c_str ()); + } + + gpgol_release (store); + /* Otherwise we have to create the category */ + gpgol_release (categories); + } + gpgol_release (stores); + TRETURN; + } static char * diff --git a/src/oomhelp.h b/src/oomhelp.h index b922333..3f9199c 100644 --- a/src/oomhelp.h +++ b/src/oomhelp.h @@ -333,14 +333,13 @@ invoke_oom_method_with_parms (LPDISPATCH pDisp, const char *name, LPMAPISESSION get_oom_mapi_session (void); -/* Ensure a category of the name name exists in - the session for the Mail mail. +/* Ensure a category of the name name exists. Creates the category with the specified color if required. returns 0 on success. */ void -ensure_category_exists (LPDISPATCH mail, const char *category, int color); +ensure_category_exists (const char *category, int color); /* Add a category to a mail if it is not already added. */ int @@ -348,7 +347,21 @@ add_category (LPDISPATCH mail, const char *category); /* Remove a category from a mail if it was added. */ int -remove_category (LPDISPATCH mail, const char *category); +remove_category (LPDISPATCH mail, const char *category, bool exactMatch); + +/* Create the category */ +int +create_category (LPDISPATCH categories, const char *category, int color); + +/* Delete a category from the store. */ +int delete_category (LPDISPATCH store, const char *category); + +/* Delete categories starting with "string" from all stores. */ +void delete_all_categories_starting_with (const char *string); + +/* Iterate over application stores and return the one with the ID + @storeID */ +LPDISPATCH get_store_for_id (const char *storeID); /* Get a unique identifier for a mail object. The uuid is a custom property. If create is set commit 55e93a84061b0c35f360e9e1ab78070777798526 Author: Andre Heinecke Date: Tue Oct 16 10:14:21 2018 +0200 Minor indentation fix -- diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp index 2b84b0e..7cc922a 100644 --- a/src/oomhelp.cpp +++ b/src/oomhelp.cpp @@ -2110,7 +2110,7 @@ create_mail () { TRACEPOINT; TRETURN nullptr; - } + } VARIANT var; VariantInit (&var); @@ -2146,7 +2146,7 @@ get_account_for_mail (const char *mbox) { TRACEPOINT; TRETURN nullptr; - } + } LPDISPATCH accounts = get_oom_object (app, "Session.Accounts"); @@ -2433,7 +2433,7 @@ log_addins () { TRACEPOINT; TRETURN; - } + } LPDISPATCH addins = get_oom_object (app, "COMAddins"); ----------------------------------------------------------------------- Summary of changes: src/Makefile.am | 1 + src/categorymanager.cpp | 250 ++++++++++++++++++++++++++++++++++++++++++++++ src/categorymanager.h | 69 +++++++++++++ src/cpphelp.cpp | 14 +++ src/cpphelp.h | 3 + src/gpgoladdin.cpp | 22 ++++- src/gpgoladdin.h | 4 + src/mail.cpp | 126 +++++++++++++++++++++--- src/mail.h | 5 + src/oomhelp.cpp | 257 +++++++++++++++++++++++++++++++++++++++++++----- src/oomhelp.h | 21 +++- 11 files changed, 729 insertions(+), 43 deletions(-) create mode 100644 src/categorymanager.cpp create mode 100644 src/categorymanager.h hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 10:53:40 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 16 Oct 2018 10:53:40 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.0-89-gb3c8743 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via b3c87431ea24946657956ae710440852da727582 (commit) via f34cd2782bc0cd6f359c14de4d4a889ec4e49a6e (commit) from 14f7aea2d6bf4e2b463a0f8440deb7f92576a286 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b3c87431ea24946657956ae710440852da727582 Author: Andre Heinecke Date: Tue Oct 16 10:52:57 2018 +0200 Fix memleaks in new category code * src/categorymanager.cpp, src/oomhelp.cpp (get_store_for_id, delete_category): Fix leaks. diff --git a/src/categorymanager.cpp b/src/categorymanager.cpp index 1716b52..e671f2d 100644 --- a/src/categorymanager.cpp +++ b/src/categorymanager.cpp @@ -48,8 +48,10 @@ public: { log_debug ("%s:%s: Failed to create category %s", SRCNAME, __func__, anonstr (category.c_str())); + gpgol_release (categories); TRETURN; } + gpgol_release (categories); TRETURN; } @@ -131,6 +133,7 @@ public: TRETURN; } delete_category (store, category.c_str ()); + gpgol_release (store); storeIt->second.erase (categoryIt); } TRETURN; diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp index 1cc2d0b..b859cb7 100644 --- a/src/oomhelp.cpp +++ b/src/oomhelp.cpp @@ -1879,12 +1879,14 @@ get_store_for_id (const char *storeID) if (id && !strcmp (id, storeID)) { gpgol_release (stores); + xfree (id); return store; } + xfree (id); gpgol_release (store); } gpgol_release (stores); - return nullptr; + TRETURN nullptr; } void @@ -2106,6 +2108,7 @@ delete_category (LPDISPATCH store, const char *category) log_debug ("%s:%s: Deleted category '%s'", SRCNAME, __func__, anonstr (category)); } + xfree (name); break; } xfree (name); commit f34cd2782bc0cd6f359c14de4d4a889ec4e49a6e Author: Andre Heinecke Date: Tue Oct 16 10:52:32 2018 +0200 Fix string alloc tracing * src/w32-gettext.h: Fix string alloc trace check diff --git a/src/w32-gettext.h b/src/w32-gettext.h index 24c3cd0..e8547d3 100644 --- a/src/w32-gettext.h +++ b/src/w32-gettext.h @@ -73,7 +73,7 @@ char *native_to_utf8 (const char *string); #define utf8_to_wchar(VAR1) ({wchar_t *retval; \ retval = _utf8_to_wchar (VAR1); \ - if ((opt.enable_debug & (DBG_TRACE & DBG_DATA & DBG_MEMORY))) \ + if ((opt.enable_debug & (DBG_TRACE | DBG_DATA | DBG_MEMORY))) \ { \ log_debug ("%s:%s:%i wchar_t alloc %p:%S", \ SRCNAME, __func__, __LINE__, retval, retval); \ @@ -82,7 +82,7 @@ retval;}) #define wchar_to_utf8(VAR1) ({char *retval; \ retval = _wchar_to_utf8 (VAR1); \ - if ((opt.enable_debug & (DBG_TRACE & DBG_DATA & DBG_MEMORY))) \ + if ((opt.enable_debug & (DBG_TRACE | DBG_DATA | DBG_MEMORY))) \ { \ log_debug ("%s:%s:%i char utf8 alloc %p:%s", \ SRCNAME, __func__, __LINE__, retval, retval); \ ----------------------------------------------------------------------- Summary of changes: src/categorymanager.cpp | 3 +++ src/oomhelp.cpp | 5 ++++- src/w32-gettext.h | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 12:28:07 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 16 Oct 2018 12:28:07 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 3278db48c5422265ce937f03272bd026eeab8df9 (commit) via 586af18a0d8e7cb4dc43cf6478a0969db0cc7022 (commit) via ab957f55aeb693f2bf4a22a81f4d81b30c16c76b (commit) via 3b8b39ad12b321c4e609916f60e5f05f741a269c (commit) from b3c87431ea24946657956ae710440852da727582 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3278db48c5422265ce937f03272bd026eeab8df9 Author: Andre Heinecke Date: Tue Oct 16 12:25:20 2018 +0200 Auto update po files -- diff --git a/po/de.po b/po/de.po index fc1d88d..5e84c21 100644 --- a/po/de.po +++ b/po/de.po @@ -148,8 +148,8 @@ msgstr "Bevorzuge S/MIME gegen?ber OpenPGP, wenn beide m?glich sind." msgid "" "Search and import &X509 certificates in the configured directory services" msgstr "" -"&X509 Zertifikate in den konfigurierten Verzeichnisdiensten suchen und" -" importieren." +"&X509 Zertifikate in den konfigurierten Verzeichnisdiensten suchen und " +"importieren." #. TRANSLATORS: Part of the config dialog. Tooltip #: src/addin-options.cpp:78 @@ -157,9 +157,8 @@ msgid "" "Searches for X509 certificates automatically and imports them. This option " "searches in all configured services." msgstr "" -"Sucht automatisch nach X509 Zertifikaten und importiert diese. Diese Option" -" sucht " -"in alle konfigurierten Diensten." +"Sucht automatisch nach X509 Zertifikaten und importiert diese. Diese Option " +"sucht in alle konfigurierten Diensten." #. TRANSLATORS: Part of the config dialog. Warning about privacy leak. #: src/addin-options.cpp:80 @@ -167,8 +166,8 @@ msgid "" "Warning: The configured services will receive information about whom " "you send Emails!" msgstr "" -"Warnung: Die konfigurierten Dienste erhalten Informationen dar?ber wem" -" Sie Mails schreiben!" +"Warnung: Die konfigurierten Dienste erhalten Informationen dar?ber " +"wem Sie Mails schreiben!" #. TRANSLATORS: Part of address book key configuration dialog. #. The contacts name follows. commit 586af18a0d8e7cb4dc43cf6478a0969db0cc7022 Author: Andre Heinecke Date: Tue Oct 16 12:24:35 2018 +0200 Update NEWS for todays release -- diff --git a/NEWS b/NEWS index f5f6bf2..550d942 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,17 @@ -Noteworthy changes for version 2.3.1 (unreleased) +Noteworthy changes for version 2.3.1 (2018-10-16) ================================================= + * Fixed attachement handling for office and pdf attachments. + + * Improved signature info display. + + * Added address book integration for OpenPGP. + + * Added auto import capabilities for S/MIME. + + * Added generic prefer S/MIME mode. + + * Various bugfixes and regression fixes. Noteworthy changes for version 2.3.0 (2018-08-31) ================================================= commit ab957f55aeb693f2bf4a22a81f4d81b30c16c76b Author: Andre Heinecke Date: Tue Oct 16 12:22:47 2018 +0200 Do not try to import empty key data from addrbook * src/keycache.cpp (importFromAddrBook): Check if data is empty. diff --git a/src/keycache.cpp b/src/keycache.cpp index 69171c6..e1bb17f 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -735,22 +735,29 @@ public: TRACEPOINT; TRETURN; } - gpgol_lock (&import_lock); - if (m_import_jobs.find (mbox) != m_import_jobs.end ()) - { - log_debug ("%s:%s import for \"%s\" already in progress.", - SRCNAME, __func__, anonstr (mbox.c_str ())); - gpgol_unlock (&import_lock); - } - m_import_jobs.insert (mbox); - gpgol_unlock (&import_lock); - import_arg_t * args = new import_arg_t; - args->first = std::unique_ptr (new LocateArgs (mbox, mail)); - args->second = std::string (data); - CloseHandle (CreateThread (NULL, 0, do_import, - (LPVOID) args, 0, - NULL)); + std::string sdata (data); + trim (sdata); + if (sdata.empty()) + { + TRETURN; + } + gpgol_lock (&import_lock); + if (m_import_jobs.find (mbox) != m_import_jobs.end ()) + { + log_debug ("%s:%s import for \"%s\" already in progress.", + SRCNAME, __func__, anonstr (mbox.c_str ())); + gpgol_unlock (&import_lock); + } + m_import_jobs.insert (mbox); + gpgol_unlock (&import_lock); + + import_arg_t * args = new import_arg_t; + args->first = std::unique_ptr (new LocateArgs (mbox, mail)); + args->second = sdata; + CloseHandle (CreateThread (NULL, 0, do_import, + (LPVOID) args, 0, + NULL)); TRETURN; } commit 3b8b39ad12b321c4e609916f60e5f05f741a269c Author: Andre Heinecke Date: Tue Oct 16 12:21:42 2018 +0200 Make address book lookup more robust * src/addressbook.cpp (Addressbook::update_key_o): Clear checked entries after update. (Addressbook::check_o): Only mark resolved contacts as checked. :xa diff --git a/src/addressbook.cpp b/src/addressbook.cpp index 6c0f4d4..7a92961 100644 --- a/src/addressbook.cpp +++ b/src/addressbook.cpp @@ -38,6 +38,8 @@ typedef struct shared_disp_t contact; } keyadder_args_t; +static std::set s_checked_entries; + static DWORD WINAPI open_keyadder (LPVOID arg) { @@ -150,6 +152,8 @@ Addressbook::update_key_o (void *callback_args) SRCNAME, __func__); gpgol_release (pgp_key); + + s_checked_entries.clear (); TRETURN; } @@ -215,7 +219,6 @@ Addressbook::edit_key_o (LPDISPATCH contact) TRETURN; } -static std::set s_checked_entries; /* For each new recipient check the address book to look for a potentially configured key for this recipient and import / register it into the keycache. @@ -252,7 +255,6 @@ Addressbook::check_o (Mail *mail) { continue; } - s_checked_entries.insert (pair.first); if (!pair.second) { @@ -268,6 +270,7 @@ Addressbook::check_o (Mail *mail) anonstr (pair.first.c_str())); continue; } + s_checked_entries.insert (pair.first); LPDISPATCH user_props = get_oom_object (contact.get (), "UserProperties"); if (!user_props) ----------------------------------------------------------------------- Summary of changes: NEWS | 13 ++++++++++++- po/de.po | 13 ++++++------- src/addressbook.cpp | 7 +++++-- src/keycache.cpp | 37 ++++++++++++++++++++++--------------- 4 files changed, 45 insertions(+), 25 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 12:28:54 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 16 Oct 2018 12:28:54 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-1-g2365412 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 236541264560b59311613c70e7dc01bde537c70a (commit) from 3278db48c5422265ce937f03272bd026eeab8df9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 236541264560b59311613c70e7dc01bde537c70a Author: Andre Heinecke Date: Tue Oct 16 12:28:40 2018 +0200 Post release version bump -- diff --git a/NEWS b/NEWS index 550d942..f5bb4ea 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Noteworthy changes for version 2.3.2 (unreleased) +================================================= + + Noteworthy changes for version 2.3.1 (2018-10-16) ================================================= diff --git a/configure.ac b/configure.ac index 4ddb931..26d2ddc 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ min_automake_version="1.14" # (git tag -s gpgol-k.n.m) and run "./autogen.sh --force". Please # bump the version number immediately *after* the release and do # another commit and push so that the git magic is able to work. -m4_define([mym4_version], [2.3.1]) +m4_define([mym4_version], [2.3.2]) # Below is m4 magic to extract and compute the git revision number, # the decimalized short revision number, a beta version string and a ----------------------------------------------------------------------- Summary of changes: NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 12:30:50 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 16 Oct 2018 12:30:50 +0200 Subject: [git] gnupg-doc - branch, master, updated. 4f29d915a2ff86c7cfc9d2adf2649e64efb5caca Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 4f29d915a2ff86c7cfc9d2adf2649e64efb5caca (commit) from 89c22291b1bb15e4ba5808070fda0ac7fadcd227 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4f29d915a2ff86c7cfc9d2adf2649e64efb5caca Author: Andre Heinecke Date: Tue Oct 16 12:30:20 2018 +0200 swdb: Release gpgol 2.3.1 -- diff --git a/web/swdb.mac b/web/swdb.mac index e0aa43b..af0ebf0 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -181,11 +181,11 @@ # # GpgOL # -#+macro: gpgol_ver 2.3.0 -#+macro: gpgol_date 2018-08-31 -#+macro: gpgol_size 735k -#+macro: gpgol_sha1 8c1c8fc098b23c690b2f4ea2c82bffa38071c70d -#+macro: gpgol_sha2 8faa3bcec013b6e769a01aecb7845e94618f83aa876fdbe84fe44af89142f86b +#+macro: gpgol_ver 2.3.1 +#+macro: gpgol_date 2018-10-16 +#+macro: gpgol_size 759k +#+macro: gpgol_sha1 6c9dd34acc5b343b5dcca03b89de467e0ae59618 +#+macro: gpgol_sha2 2b2b4ef08fda8103cfbdcb3d988081d5d6c9ae6e8021bd2d237da1257efd5dc5 # ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 13:03:34 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 16 Oct 2018 13:03:34 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.9.10-26-g83227b8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 83227b81ae3f61d68526a87998498ec2f7b95334 (commit) via 1ca0eb42967a9cc822eadb295f8dacc770d816de (commit) via 210c7c375df1222e2e10c0ea44e8b62a1ad569fa (commit) from 38bdae22d127e05903310ea1596d97c562ecd7c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 83227b81ae3f61d68526a87998498ec2f7b95334 Author: Werner Koch Date: Tue Oct 16 13:03:25 2018 +0200 In --locate-key mode ley Retrieve_Key not search in Local. * src/gpaimportserverop.c (search_keys): Do not search in local keyring. * src/gparecvkeydlg.c (gpa_receive_key_dialog_init): Make Enter work in the input field. Signed-off-by: Werner Koch diff --git a/src/gpaimportserverop.c b/src/gpaimportserverop.c index a99a961..9b2cac1 100644 --- a/src/gpaimportserverop.c +++ b/src/gpaimportserverop.c @@ -136,6 +136,7 @@ search_keys (GpaImportOperation *operation, const char *keyid) keyarray = g_malloc0_n (MAX_KEYSEARCH_RESULTS + 1, sizeof *keyarray); + /* We need to use a separate context because the operation's context has already been setup and the done signal would relate to the actual import operation done later. */ @@ -152,6 +153,9 @@ search_keys (GpaImportOperation *operation, const char *keyid) /* We already extracted the mbox - use it directly than letting * gnupg extract it. */ keyid = mbox; + + gpgme_set_ctx_flag (context->ctx, "auto-key-locate", + "clear,nodefault,wkd,keyserver"); } #endif /* GPGME >= 1.7.1 */ err = gpgme_set_keylist_mode (context->ctx, listmode); diff --git a/src/gparecvkeydlg.c b/src/gparecvkeydlg.c index 758190e..21d7821 100644 --- a/src/gparecvkeydlg.c +++ b/src/gparecvkeydlg.c @@ -112,6 +112,7 @@ gpa_receive_key_dialog_init (GpaReceiveKeyDialog *dialog) TRUE, 10); dialog->entry = gtk_entry_new (); + gtk_entry_set_activates_default (GTK_ENTRY (dialog->entry), TRUE); if (is_gpg_version_at_least ("2.1.0")) { gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), commit 1ca0eb42967a9cc822eadb295f8dacc770d816de Author: Werner Koch Date: Tue Oct 16 12:20:50 2018 +0200 Add more details buttons to error dialogs. Signed-off-by: Werner Koch diff --git a/src/gpaexportop.c b/src/gpaexportop.c index d20f785..7275c94 100644 --- a/src/gpaexportop.c +++ b/src/gpaexportop.c @@ -284,7 +284,7 @@ gpa_export_operation_done_error_cb (GpaContext *context, gpg_error_t err, /* Ignore these */ break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpafileencryptop.c b/src/gpafileencryptop.c index a76c4e0..5bb6574 100644 --- a/src/gpafileencryptop.c +++ b/src/gpafileencryptop.c @@ -772,10 +772,11 @@ gpa_file_encrypt_operation_done_error_cb (GpaContext *context, gpg_error_t err, /* Ignore these */ break; case GPG_ERR_BAD_PASSPHRASE: - gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Wrong passphrase!")); break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpafileimportop.c b/src/gpafileimportop.c index bb78c3f..48cfc18 100644 --- a/src/gpafileimportop.c +++ b/src/gpafileimportop.c @@ -289,7 +289,7 @@ gpa_file_import_operation_done_error_cb (GpaContext *context, gpg_error_t err, break; case GPG_ERR_NO_DATA: - gpa_show_warn (GPA_OPERATION (op)->window, NULL, + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, file_item->direct_name ? _("\"%s\" contained no OpenPGP data.") : _("The file \"%s\" contained no OpenPGP" @@ -300,12 +300,13 @@ gpa_file_import_operation_done_error_cb (GpaContext *context, gpg_error_t err, break; default: - gpa_show_warn (GPA_OPERATION (op)->window, NULL, + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, _("Error importing \"%s\": %s <%s>"), file_item->direct_name ? file_item->direct_name : file_item->filename_in, gpg_strerror (err), gpg_strsource (err)); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpafilesignop.c b/src/gpafilesignop.c index b926d17..ebdadd7 100644 --- a/src/gpafilesignop.c +++ b/src/gpafilesignop.c @@ -525,10 +525,11 @@ gpa_file_sign_operation_done_error_cb (GpaContext *context, gpg_error_t err, /* Ignore these */ break; case GPG_ERR_BAD_PASSPHRASE: - gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Wrong passphrase!")); break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpafileverifyop.c b/src/gpafileverifyop.c index 67fc412..13022da 100644 --- a/src/gpafileverifyop.c +++ b/src/gpafileverifyop.c @@ -469,7 +469,6 @@ gpa_file_verify_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaFileVerifyOperation *op) { gpa_file_item_t file_item = GPA_FILE_OPERATION (op)->current->data; - gchar *message; switch (gpg_err_code (err)) { @@ -478,22 +477,21 @@ gpa_file_verify_operation_done_error_cb (GpaContext *context, gpg_error_t err, /* Ignore these */ break; case GPG_ERR_NO_DATA: - message = g_strdup_printf (file_item->direct_name - ? _("\"%s\" contained no OpenPGP data.") - : _("The file \"%s\" contained no OpenPGP" - "data."), - file_item->direct_name - ? file_item->direct_name - : file_item->filename_in); - - gpa_window_error (message, GPA_OPERATION (op)->window); - g_free (message); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + file_item->direct_name + ? _("\"%s\" contained no OpenPGP data.") + : _("The file \"%s\" contained no OpenPGP" + "data."), + file_item->direct_name + ? file_item->direct_name + : file_item->filename_in); break; case GPG_ERR_BAD_PASSPHRASE: - gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Wrong passphrase!")); break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpagenkeyadvop.c b/src/gpagenkeyadvop.c index 3ad1d69..cd802bf 100644 --- a/src/gpagenkeyadvop.c +++ b/src/gpagenkeyadvop.c @@ -29,10 +29,10 @@ static GObjectClass *parent_class = NULL; -static void gpa_gen_key_advanced_operation_done_cb (GpaContext *context, +static void gpa_gen_key_advanced_operation_done_cb (GpaContext *context, gpg_error_t err, GpaGenKeyAdvancedOperation *op); -static void gpa_gen_key_advanced_operation_done_error_cb (GpaContext *context, +static void gpa_gen_key_advanced_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaGenKeyAdvancedOperation *op); @@ -95,7 +95,7 @@ static void gpa_gen_key_advanced_operation_class_init (GpaGenKeyAdvancedOperationClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + parent_class = g_type_class_peek_parent (klass); object_class->constructor = gpa_gen_key_advanced_operation_constructor; @@ -106,7 +106,7 @@ GType gpa_gen_key_advanced_operation_get_type (void) { static GType operation_type = 0; - + if (!operation_type) { static const GTypeInfo operation_info = @@ -121,22 +121,22 @@ gpa_gen_key_advanced_operation_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) gpa_gen_key_advanced_operation_init, }; - + operation_type = g_type_register_static (GPA_GEN_KEY_OPERATION_TYPE, "GpaGenKeyAdvancedOperation", &operation_info, 0); } - + return operation_type; } /* API */ -GpaGenKeyAdvancedOperation* +GpaGenKeyAdvancedOperation* gpa_gen_key_advanced_operation_new (GtkWidget *window) { GpaGenKeyAdvancedOperation *op; - + op = g_object_new (GPA_GEN_KEY_ADVANCED_OPERATION_TYPE, "window", window, NULL); @@ -151,7 +151,7 @@ gpa_gen_key_advanced_operation_idle_cb (gpointer data) GpaGenKeyAdvancedOperation *op = data; gpg_error_t err; gpa_keygen_para_t *parms; - + parms = gpa_key_gen_run_dialog (GPA_OPERATION (op)->window, NULL); if (!parms) g_signal_emit_by_name (op, "completed", gpg_error (GPG_ERR_CANCELED)); @@ -171,7 +171,7 @@ gpa_gen_key_advanced_operation_idle_cb (gpointer data) static void -gpa_gen_key_advanced_operation_done_cb (GpaContext *context, +gpa_gen_key_advanced_operation_done_cb (GpaContext *context, gpg_error_t err, GpaGenKeyAdvancedOperation *op) { @@ -185,7 +185,7 @@ gpa_gen_key_advanced_operation_done_cb (GpaContext *context, static void -gpa_gen_key_advanced_operation_done_error_cb (GpaContext *context, +gpa_gen_key_advanced_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaGenKeyAdvancedOperation *op) { @@ -196,7 +196,7 @@ gpa_gen_key_advanced_operation_done_error_cb (GpaContext *context, /* Ignore these */ break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpagenkeycardop.c b/src/gpagenkeycardop.c index 1746776..24914d9 100644 --- a/src/gpagenkeycardop.c +++ b/src/gpagenkeycardop.c @@ -31,11 +31,11 @@ static GObjectClass *parent_class = NULL; -static void gpa_gen_key_card_operation_done_cb (GpaContext *context, +static void gpa_gen_key_card_operation_done_cb (GpaContext *context, gpg_error_t err, GpaGenKeyCardOperation *op); -static void gpa_gen_key_card_operation_done_error_cb (GpaContext *context, +static void gpa_gen_key_card_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaGenKeyCardOperation *op); @@ -102,7 +102,7 @@ static void gpa_gen_key_card_operation_class_init (GpaGenKeyCardOperationClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + parent_class = g_type_class_peek_parent (klass); object_class->constructor = gpa_gen_key_card_operation_constructor; @@ -113,7 +113,7 @@ GType gpa_gen_key_card_operation_get_type (void) { static GType operation_type = 0; - + if (!operation_type) { static const GTypeInfo operation_info = @@ -128,22 +128,22 @@ gpa_gen_key_card_operation_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) gpa_gen_key_card_operation_init, }; - + operation_type = g_type_register_static (GPA_GEN_KEY_OPERATION_TYPE, "GpaGenKeyCardOperation", &operation_info, 0); } - + return operation_type; } /* API */ -GpaGenKeyCardOperation* +GpaGenKeyCardOperation* gpa_gen_key_card_operation_new (GtkWidget *window, const char *keyattr) { GpaGenKeyCardOperation *op; - + op = g_object_new (GPA_GEN_KEY_CARD_OPERATION_TYPE, "window", window, NULL); op->key_attributes = g_strdup (keyattr); @@ -158,8 +158,8 @@ gpa_gen_key_card_operation_idle_cb (gpointer data) { GpaGenKeyCardOperation *op = data; gpg_error_t err; - - op->parms = gpa_key_gen_run_dialog + + op->parms = gpa_key_gen_run_dialog (GPA_OPERATION (op)->window, op->key_attributes? op->key_attributes : ""); if (!op->parms) @@ -181,7 +181,7 @@ gpa_gen_key_card_operation_idle_cb (gpointer data) static void -gpa_gen_key_card_operation_done_cb (GpaContext *context, +gpa_gen_key_card_operation_done_cb (GpaContext *context, gpg_error_t err, GpaGenKeyCardOperation *op) { @@ -197,7 +197,7 @@ gpa_gen_key_card_operation_done_cb (GpaContext *context, static void -gpa_gen_key_card_operation_done_error_cb (GpaContext *context, +gpa_gen_key_card_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaGenKeyCardOperation *op) { @@ -209,11 +209,13 @@ gpa_gen_key_card_operation_done_error_cb (GpaContext *context, break; case GPG_ERR_BAD_PIN: - gpa_window_error (gpg_strerror (err), NULL); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + "%s", gpg_strerror (err)); break; default: - gpa_gpgme_warning_ext (err, op->parms? op->parms->r_error_desc : NULL); + gpa_gpgme_warn (err, op->parms? op->parms->r_error_desc : NULL, + GPA_OPERATION (op)->context); break; } } diff --git a/src/gpagenkeysimpleop.c b/src/gpagenkeysimpleop.c index a298ac7..43b0d44 100644 --- a/src/gpagenkeysimpleop.c +++ b/src/gpagenkeysimpleop.c @@ -221,7 +221,7 @@ gpa_gen_key_simple_operation_done_error_cb (GpaContext *context, /* Ignore these */ break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpaimportop.c b/src/gpaimportop.c index 15b38cd..9117326 100644 --- a/src/gpaimportop.c +++ b/src/gpaimportop.c @@ -248,7 +248,7 @@ gpa_import_operation_done_error_cb (GpaContext *context, gpg_error_t err, /* Ignore these */ break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpaimportserverop.c b/src/gpaimportserverop.c index 7e347a2..a99a961 100644 --- a/src/gpaimportserverop.c +++ b/src/gpaimportserverop.c @@ -124,7 +124,7 @@ search_keys (GpaImportOperation *operation, const char *keyid) { gpg_error_t err; gboolean result = FALSE; - gpgme_ctx_t ctx; + GpaContext *context; gpgme_key_t key; gpgme_key_t *keyarray; int i, nkeys; @@ -136,11 +136,11 @@ search_keys (GpaImportOperation *operation, const char *keyid) keyarray = g_malloc0_n (MAX_KEYSEARCH_RESULTS + 1, sizeof *keyarray); - /* We need to use a separate context because the operaion's context + /* We need to use a separate context because the operation's context has already been setup and the done signal would relate to the actual import operation done later. */ - ctx = gpa_gpgme_new (); - gpgme_set_protocol (ctx, GPGME_PROTOCOL_OpenPGP); + context = gpa_context_new (); + gpgme_set_protocol (context->ctx, GPGME_PROTOCOL_OpenPGP); /* Switch to extern-only or locate list mode. We use --locate-key * iff KEYID is a single mail address. */ listmode = GPGME_KEYLIST_MODE_EXTERN; @@ -154,19 +154,19 @@ search_keys (GpaImportOperation *operation, const char *keyid) keyid = mbox; } #endif /* GPGME >= 1.7.1 */ - err = gpgme_set_keylist_mode (ctx, listmode); + err = gpgme_set_keylist_mode (context->ctx, listmode); if (err) gpa_gpgme_error (err); /* List keys matching the given keyid. Actually all kind of search specifications can be given. */ nkeys = 0; - err = gpgme_op_keylist_start (ctx, keyid, 0); - while (!err && !(err = gpgme_op_keylist_next (ctx, &key))) + err = gpgme_op_keylist_start (context->ctx, keyid, 0); + while (!err && !(err = gpgme_op_keylist_next (context->ctx, &key))) { if (nkeys >= MAX_KEYSEARCH_RESULTS) { - gpa_show_warn (GPA_OPERATION (operation)->window, NULL, + gpa_show_warn (GPA_OPERATION (operation)->window, context, _("More than %d keys match your search pattern.\n" "Use the long keyid or a fingerprint " "for a better match"), nkeys); @@ -176,14 +176,14 @@ search_keys (GpaImportOperation *operation, const char *keyid) } keyarray[nkeys++] = key; } - gpgme_op_keylist_end (ctx); + gpgme_op_keylist_end (context->ctx); if (gpg_err_code (err) == GPG_ERR_EOF) err = 0; if (!err && !nkeys) { - gpa_show_warn (GPA_OPERATION (operation)->window, NULL, - _("No keys were found.")); + gpa_show_warn (GPA_OPERATION (operation)->window, context, + _("No keys were found.")); } else if (!err) { @@ -192,9 +192,9 @@ search_keys (GpaImportOperation *operation, const char *keyid) result = TRUE; } else if (gpg_err_code (err) != GPG_ERR_TRUNCATED) - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, context); - gpgme_release (ctx); + g_object_unref (context); if (keyarray) { for (i=0; keyarray[i]; i++) diff --git a/src/gpakeydeleteop.c b/src/gpakeydeleteop.c index c41c206..de0b2f7 100644 --- a/src/gpakeydeleteop.c +++ b/src/gpakeydeleteop.c @@ -206,7 +206,7 @@ static void gpa_key_delete_operation_done_error_cb (GpaContext *context, /* Ignore these */ break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpakeyexpireop.c b/src/gpakeyexpireop.c index 677b7c1..981f42b 100644 --- a/src/gpakeyexpireop.c +++ b/src/gpakeyexpireop.c @@ -38,10 +38,10 @@ /* Internal functions */ static gboolean gpa_key_expire_operation_idle_cb (gpointer data); -static void gpa_key_expire_operation_done_error_cb (GpaContext *context, +static void gpa_key_expire_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaKeyExpireOperation *op); -static void gpa_key_expire_operation_done_cb (GpaContext *context, +static void gpa_key_expire_operation_done_cb (GpaContext *context, gpg_error_t err, GpaKeyExpireOperation *op); @@ -101,7 +101,7 @@ static void gpa_key_expire_operation_class_init (GpaKeyExpireOperationClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + parent_class = g_type_class_peek_parent (klass); object_class->constructor = gpa_key_expire_operation_constructor; @@ -124,7 +124,7 @@ GType gpa_key_expire_operation_get_type (void) { static GType key_expire_operation_type = 0; - + if (!key_expire_operation_type) { static const GTypeInfo key_expire_operation_info = @@ -139,12 +139,12 @@ gpa_key_expire_operation_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) gpa_key_expire_operation_init, }; - - key_expire_operation_type = g_type_register_static + + key_expire_operation_type = g_type_register_static (GPA_KEY_OPERATION_TYPE, "GpaKeyExpireOperation", &key_expire_operation_info, 0); } - + return key_expire_operation_type; } @@ -156,7 +156,7 @@ GpaKeyExpireOperation* gpa_key_expire_operation_new (GtkWidget *window, GList *keys) { GpaKeyExpireOperation *op; - + op = g_object_new (GPA_KEY_EXPIRE_OPERATION_TYPE, "window", window, "keys", keys, @@ -169,7 +169,7 @@ gpa_key_expire_operation_new (GtkWidget *window, GList *keys) static gpg_error_t gpa_key_expire_operation_start (GpaKeyExpireOperation *op) -{ +{ gpg_error_t err; gpgme_key_t key; GDate *date; @@ -224,8 +224,8 @@ gpa_key_expire_operation_next (GpaKeyExpireOperation *op) } -static void -gpa_key_expire_operation_done_error_cb (GpaContext *context, +static void +gpa_key_expire_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaKeyExpireOperation *op) { @@ -237,28 +237,29 @@ gpa_key_expire_operation_done_error_cb (GpaContext *context, /* Ignore these */ break; case GPG_ERR_BAD_PASSPHRASE: - gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Wrong passphrase!")); break; case GPG_ERR_INV_TIME: - gpa_window_error - (_("Invalid time given.\n" - "(you may not set the expiration time to the past.)"), - GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Invalid time given.\n" + "(you may not set the expiration time to the past.)")); break; default: gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } -static void +static void gpa_key_expire_operation_done_cb (GpaContext *context, gpg_error_t err, GpaKeyExpireOperation *op) { if (! err) /* The expiration was changed. */ - g_signal_emit_by_name (op, "new_expiration", + g_signal_emit_by_name (op, "new_expiration", GPA_KEY_OPERATION (op)->current->data, op->date); /* Clean previous date. */ diff --git a/src/gpakeypasswdop.c b/src/gpakeypasswdop.c index 537f70c..d6bc0b0 100644 --- a/src/gpakeypasswdop.c +++ b/src/gpakeypasswdop.c @@ -37,10 +37,10 @@ /* Internal functions */ static gboolean gpa_key_passwd_operation_idle_cb (gpointer data); -static void gpa_key_passwd_operation_done_error_cb (GpaContext *context, +static void gpa_key_passwd_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaKeyPasswdOperation *op); -static void gpa_key_passwd_operation_done_cb (GpaContext *context, +static void gpa_key_passwd_operation_done_cb (GpaContext *context, gpg_error_t err, GpaKeyPasswdOperation *op); @@ -90,7 +90,7 @@ static void gpa_key_passwd_operation_class_init (GpaKeyPasswdOperationClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + parent_class = g_type_class_peek_parent (klass); object_class->constructor = gpa_key_passwd_operation_constructor; @@ -101,7 +101,7 @@ GType gpa_key_passwd_operation_get_type (void) { static GType key_passwd_operation_type = 0; - + if (!key_passwd_operation_type) { static const GTypeInfo key_passwd_operation_info = @@ -116,12 +116,12 @@ gpa_key_passwd_operation_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) gpa_key_passwd_operation_init, }; - - key_passwd_operation_type = g_type_register_static + + key_passwd_operation_type = g_type_register_static (GPA_KEY_OPERATION_TYPE, "GpaKeyPasswdOperation", &key_passwd_operation_info, 0); } - + return key_passwd_operation_type; } @@ -133,7 +133,7 @@ GpaKeyPasswdOperation* gpa_key_passwd_operation_new (GtkWidget *window, GList *keys) { GpaKeyPasswdOperation *op; - + op = g_object_new (GPA_KEY_PASSWD_OPERATION_TYPE, "window", window, "keys", keys, @@ -146,7 +146,7 @@ gpa_key_passwd_operation_new (GtkWidget *window, GList *keys) static gpg_error_t gpa_key_passwd_operation_start (GpaKeyPasswdOperation *op) -{ +{ gpg_error_t err; gpgme_key_t key; @@ -172,7 +172,7 @@ gpa_key_passwd_operation_idle_cb (gpointer data) err = gpa_key_passwd_operation_start (op); - if (err) + if (err) g_signal_emit_by_name (GPA_OPERATION (op), "completed", err); return FALSE; @@ -195,7 +195,7 @@ gpa_key_passwd_operation_next (GpaKeyPasswdOperation *op) } -static void gpa_key_passwd_operation_done_error_cb (GpaContext *context, +static void gpa_key_passwd_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaKeyPasswdOperation *op) { @@ -206,15 +206,16 @@ static void gpa_key_passwd_operation_done_error_cb (GpaContext *context, /* Ignore these */ break; case GPG_ERR_BAD_PASSPHRASE: - gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Wrong passphrase!")); break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } -static void gpa_key_passwd_operation_done_cb (GpaContext *context, +static void gpa_key_passwd_operation_done_cb (GpaContext *context, gpg_error_t err, GpaKeyPasswdOperation *op) { diff --git a/src/gpakeysignop.c b/src/gpakeysignop.c index ede4be8..ed85565 100644 --- a/src/gpakeysignop.c +++ b/src/gpakeysignop.c @@ -237,24 +237,25 @@ gpa_key_sign_operation_done_error_cb (GpaContext *context, /* Ignore these */ break; case GPG_ERR_BAD_PASSPHRASE: - gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Wrong passphrase!")); break; case GPG_ERR_UNUSABLE_PUBKEY: /* Couldn't sign because the key was expired */ - gpa_window_error (_("This key has expired! " - "Unable to sign."), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("This key has expired! Unable to sign.")); break; case GPG_ERR_CONFLICT: - gpa_window_error (_("This key has already been signed with " - "your own!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("This key has already been signed with your own!")); break; case GPG_ERR_NO_SECKEY: /* Couldn't sign because there is no default key */ - gpa_window_error (_("You haven't selected a default key " - "to sign with!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("You haven't selected a default key to sign with!")); break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpakeytrustop.c b/src/gpakeytrustop.c index b5af37a..7be97d5 100644 --- a/src/gpakeytrustop.c +++ b/src/gpakeytrustop.c @@ -38,10 +38,10 @@ /* Internal functions */ static gboolean gpa_key_trust_operation_idle_cb (gpointer data); -static void gpa_key_trust_operation_done_error_cb (GpaContext *context, +static void gpa_key_trust_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaKeyTrustOperation *op); -static void gpa_key_trust_operation_done_cb (GpaContext *context, +static void gpa_key_trust_operation_done_cb (GpaContext *context, gpg_error_t err, GpaKeyTrustOperation *op); @@ -92,7 +92,7 @@ static void gpa_key_trust_operation_class_init (GpaKeyTrustOperationClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + parent_class = g_type_class_peek_parent (klass); object_class->constructor = gpa_key_trust_operation_constructor; @@ -103,7 +103,7 @@ GType gpa_key_trust_operation_get_type (void) { static GType key_trust_operation_type = 0; - + if (!key_trust_operation_type) { static const GTypeInfo key_trust_operation_info = @@ -118,12 +118,12 @@ gpa_key_trust_operation_get_type (void) 0, /* n_preallocs */ (GInstanceInitFunc) gpa_key_trust_operation_init, }; - - key_trust_operation_type = g_type_register_static + + key_trust_operation_type = g_type_register_static (GPA_KEY_OPERATION_TYPE, "GpaKeyTrustOperation", &key_trust_operation_info, 0); } - + return key_trust_operation_type; } @@ -135,7 +135,7 @@ GpaKeyTrustOperation* gpa_key_trust_operation_new (GtkWidget *window, GList *keys) { GpaKeyTrustOperation *op; - + op = g_object_new (GPA_KEY_TRUST_OPERATION_TYPE, "window", window, "keys", keys, @@ -148,7 +148,7 @@ gpa_key_trust_operation_new (GtkWidget *window, GList *keys) static gpg_error_t gpa_key_trust_operation_start (GpaKeyTrustOperation *op) -{ +{ gpg_error_t err; gpgme_key_t key; gpgme_validity_t trust; @@ -202,7 +202,7 @@ gpa_key_trust_operation_next (GpaKeyTrustOperation *op) } -static void gpa_key_trust_operation_done_error_cb (GpaContext *context, +static void gpa_key_trust_operation_done_error_cb (GpaContext *context, gpg_error_t err, GpaKeyTrustOperation *op) { @@ -214,12 +214,12 @@ static void gpa_key_trust_operation_done_error_cb (GpaContext *context, /* Ignore these */ break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } -static void gpa_key_trust_operation_done_cb (GpaContext *context, +static void gpa_key_trust_operation_done_cb (GpaContext *context, gpg_error_t err, GpaKeyTrustOperation *op) { diff --git a/src/gpastreamencryptop.c b/src/gpastreamencryptop.c index 70a5e24..1db8448 100644 --- a/src/gpastreamencryptop.c +++ b/src/gpastreamencryptop.c @@ -455,7 +455,7 @@ done_error_cb (GpaContext *context, gpg_error_t err, /* gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); */ /* break; */ default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpastreamsignop.c b/src/gpastreamsignop.c index a19b0a3..907967e 100644 --- a/src/gpastreamsignop.c +++ b/src/gpastreamsignop.c @@ -422,10 +422,11 @@ done_error_cb (GpaContext *context, gpg_error_t err, /* Ignore these */ break; case GPG_ERR_BAD_PASSPHRASE: - gpa_window_error (_("Wrong passphrase!"), GPA_OPERATION (op)->window); + gpa_show_warn (GPA_OPERATION (op)->window, GPA_OPERATION (op)->context, + _("Wrong passphrase!")); break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } diff --git a/src/gpastreamverifyop.c b/src/gpastreamverifyop.c index 6aacc5f..4c6ffac 100644 --- a/src/gpastreamverifyop.c +++ b/src/gpastreamverifyop.c @@ -255,7 +255,7 @@ done_error_cb (GpaContext *context, gpg_error_t err, /* Ignore these */ break; default: - gpa_gpgme_warning (err); + gpa_gpgme_warn (err, NULL, GPA_OPERATION (op)->context); break; } } commit 210c7c375df1222e2e10c0ea44e8b62a1ad569fa Author: Werner Koch Date: Tue Oct 16 11:38:12 2018 +0200 Make diagnostic dialog scrollable. * src/gpacontext.c (gpa_context_get_diag): Prepend version info. * src/gtktools.c (create_diagnostics_dialog): New. (show_gtk_message): Use new dialog. Signed-off-by: Werner Koch diff --git a/src/gpacontext.c b/src/gpacontext.c index 72d532f..951e7d1 100644 --- a/src/gpacontext.c +++ b/src/gpacontext.c @@ -248,8 +248,10 @@ gpa_context_get_diag (GpaContext *context) { #if GPGME_VERSION_NUMBER >= 0x010c00 /* >= 1.12 */ gpgme_data_t diag; - char *buffer, *result; + char *info, *buffer, *result; gpg_error_t err; + gpgme_engine_info_t engine; + gpgme_protocol_t proto; if (!context) return NULL; @@ -265,12 +267,24 @@ gpa_context_get_diag (GpaContext *context) return NULL; /* No data. */ } + proto = gpgme_get_protocol (context->ctx); + gpgme_get_engine_info (&engine); + for (; engine; engine = engine->next) + if (engine->protocol == proto) + break; + info = g_strdup_printf ("[GPA %s, GPGME %s, GnuPG %s]\n", + VERSION, + gpgme_check_version (NULL), + engine? engine->version : "?"); + /* Append a trailing zero and return the string. */ gpgme_data_seek (diag, 0, SEEK_END); gpgme_data_write (diag, "", 1); buffer = gpgme_data_release_and_get_mem (diag, NULL); - result = g_strdup (buffer); + result = g_strconcat (info, buffer, NULL); gpgme_free (buffer); + g_free (info); + return result; #else return NULL; diff --git a/src/gtktools.c b/src/gtktools.c index b0f9ba8..2116769 100644 --- a/src/gtktools.c +++ b/src/gtktools.c @@ -50,11 +50,56 @@ gpa_window_message (const gchar *message, GtkWidget * messenger) } +/* Create a dialog with a textview containing STRING. */ +static GtkWidget * +create_diagnostics_dialog (GtkWidget *parent, const char *string) +{ + GtkWidget *widget, *scrollwidget, *textview; + GtkDialog *dialog; + GtkTextBuffer *textbuffer; + + widget = gtk_dialog_new_with_buttons ("Diagnostics", + parent? GTK_WINDOW (parent):NULL, + GTK_DIALOG_MODAL, + GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL, + NULL); + dialog = GTK_DIALOG (widget); + gtk_dialog_set_has_separator (dialog, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); + gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); + gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5); + gtk_window_set_default_size (GTK_WINDOW (dialog), 570, 320); + gtk_dialog_set_default_response (dialog, GTK_RESPONSE_CANCEL); + + scrollwidget = gtk_scrolled_window_new (NULL, NULL); + gtk_container_set_border_width (GTK_CONTAINER (scrollwidget), 5); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwidget), + GTK_SHADOW_IN); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrollwidget), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + gtk_box_pack_start (GTK_BOX (dialog->vbox), scrollwidget, TRUE, TRUE, 0); + + textview = gtk_text_view_new (); + gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (textview), GTK_WRAP_NONE); + gtk_text_view_set_editable (GTK_TEXT_VIEW (textview), FALSE); + gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview), FALSE); + textbuffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview)); + gtk_text_buffer_set_text (textbuffer, string, -1); + + gtk_container_add (GTK_CONTAINER (scrollwidget), textview); + + gtk_widget_show_all (widget); + + return widget; +} + + static void show_gtk_message (GtkWidget *parent, GtkMessageType mtype, GpaContext *ctx, const char *format, va_list arg_ptr) { - GtkWidget *dialog; + GtkWidget *dialog, *dialog2; char *buffer; buffer = g_strdup_vprintf (format, arg_ptr); @@ -79,8 +124,10 @@ show_gtk_message (GtkWidget *parent, GtkMessageType mtype, GpaContext *ctx, gpa_show_info (parent, "No diagnostic data available"); else { - gpa_show_info (parent, "Diagnostics:\n%s", buffer); + dialog2 = create_diagnostics_dialog (parent, buffer); g_free (buffer); + gtk_dialog_run (GTK_DIALOG (dialog2)); + gtk_widget_destroy (dialog2); } } ----------------------------------------------------------------------- Summary of changes: src/gpacontext.c | 18 +++++++++++++++-- src/gpaexportop.c | 2 +- src/gpafileencryptop.c | 5 +++-- src/gpafileimportop.c | 5 +++-- src/gpafilesignop.c | 5 +++-- src/gpafileverifyop.c | 24 +++++++++++------------ src/gpagenkeyadvop.c | 24 +++++++++++------------ src/gpagenkeycardop.c | 30 +++++++++++++++------------- src/gpagenkeysimpleop.c | 2 +- src/gpaimportop.c | 2 +- src/gpaimportserverop.c | 30 ++++++++++++++++------------ src/gpakeydeleteop.c | 2 +- src/gpakeyexpireop.c | 37 ++++++++++++++++++----------------- src/gpakeypasswdop.c | 29 ++++++++++++++------------- src/gpakeysignop.c | 17 ++++++++-------- src/gpakeytrustop.c | 24 +++++++++++------------ src/gparecvkeydlg.c | 1 + src/gpastreamencryptop.c | 2 +- src/gpastreamsignop.c | 5 +++-- src/gpastreamverifyop.c | 2 +- src/gtktools.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++-- 21 files changed, 195 insertions(+), 122 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 13:32:37 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 16 Oct 2018 13:32:37 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.9.10-27-g728f096 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 728f09629698bc86bfbcf89f1228bf6d4b0d441a (commit) from 83227b81ae3f61d68526a87998498ec2f7b95334 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 728f09629698bc86bfbcf89f1228bf6d4b0d441a Author: Werner Koch Date: Tue Oct 16 13:32:32 2018 +0200 po: Update German translation diff --git a/po/de.po b/po/de.po index c2c264c..3ee937f 100644 --- a/po/de.po +++ b/po/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gpa\n" "Report-Msgid-Bugs-To: translations at gnupg.org\n" -"PO-Revision-Date: 2016-11-19 11:40+0100\n" +"PO-Revision-Date: 2018-10-16 13:29+0200\n" "Last-Translator: Werner Koch \n" "Language-Team: German \n" "Language: de\n" @@ -179,6 +179,30 @@ msgstr "kein Verfallsdatum" msgid "unknown" msgstr "unbekannt" +msgid "keyserver" +msgstr "Key-Server" + +msgid "DANE" +msgstr "DANE" + +msgid "Web Key Directory" +msgstr "Web Key Directory" + +msgid "URL" +msgstr "URL" + +msgid "file" +msgstr "Datei" + +msgid "self" +msgstr "self" + +msgid "other" +msgstr "Andere" + +msgid "Unknown" +msgstr "unbekannt" + msgid "Mr." msgstr "Herr" @@ -353,6 +377,12 @@ msgstr "_Sicherheitskopie des Schl?ssels in Datei:" msgid "Generating backup of key: 0x%s" msgstr "Sicherheitskopie von Schl?ssel 0x%s wird erstellt" +msgid "The private key has been copied to the clipboard." +msgstr "Den geheimen Schl?ssel wurde in die Zwischenablage kopiert." + +msgid "The key has bees copied to the clipboard." +msgstr "Der Schl?ssel wurde in die Zwischenablage kopiert." + msgid "The keys have been copied to the clipboard." msgstr "Die Schl?ssel wurden in die Zwischenablage kopiert." @@ -721,9 +751,6 @@ msgstr "" "Der in dieser Datei gesicherte Schl?ssel ist:\n" "\n" -msgid "Unknown" -msgstr "unbekannt" - msgid "Never" msgstr "niemals" @@ -742,6 +769,15 @@ msgstr "unvollst?ndig" msgid "Fully Valid" msgstr "voll g?ltig" +msgid "Invalid" +msgstr "Ung?ltig" + +msgid "Faked" +msgstr "Gef?lscht" + +msgid "Fully" +msgstr "Vollst?ndig" + msgid "Please enter the passphrase for the following key:" msgstr "Bitte geben Sie den Passwortsatz f?r den folgenden Schl?ssel ein:" @@ -924,6 +960,9 @@ msgstr "Die Email Adresse ist nicht g?ltig." msgid "Invalid character in comments." msgstr "Ung?ltige Zeichen im Kommentarfeld." +msgid "_Details" +msgstr "_Details" + msgid "GPA is the GNU Privacy Assistant." msgstr "GPA ist der GNU Privacy Assistant" @@ -1214,12 +1253,27 @@ msgstr "" msgid "_Backup key now" msgstr "_Sicherheitskopie anlegen" +msgid "Only keys of the same procotol may be copied." +msgstr "Nur Schl?ssel eines Protokolls k?nnen zusammen kopiert werden" + msgid "_Keys" msgstr "_Schl?ssel" msgid "_Server" msgstr "_Server" +msgid "Copy _Fingerprint" +msgstr "_Fingerabdruck kopieren" + +msgid "Copy the fingerprints" +msgstr "Die Fingerabdr?cke in die Zwischenablage kopieren" + +msgid "Copy Private Key" +msgstr "Den geheimen Schl?ssel kopieren" + +msgid "Copy a single private key" +msgstr "Den ausgew?hlten geheimen Schl?ssel in die Zwischenablage kopieren" + msgid "Select all certificates" msgstr "Alle Zertifikate ausw?hlen" @@ -1364,9 +1418,15 @@ msgstr "Art:" msgid "Created at:" msgstr "erzeugt am:" +msgid "Last update:" +msgstr "Letztes Update:" + msgid "Details" msgstr "Details" +msgid "User IDs" +msgstr "User-IDs" + msgid "Show signatures on user name:" msgstr "Signaturen f?r Benutzerkennung anzeigen:" @@ -1931,6 +1991,22 @@ msgid "" "\n" "This notice will be shown only once per session." msgstr "" +"Admin PIN notwendig\n" +"\n" +"Abh?ngig von vorher durchgef?hrten Operationen werden Sie nun\n" +"m?glicherweise nach der Admin PIN gefragt. Die Eingabe eines falschen\n" +"Wertes wird den Falscheingabenz?hler der Karte herunter setzen. Sobald\n" +"dieser Z?hler den Wert 0 erreicht hat kann die Admin PIN nicht mehr\n" +"wiederhergestellt werden und die Daten auf der Karten k?nnen nicht\n" +"mehr ge?ndert werden.\n" +"\n" +"Sofern nicht ge?ndert, eine frische Standardkarte hat als Admin\n" +"PIN den Wert 12345678 voreingestellt. Es kann jedoch sein, da?\n" +"der Herausgeber der Karte eine andere Voreinstellung getroffen hat\n" +"oder die Admin PIN nur dem Herausgeber bekannt ist. Bitte lesen Sie\n" +"unbedingt die Hinweise des Herausgebers.\n" +"\n" +"Diese Benachrichtigung wird nur einmalig pro Sitzung angezeigt." msgid "PUK retry counter:" msgstr "PUK Versuche frei:" @@ -2174,10 +2250,9 @@ msgid "" "Please check the documentation of your card to learn for what the NullPIN is " "good.\n" "\n" -"If you proceeed you will be asked to enter a new PIN and later to repeat " -"that PIN. Make sure that you will remember that PIN - it will not be " -"possible to recover the PIN if it has been entered wrongly more than %d " -"times.\n" +"If you proceed you will be asked to enter a new PIN and later to repeat that " +"PIN. Make sure that you will remember that PIN - it will not be possible to " +"recover the PIN if it has been entered wrongly more than %d times.\n" "\n" "%s" msgstr "" @@ -2475,9 +2550,6 @@ msgstr "" #~ msgid "clear buffer" #~ msgstr "Textfeld l?schen" -#~ msgid "open file" -#~ msgstr "Datei ?ffnen" - #~ msgid "save file as" #~ msgstr "Datei _speichern unter" @@ -2933,9 +3005,6 @@ msgstr "" #~ msgid "Error creating directory \"%s\": %s\n" #~ msgstr "Fehler beim Erstellen des Verzeichnisses \"%s\": %s\n" -#~ msgid "Create Directory" -#~ msgstr "Verzeichnis erstellen" - #~ msgid "_Directory name:" #~ msgstr "_Verzeichnisname:" @@ -3098,18 +3167,12 @@ msgstr "" #~ msgid "Remove" #~ msgstr "L?schen" -#~ msgid "Set key server" -#~ msgstr "Key-Server festlegen" - #~ msgid "_Key server: " #~ msgstr "_Key-Server: " #~ msgid "_Set" #~ msgstr "?ber_nehmen" -#~ msgid "Fingerprint" -#~ msgstr "Fingerabdruck:" - #~ msgid "User identity / role" #~ msgstr "Benutzerkennung" @@ -3249,9 +3312,6 @@ msgstr "" #~ msgid "trust ultimately" #~ msgstr "vollst?ndiges Vertrauen" -#~ msgid "invalid" -#~ msgstr "ung?ltig" - #~ msgid "ElGamal (sign and encrypt)" #~ msgstr "ElGamal (signieren und verschl?sseln)" @@ -3320,9 +3380,6 @@ msgstr "" #~ msgid "Key Trust:" #~ msgstr "Schl?sselvertrauen:" -#~ msgid "User ID:" -#~ msgstr "Benutzerkennung:" - #~ msgid "1" #~ msgstr "1" ----------------------------------------------------------------------- Summary of changes: po/de.po | 109 ++++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 83 insertions(+), 26 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 17:06:30 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 16 Oct 2018 17:06:30 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-12-gd63d6d8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via d63d6d8b8030ec1dc19f9f66c8af3b2f3288d309 (commit) from 233d2f3d351c5d3109740e79762ebd723b0d82fa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d63d6d8b8030ec1dc19f9f66c8af3b2f3288d309 Author: Werner Koch Date: Tue Oct 16 17:05:14 2018 +0200 core: Really remove CR from version output. * src/version.c (_gpgme_get_program_version): Fix test. -- Fixes-commit: 6bde056355796f15b6e6954372e87f349847515b Signed-off-by: Werner Koch diff --git a/src/version.c b/src/version.c index 99698fa..bd1d965 100644 --- a/src/version.c +++ b/src/version.c @@ -338,7 +338,7 @@ _gpgme_get_program_version (const char *const file_name) mark = strchr (&line[linelen], '\n'); if (mark) { - if (mark > &line[0] && *mark == '\r') + if (mark > &line[0] && mark[-1] == '\r') mark--; *mark = '\0'; break; ----------------------------------------------------------------------- Summary of changes: src/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 19:33:04 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 16 Oct 2018 19:33:04 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.9.10-28-gdd43dd9 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via dd43dd9014995e9eae149d008d74ca246293c946 (commit) from 728f09629698bc86bfbcf89f1228bf6d4b0d441a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dd43dd9014995e9eae149d008d74ca246293c946 Author: Werner Koch Date: Tue Oct 16 19:31:02 2018 +0200 Make sure valid utf-8 is passed to GtkTextView. * src/gpacontext.c (gpa_context_get_diag): Change and convert if needed. -- On Windows we get the diagnostics in the native character set and thus we would need to convert them before passing to other Gtk functions. Given that this are only diagnostics we do a quick and safe transliterate instead. Signed-off-by: Werner Koch diff --git a/src/gpacontext.c b/src/gpacontext.c index 951e7d1..37add22 100644 --- a/src/gpacontext.c +++ b/src/gpacontext.c @@ -252,6 +252,7 @@ gpa_context_get_diag (GpaContext *context) gpg_error_t err; gpgme_engine_info_t engine; gpgme_protocol_t proto; + int need_gpgme_free; if (!context) return NULL; @@ -281,8 +282,22 @@ gpa_context_get_diag (GpaContext *context) gpgme_data_seek (diag, 0, SEEK_END); gpgme_data_write (diag, "", 1); buffer = gpgme_data_release_and_get_mem (diag, NULL); + need_gpgme_free = 1; + /* In case the diags do not return proper utf-8 we transliterate to + * ascii using the "C" locale which might help in bug tracking. */ + if (!g_utf8_validate (buffer, -1, NULL)) + { + result = g_str_to_ascii (buffer, "C"); + gpgme_free (buffer); + buffer = result; + need_gpgme_free = 0; + } + /* Prefix with the version info. */ result = g_strconcat (info, buffer, NULL); - gpgme_free (buffer); + if (need_gpgme_free) + gpgme_free (buffer); + else + g_free (buffer); g_free (info); return result; ----------------------------------------------------------------------- Summary of changes: src/gpacontext.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 16 23:51:19 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 16 Oct 2018 23:51:19 +0200 Subject: [git] gnupg-doc - branch, master, updated. 9d646eba1474b4226d2fbf0fe10476a774d9de44 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 9d646eba1474b4226d2fbf0fe10476a774d9de44 (commit) from 4f29d915a2ff86c7cfc9d2adf2649e64efb5caca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9d646eba1474b4226d2fbf0fe10476a774d9de44 Author: Werner Koch Date: Tue Oct 16 23:50:52 2018 +0200 swdb: Release gpa 0.10.0 diff --git a/web/swdb.mac b/web/swdb.mac index af0ebf0..aab13a3 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -67,11 +67,11 @@ # # GPA # -#+macro: gpa_ver 0.9.10 -#+macro: gpa_date 2016-11-19 +#+macro: gpa_ver 0.10.0 +#+macro: gpa_date 2018-10-16 #+macro: gpa_size 745k -#+macro: gpa_sha1 c629348725c1bf5dafd57f8a70187dc89815ce60 -#+macro: gpa_sha2 c3b9cc36fd9916e83524930f99df13b1d5f601f4c0168cb9f5d81422e282b727 +#+macro: gpa_sha1 61475989acd12de8b7daacd906200e8b4f519c5a +#+macro: gpa_sha2 95dbabe75fa5c8dc47e3acf2df7a51cee096051e5a842b4c9b6d61e40a6177b1 # ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 17 05:34:45 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 17 Oct 2018 05:34:45 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-25-gd8cf57c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via d8cf57c35d4627fa28588d6ec385fcffbc5a01a0 (commit) from e9566da20cf9428e3094cbd63277ea2179459232 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d8cf57c35d4627fa28588d6ec385fcffbc5a01a0 Author: NIIBE Yutaka Date: Wed Oct 17 12:33:05 2018 +0900 gpg-error-config: Fix PKG_CONFIG_LIBDIR support. * configure.ac (pkg_config_libdir): New. * src/gpg-error-config-new.in: Use pkg_config_libdir. -- PKG_CONFIG_LIBDIR is not mere libdir but should include 'pkgconfig'. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 8389b67..f6078ae 100644 --- a/configure.ac +++ b/configure.ac @@ -651,6 +651,8 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests], build_tests=$enableval, build_tests=yes) AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno]) +pkg_config_libdir=$libdir/pkgconfig +AC_SUBST(pkg_config_libdir) # # Substitution # diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in index a7c1b78..442b95a 100644 --- a/src/gpg-error-config-new.in +++ b/src/gpg-error-config-new.in @@ -12,8 +12,8 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -libdir=${PKG_CONFIG_LIBDIR:- at libdir@} -PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}${libdir}/pkgconfig" +pkg_config_libdir=${PKG_CONFIG_LIBDIR:- at pkg_config_libdir@} +PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$pkg_config_libdir" # #### start of functions for this script ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 ++ src/gpg-error-config-new.in | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 17 10:06:18 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 17 Oct 2018 10:06:18 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-13-gff6ff61 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via ff6ff616aea6f59b7f2ce1176492850ecdf3851e (commit) from d63d6d8b8030ec1dc19f9f66c8af3b2f3288d309 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ff6ff616aea6f59b7f2ce1176492850ecdf3851e Author: Werner Koch Date: Wed Oct 17 10:05:04 2018 +0200 python: Auto-check for all installed python versions. * m4/python.m4 (AM_PATH_PYTHON): Add a 4th arg. * configure.ac (available_languages): Remove separate python2 and python3 and keep just python. Simplify test for pythons. Use an explicit list of python versions to test. -- This seems to be a starightforward chnage to support more than two python versions. I am not sure why we had that complicated thing before. On my box I get builds and run tests for 2.7, 3.4 and 3.5. If 3.6, 3.7 or 3.8 are installed they should also work. GnuPG-bug-id: 3354 Signed-off-by: Werner Koch diff --git a/configure.ac b/configure.ac index e0823f5..728445d 100644 --- a/configure.ac +++ b/configure.ac @@ -180,7 +180,7 @@ have_w64_system=no have_macos_system=no build_w32_glib=no build_w32_qt=no -available_languages="cl cpp python python2 python3 qt" +available_languages="cl cpp python qt" default_languages="cl cpp python qt" case "${host}" in x86_64-*mingw32*) @@ -375,13 +375,9 @@ fi AC_SUBST(HAVE_DOT) # Python bindings. -LIST_MEMBER("python2", $enabled_languages) -found_py2=$found -LIST_MEMBER("python3", $enabled_languages) -found_py3=$found LIST_MEMBER("python", $enabled_languages) found_py=$found -if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then +if test "$found_py" = "1"; then AX_PKG_SWIG if test -z "$SWIG"; then if test "$explicit_languages" = "1"; then @@ -393,36 +389,15 @@ if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then enabled_languages=$(echo $enabled_languages | sed 's/python//') fi else - # Reset all the stuff, just to be sure. + # Reset the version collecting vars. PYTHONS= PYTHON_VERSIONS= - unset PYTHON - unset PYTHON_VERSION - unset PYTHON_CPPFLAGS - unset PYTHON_LDFLAGS - unset PYTHON_SITE_PKG - unset PYTHON_EXTRA_LIBS - unset PYTHON_EXTRA_LDFLAGS - unset ac_cv_path_PYTHON - unset am_cv_pathless_PYTHON - unset am_cv_python_version - unset am_cv_python_platform - unset am_cv_python_pythondir - unset am_cv_python_pyexecdir - - if test "$found_py" = "1" -o "$found_py2" = "1"; then - AM_PATH_PYTHON([2.7], [ - AX_PYTHON_DEVEL - if test "$PYTHON_VERSION"; then - PYTHONS="$(echo $PYTHONS $PYTHON)" - PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" - fi - ], :) - fi if test "$found_py" = "1" -o "$found_py3" = "1"; then - # Reset everything, so that we can look for another Python. - unset PYTHON + # Reset everything, so that we can look for another Python. + m4_foreach([mym4pythonver], + [[2.7],[3.4],[3.5],[3.6],[3.7],[3.8],[all]], + [unset PYTHON unset PYTHON_VERSION unset PYTHON_CPPFLAGS unset PYTHON_LDFLAGS @@ -435,13 +410,14 @@ if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then unset am_cv_python_platform unset am_cv_python_pythondir unset am_cv_python_pyexecdir - AM_PATH_PYTHON([3.4], [ + AM_PATH_PYTHON(mym4pythonver, [ AX_PYTHON_DEVEL if test "$PYTHON_VERSION"; then PYTHONS="$(echo $PYTHONS $PYTHON)" PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)" fi - ], :) + ], :, m4_if([mym4pythonver],[all],[],[python]mym4pythonver)) + ]) fi # Recover some values lost in the second attempt to find Python. diff --git a/m4/python.m4 b/m4/python.m4 index 7097db2..7adcdea 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -2,7 +2,8 @@ ## Python file handling ## From Andrew Dalke ## Updated by James Henstridge -## ------------------------ +## Upated by Werner Koch 2018-10-17 +## --------------------------------- # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -10,7 +11,8 @@ # with or without modifications, as long as this notice is preserved. -# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND] +# [INTERPRETER-LIST]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON @@ -67,7 +69,8 @@ AC_DEFUN([AM_PATH_PYTHON], # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ - for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + for am_cv_pathless_PYTHON dnl + in m4_if([$4],[],[_AM_PYTHON_INTERPRETER_LIST],[$4]) none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 44 ++++++++++---------------------------------- m4/python.m4 | 9 ++++++--- 2 files changed, 16 insertions(+), 37 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 17 13:13:36 2018 From: cvs at cvs.gnupg.org (by Maximilian Krambach) Date: Wed, 17 Oct 2018 13:13:36 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-14-g9b6ed6a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 9b6ed6a80fc78927de32430706c5b25c1bf07178 (commit) from ff6ff616aea6f59b7f2ce1176492850ecdf3851e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9b6ed6a80fc78927de32430706c5b25c1bf07178 Author: Maximilian Krambach Date: Wed Oct 17 13:13:31 2018 +0200 js: increase default startup timeout -- * src/index.js: change the init default if none is given, so that all initialization defaults line up to 1000 miliseconds diff --git a/lang/js/src/index.js b/lang/js/src/index.js index b8e4274..db29afe 100644 --- a/lang/js/src/index.js +++ b/lang/js/src/index.js @@ -38,7 +38,7 @@ import { Connection } from './Connection'; * @returns {Promise} * @async */ -function init ({ timeout = 500 } = {}){ +function init ({ timeout = 1000 } = {}){ return new Promise(function (resolve, reject){ const connection = new Connection; connection.checkConnection(false, timeout).then( ----------------------------------------------------------------------- Summary of changes: lang/js/src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 18 06:31:54 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Thu, 18 Oct 2018 06:31:54 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-18-g9de1c96 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 9de1c96ac3cf6fa126325002b61a1b606037ca88 (commit) from 12b0b5c8941b4ef9ec06002c868ba2bc09216674 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9de1c96ac3cf6fa126325002b61a1b606037ca88 Author: Daniel Kahn Gillmor Date: Wed Oct 17 22:23:59 2018 -0400 python: do not export HAVE_CXX11 definition * lang/python/gpgme.i: ignore HAVE_CXX11 in SWIG interface -- If there are two distinct builds (a) and (b) of gpgme which both build python bindings, and build (a) also happens to build the C++ bindings, then the generated gpg/gpgme.py file from build (a) will not be usable with the .so generated in build (b), despite them being exactly the same, and having nothing to do with C++. In particular, it will fail with: ----------- File "?/gpg/__init__.py", line 99, in from . import core File "?/gpg/core.py", line 10, in from . import gpgme File "?/gpg/gpgme.py", line 152, in HAVE_CXX11 = _gpgme.HAVE_CXX11 AttributeError: module 'gpg._gpgme' has no attribute 'HAVE_CXX11' ----------- By asking SWIG to ignore this definition, we stabilize the generated .py and the .so, ensuring that they are more cleanly interoperable. diff --git a/lang/python/gpgme.i b/lang/python/gpgme.i index f3d14a7..87371af 100644 --- a/lang/python/gpgme.i +++ b/lang/python/gpgme.i @@ -21,6 +21,10 @@ %include "cpointer.i" %include "cstring.i" +/* no need to record whether GPGME's c++ bindings were built + concurrently with the python bindings */ +%ignore HAVE_CXX11; + %{ /* We use public symbols (eg. "_obsolete_class") which are marked as * deprecated but we need to keep them. Silence the warning. */ ----------------------------------------------------------------------- Summary of changes: lang/python/gpgme.i | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 18 07:16:22 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 18 Oct 2018 07:16:22 +0200 Subject: [git] gnupg-doc - branch, master, updated. 727c686e2cbf0ca49d9ece2a72e285f7847958c1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via 727c686e2cbf0ca49d9ece2a72e285f7847958c1 (commit) from 9d646eba1474b4226d2fbf0fe10476a774d9de44 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 727c686e2cbf0ca49d9ece2a72e285f7847958c1 Author: Andre Heinecke Date: Thu Oct 18 07:20:14 2018 +0200 swdb: Gpg4win-3.1.4 release -- diff --git a/web/swdb.mac b/web/swdb.mac index aab13a3..064aab3 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -51,17 +51,17 @@ # # Gpg4win # -#+macro: gpg4win_ver 3.1.3 -#+macro: gpg4win_date 2018-08-31 -#+macro: gpg4win_src_size 5303k -#+macro: gpg4win_src_sha1 cf92c699d2e7fd8417f8a80f0c55849b8404b720 -#+macro: gpg4win_src_sha2 e543369e4ccec0153c2a2008ed571b3a2c1625470ed2b7927e64ff37bce814ab -#+macro: gpg4win_exe_size 27690k -#+macro: gpg4win_exe_sha1 a135547bafc3e445b284d90cfb7c736120789a48 -#+macro: gpg4win_exe_sha2 c3c18150a48ab1e42d41301d66f936682d6b26d55bc04a5ebaafdbb0dfb72034 -#+macro: gpg4win_isrc_size 223028k -#+macro: gpg4win_isrc_sha1 7104c13936605c5ac91cc5d600d0a1512d503109 -#+macro: gpg4win_isrc_sha2 55ffbac982eb5dfef1a2af5ead343adc903d53ee56c4e219a11433b63fd1f686 +#+macro: gpg4win_ver 3.1.4 +#+macro: gpg4win_date 2018-10-18 +#+macro: gpg4win_src_size 5300k +#+macro: gpg4win_src_sha1 89ea985720b7b891b20822b60335f5920c86c478 +#+macro: gpg4win_src_sha2 eb68cfd593f12c50cc92aaaf616a3325a80beb8f60637e67a3296f687ab8b446 +#+macro: gpg4win_exe_size 27800k +#+macro: gpg4win_exe_sha1 64194f372418b879a708ce7cd3ff7ca8606e993c +#+macro: gpg4win_exe_sha2 0cf87835a914cb6fd1bcb32e8beee995b5da35c513f627356685c389df1be6cb +#+macro: gpg4win_isrc_size 223374k +#+macro: gpg4win_isrc_sha1 316dd82b75ef3b6d77bb56567d17e94e07ec9128 +#+macro: gpg4win_isrc_sha2 aae3f8ac81dd7d928778d3075a1b9bb0b20c4b5e29e96014a39503e1f4b5e5a7 # ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 18 11:17:07 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 18 Oct 2018 11:17:07 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.10.0-2-g9ac1811 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 9ac18119fb3c82197169718f1c7d5786119398ce (commit) from b68e47f3853659eb4dfe1722d38b4965f29bd0d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9ac18119fb3c82197169718f1c7d5786119398ce Author: Werner Koch Date: Thu Oct 18 11:17:04 2018 +0200 Allow searchin in the key listing also for mail addresses. * src/keylist.c (search_keylist_function): Hack to search for a mail address. -- Due to a missing case insensitive strstr in glib the implemented search is left-anchored. However, it is useful to search for mail addresses and thus the search function now does a second left-anchored compare after an open left angle. Signed-off-by: Werner Koch diff --git a/src/keylist.c b/src/keylist.c index 2c8e7e8..71e86d2 100644 --- a/src/keylist.c +++ b/src/keylist.c @@ -574,14 +574,19 @@ search_keylist_function (GtkTreeModel *model, gint column, gboolean result = TRUE; gchar *user_id; gint search_len; + const char *s; gtk_tree_model_get (model, iter, GPA_KEYLIST_COLUMN_USERID, &user_id, -1); search_len = strlen (key_to_search_for); + /* Note that we also search for a mail address. */ if (!g_ascii_strncasecmp (user_id, key_to_search_for, search_len)) result=FALSE; + else if ((s = strchr (user_id, '<')) && s[1] + && !g_ascii_strncasecmp (s+1, key_to_search_for, search_len)) + result=FALSE; g_free (user_id); ----------------------------------------------------------------------- Summary of changes: src/keylist.c | 5 +++++ 1 file changed, 5 insertions(+) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 18 11:29:37 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 18 Oct 2018 11:29:37 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.10.0-3-gd7f0e50 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via d7f0e50b7a455dc98df933e18ea6718b9e2649c3 (commit) from 9ac18119fb3c82197169718f1c7d5786119398ce (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d7f0e50b7a455dc98df933e18ea6718b9e2649c3 Author: Werner Koch Date: Thu Oct 18 11:29:05 2018 +0200 Replace use of the GPGME_KEYLIST_MODE_LOCATE alias * src/gpaimportserverop.c (search_keys): Use Extern and local instead. -- This way we can build with older gpgme versions. Reported-by: Andreas Stieger Signed-off-by: Werner Koch diff --git a/src/gpaimportserverop.c b/src/gpaimportserverop.c index 76eb78d..e52a14c 100644 --- a/src/gpaimportserverop.c +++ b/src/gpaimportserverop.c @@ -148,7 +148,8 @@ search_keys (GpaImportOperation *operation, const char *keyid) mbox = gpgme_addrspec_from_uid (keyid); if (mbox) { - listmode = GPGME_KEYLIST_MODE_LOCATE; + /* GPGME_KEYLIST_MODE_LOCATE is an alias for below. */ + listmode = (GPGME_KEYLIST_MODE_LOCAL | GPGME_KEYLIST_MODE_EXTERN); /* We already extracted the mbox - use it directly than letting * gnupg extract it. */ keyid = mbox; ----------------------------------------------------------------------- Summary of changes: src/gpaimportserverop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 18 17:00:00 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 18 Oct 2018 17:00:00 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-19-g174af15 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 174af15725d4989a840ff3098996cc8a0568f724 (commit) from 9de1c96ac3cf6fa126325002b61a1b606037ca88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 174af15725d4989a840ff3098996cc8a0568f724 Author: Werner Koch Date: Thu Oct 18 16:50:18 2018 +0200 core: Return an error if NULL is provided for genkey's parms. * src/debug.c (_gpgme_debug_buffer): Bail out of BUF is NULL. * src/genkey.c (gpgme_op_genkey): Do no deref a NULL in TRACE_LOGBUF. (gpgme_op_genkey_start): Ditto. Return an error if PARMS is NULL. -- This robustness patch should solve one part of GnuPG-bug-id: 4192 Signed-off-by: Werner Koch diff --git a/src/debug.c b/src/debug.c index d7604a7..37baabb 100644 --- a/src/debug.c +++ b/src/debug.c @@ -379,6 +379,9 @@ _gpgme_debug_buffer (int lvl, const char *const fmt, if (!_gpgme_debug_trace ()) return; + if (!buffer) + return; + while (idx < len) { char str[51]; diff --git a/src/genkey.c b/src/genkey.c index ffca7e8..0108aab 100644 --- a/src/genkey.c +++ b/src/genkey.c @@ -283,9 +283,9 @@ gpgme_op_genkey_start (gpgme_ctx_t ctx, const char *parms, TRACE_BEG2 (DEBUG_CTX, "gpgme_op_genkey_start", ctx, "pubkey=%p, seckey=%p", pubkey, seckey); - TRACE_LOGBUF (parms, strlen (parms)); + TRACE_LOGBUF (parms, parms? strlen (parms):0); - if (!ctx) + if (!ctx || parms) return TRACE_ERR (gpg_error (GPG_ERR_INV_ARG)); err = genkey_start (ctx, 0, parms, pubkey, seckey); @@ -304,7 +304,7 @@ gpgme_op_genkey (gpgme_ctx_t ctx, const char *parms, gpgme_data_t pubkey, TRACE_BEG2 (DEBUG_CTX, "gpgme_op_genkey", ctx, "pubkey=%p, seckey=%p", pubkey, seckey); - TRACE_LOGBUF (parms, strlen (parms)); + TRACE_LOGBUF (parms, parms? strlen (parms):0); if (!ctx) return TRACE_ERR (gpg_error (GPG_ERR_INV_ARG)); ----------------------------------------------------------------------- Summary of changes: src/debug.c | 3 +++ src/genkey.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 18 17:41:03 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 18 Oct 2018 17:41:03 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-20-gfbac11b Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via fbac11b19d97730494dc9dad3b7f71453ef15581 (commit) from 174af15725d4989a840ff3098996cc8a0568f724 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fbac11b19d97730494dc9dad3b7f71453ef15581 Author: Werner Koch Date: Thu Oct 18 17:36:30 2018 +0200 core: Fix segv in genkey when no endtag is provided. * src/genkey.c (get_key_parameter): Provide a fallback ENDTAG. -- It would actually be more correct to return an error in this case but it is possible tha there are users who did not provide an endtag and out of luck they also didn't trigger a segv. GnuPG-bug-id: 4192 Signed-off-by: Werner Koch diff --git a/src/genkey.c b/src/genkey.c index 0108aab..e00d047 100644 --- a/src/genkey.c +++ b/src/genkey.c @@ -223,9 +223,13 @@ get_key_parameter (const char *parms, gpgme_data_t *key_parameter) return gpg_error (GPG_ERR_INV_VALUE); endtag = strstr (content, ""); + if (!endtag) + endtag = content + strlen (content); + /* FIXME: Check that there are no control statements inside. */ - while (content[0] == '\n' - || (content[0] == '\r' && content[1] == '\n')) + while (content < endtag + && (content[0] == '\n' + || (content[0] == '\r' && content[1] == '\n'))) content++; return gpgme_data_new_from_mem (key_parameter, content, ----------------------------------------------------------------------- Summary of changes: src/genkey.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 19 15:08:46 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Fri, 19 Oct 2018 15:08:46 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-26-ge99480a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via e99480affa595702595e59333aca96ab28389d34 (commit) from d8cf57c35d4627fa28588d6ec385fcffbc5a01a0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e99480affa595702595e59333aca96ab28389d34 Author: Daniel Kahn Gillmor Date: Thu Oct 18 19:21:45 2018 -0400 build-aux: use https instead of http Signed-off-by: Daniel Kahn Gillmor diff --git a/build-aux/config.guess b/build-aux/config.guess index c4bd827..b8d5ea7 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2016-05-15' +timestamp='2018-10-18' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2016-05-15' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +27,7 @@ timestamp='2016-05-15' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -1415,9 +1415,9 @@ This script (version $timestamp), has failed to recognize the operating system you are using. If your script is old, overwrite config.guess and config.sub with the latest versions from: - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess + https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub If $0 has already been updated, send the following data and any information you think might be pertinent to config-patches at gnu.org to diff --git a/build-aux/config.sub b/build-aux/config.sub index 9feb73b..d494f62 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2016 Free Software Foundation, Inc. -timestamp='2016-06-20' +timestamp='2018-10-18' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2016-06-20' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,7 +33,7 @@ timestamp='2016-06-20' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases ----------------------------------------------------------------------- Summary of changes: build-aux/config.guess | 10 +++++----- build-aux/config.sub | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Sat Oct 20 02:09:48 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Sat, 20 Oct 2018 02:09:48 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-21-g651a1af Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 651a1afe80bcc421da26f38015e8a322e140f130 (commit) from fbac11b19d97730494dc9dad3b7f71453ef15581 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 651a1afe80bcc421da26f38015e8a322e140f130 Author: Ben McGinnes Date: Sat Oct 20 11:07:55 2018 +1100 python bindings: callback test * lang/python/tests/t-callbacks.py: Updated test logic to try generating a key which expires in 2099 and if that fails then fallback to an expiration in 2037 in an attempt to catch the 32-bit systems. diff --git a/lang/python/tests/t-callbacks.py b/lang/python/tests/t-callbacks.py index 5bcac23..3a210dd 100755 --- a/lang/python/tests/t-callbacks.py +++ b/lang/python/tests/t-callbacks.py @@ -20,12 +20,14 @@ from __future__ import absolute_import, print_function, unicode_literals import os +import platform import gpg import support _ = support # to appease pyflakes. del absolute_import, print_function, unicode_literals +oops = None c = gpg.Context() c.set_pinentry_mode(gpg.constants.PINENTRY_MODE_LOOPBACK) @@ -99,6 +101,17 @@ Expire-Date: 2099-12-31 """ +prams = """ +Key-Type: RSA +Key-Length: 1024 +Name-Real: Joe Tester +Name-Comment: with stupid passphrase +Name-Email: joe+gpg at example.org +Passphrase: Crypt0R0cks +Expire-Date: 2037-12-31 + +""" + messages = [] @@ -111,7 +124,10 @@ def progress_cb(what, typ, current, total, hook=None): c = gpg.Context() c.set_progress_cb(progress_cb, messages) -c.op_genkey(parms, None, None) +try: + c.op_genkey(parms, None, None) +except Exception as oops: + c.op_genkey(prams, None, None) assert len(messages) > 0 @@ -123,7 +139,10 @@ def progress_cb(what, typ, current, total, hook=None): c = gpg.Context() c.set_progress_cb(progress_cb, None) try: - c.op_genkey(parms, None, None) + try: + c.op_genkey(parms, None, None) + except Exception as oops: + c.op_genkey(prams, None, None) except Exception as e: assert e == myException else: @@ -139,6 +158,15 @@ alpha = c.get_key("A0FF4590BB6122EDEF6E3C542D727CC768697734", False) cookie = object() edit_cb_called = False +def oops_check(): + if oops is not None and platform.architecture()[0] != "64bit": + y2k38_msg = "System appears to be 32-bit and vulnerable to EOL in 2038." + elif oops is not None and platform.architecture()[0] == "64bit": + y2k38_msg = "System appears to be 64-bit, but may use 32-bit time." + else: + y2k38_msg = "System is 64-bit and/or not susceptible to 2038 EOL." + return y2k38_msg + def edit_cb(status, args, hook): global edit_cb_called ----------------------------------------------------------------------- Summary of changes: lang/python/tests/t-callbacks.py | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Sun Oct 21 20:45:52 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Sun, 21 Oct 2018 20:45:52 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-22-g59e38e3 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 59e38e3d2c14b40045e15c45b6c2f300e8f097dc (commit) from 651a1afe80bcc421da26f38015e8a322e140f130 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 59e38e3d2c14b40045e15c45b6c2f300e8f097dc Author: Ben McGinnes Date: Mon Oct 22 05:43:36 2018 +1100 Python: docs tweaks * Fixed a minor error in how the reST version of the HOWTO is generated. * Updated the help() in __init__.py with a little more detail as to why not to use the lower level functions. diff --git a/lang/python/doc/src/gpgme-python-howto.org b/lang/python/doc/src/gpgme-python-howto.org index 83b91e8..07026b8 100644 --- a/lang/python/doc/src/gpgme-python-howto.org +++ b/lang/python/doc/src/gpgme-python-howto.org @@ -2980,7 +2980,7 @@ using the latest version of Pandoc from the Org mode source file using the following command: #+BEGIN_SRC shell - pandoc -f org -t rst+smart -o gpgme-python-howto.rst gpgme-python-howto.org + pandoc -f org -t rst -o gpgme-python-howto.rst gpgme-python-howto.org #+END_SRC In addition to these there is a significantly less frequently updated diff --git a/lang/python/src/__init__.py b/lang/python/src/__init__.py index 30e638c..a276cc7 100644 --- a/lang/python/src/__init__.py +++ b/lang/python/src/__init__.py @@ -55,10 +55,10 @@ GENERAL OVERVIEW For those of you familiar with GPGME, you will be right at home here. The python gpg module is, for the most part, a direct interface to the C GPGME -library. However, it is re-packaged in a more Pythonic way -- -object-oriented with classes and modules. Take a look at the classes -defined here -- they correspond directly to certain object types in GPGME -for C. For instance, the following C code: +library. However, it is re-packaged in a more Pythonic way -- object-oriented +with classes and modules. Take a look at the classes defined here -- they +correspond directly to certain object types in GPGME for C. For instance, the +following C code: gpgme_ctx_t context; gpgme_new(&context); @@ -71,26 +71,50 @@ context = core.Context() ... context.op_encrypt(recp, 1, plain, cipher) -The Python module automatically does error-checking and raises Python -exception gpg.errors.GPGMEError when GPGME signals an error. getcode() -and getsource() of this exception return code and source of the error. +The Python module automatically does error-checking and raises Python exception +gpg.errors.GPGMEError when GPGME signals an error. getcode() and getsource() of +this exception return code and source of the error. IMPORTANT NOTE -------------- + This documentation only covers a small subset of available GPGME functions and -methods. Please consult the documentation for the C library -for comprehensive coverage. +methods. Please consult the documentation for the C library for comprehensive +coverage. + +This library uses Python's reflection to automatically detect the methods that +are available for each class, and as such, most of those methods do not appear +explicitly anywhere. You can use dir() python built-in command on an object to +see what methods and fields it has but their meaning can often only be found in +the GPGME documentation. + +HIGHER LEVEL PYTHONIC LAYER +--------------------------- + +A more pythonic or intuitive layer is being added above the automatically +generated lower level bindings. This is the recommended way to access the +module as if it is ever necessary to modify the underlying GPGME API, the +higher level methods will remain the same. -This library uses Python's reflection to automatically detect the methods -that are available for each class, and as such, most of those methods -do not appear explicitly anywhere. You can use dir() python built-in command -on an object to see what methods and fields it has but their meaning can -be found only in GPGME documentation. +The quick example above is an example of this higher layer in action, whereas +the second example demonstrating the mapping to GPGME itself is the lower +layer. The second example in the higher layer would be more like the encrypt +line in the quick example. FOR MORE INFORMATION -------------------- + GnuPG homepage: https://www.gnupg.org/ GPGME documentation: https://www.gnupg.org/documentation/manuals/gpgme/ +GPGME Python HOWTO: http://files.au.adversary.org/crypto/gpgme-python-howto-split/index.html + +To view this documentation, run help(gpg) in Python or one of the following +commands outside of Python: + + pydoc gpg + pydoc3 gpg + python -m pydoc gpg + python3 -m pydoc gpg """ ----------------------------------------------------------------------- Summary of changes: lang/python/doc/src/gpgme-python-howto.org | 2 +- lang/python/src/__init__.py | 52 ++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 15 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 22 03:23:08 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 22 Oct 2018 03:23:08 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-28-g91bcb2c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 91bcb2c7d824de50c7dfedd4490e515ddb5dfc5a (commit) from 6d2e0546d50a0d4511fb7167566bfd0058a68f38 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 91bcb2c7d824de50c7dfedd4490e515ddb5dfc5a Author: NIIBE Yutaka Date: Mon Oct 22 10:17:48 2018 +0900 gpg-error-config: Support "auto", architecture independent script. * configure.ac (pkg_config_libdir): Set it "auto" when it looks multiarch environment. * src/gpg-error-config-new.in: Automatically detects the triplet. -- The triplet detection mechanism is not sufficient. It's up to distributions to apply more changes (in distribution specific way). Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index f6078ae..52966b9 100644 --- a/configure.ac +++ b/configure.ac @@ -651,7 +651,13 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests], build_tests=$enableval, build_tests=yes) AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno]) -pkg_config_libdir=$libdir/pkgconfig +if expr $libdir : "/$host\$" >/dev/null; then + # Looks like it's multiarch, then, + # let the script detect host architecture at runtime + pkg_config_libdir=auto +else + pkg_config_libdir=$libdir/pkgconfig +fi AC_SUBST(pkg_config_libdir) # # Substitution diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in index 442b95a..0ccf55a 100644 --- a/src/gpg-error-config-new.in +++ b/src/gpg-error-config-new.in @@ -13,6 +13,19 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ pkg_config_libdir=${PKG_CONFIG_LIBDIR:- at pkg_config_libdir@} +if [ "$pkg_config_libdir" = auto ]; then + # "auto" supports multiarch environment + triplet="" + case "$CC" in + *-*-*) triplet=${CC%-*} ;; + *) ;; + esac + if [ -z "$triplet" ]; then + triplet=$(gcc -dumpmachine) + fi + pkg_config_libdir=@exec_prefix@/lib/$triplet/pkgconfig + unset triplet +fi PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$pkg_config_libdir" # ----------------------------------------------------------------------- Summary of changes: configure.ac | 8 +++++++- src/gpg-error-config-new.in | 13 +++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 22 03:34:47 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 22 Oct 2018 03:34:47 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-29-g12b834b Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 12b834ba59ae2f3cd0568e4cfa1dca47fc41269a (commit) from 91bcb2c7d824de50c7dfedd4490e515ddb5dfc5a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 12b834ba59ae2f3cd0568e4cfa1dca47fc41269a Author: NIIBE Yutaka Date: Mon Oct 22 10:28:39 2018 +0900 yat2m: Avoid compiler warnings. * doc/yat2m.c (isodatestring): Prepare enough buffer. Signed-off-by: NIIBE Yutaka diff --git a/doc/yat2m.c b/doc/yat2m.c index a509d1b..3c7b363 100644 --- a/doc/yat2m.c +++ b/doc/yat2m.c @@ -357,7 +357,7 @@ ascii_strupr (char *string) const char * isodatestring (void) { - static char buffer[11+5]; + static char buffer[36]; struct tm *tp; time_t atime; ----------------------------------------------------------------------- Summary of changes: doc/yat2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 22 11:59:34 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 22 Oct 2018 11:59:34 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-3-g1f378c0 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 1f378c00bda53cec3057ef27684b671293cc21ac (commit) via 50e65b8425e2dece5dc791269bc564168bf819e1 (commit) from 236541264560b59311613c70e7dc01bde537c70a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1f378c00bda53cec3057ef27684b671293cc21ac Author: Andre Heinecke Date: Mon Oct 22 11:56:28 2018 +0200 Fix HKLM fallback for config values * src/common.cpp (load_extension_value): Use read_w32_registry_string. (load_config_value, expand_path): Removed. -- We don't need two ways to access the registry. And the load_config_value codepath did not fallback to HKLM. GnuPG-Bug-Id: T4204 diff --git a/src/common.cpp b/src/common.cpp index f3ec09f..72fa16f 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -770,78 +770,6 @@ gpgol_bug (HWND parent, int code) return; } -static char* -expand_path (const char *path) -{ - DWORD len; - char *p; - - len = ExpandEnvironmentStrings (path, NULL, 0); - if (!len) - { - return NULL; - } - len += 1; - p = (char *) xcalloc (1, len+1); - if (!p) - { - return NULL; - } - len = ExpandEnvironmentStrings (path, p, len); - if (!len) - { - xfree (p); - return NULL; - } - return p; -} - -static int -load_config_value (HKEY hk, const char *path, const char *key, char **val) -{ - HKEY h; - DWORD size=0, type; - int ec; - - *val = NULL; - if (hk == NULL) - { - hk = HKEY_CURRENT_USER; - } - ec = RegOpenKeyEx (hk, path, 0, KEY_READ, &h); - if (ec != ERROR_SUCCESS) - { - return -1; - } - - ec = RegQueryValueEx(h, key, NULL, &type, NULL, &size); - if (ec != ERROR_SUCCESS) - { - RegCloseKey (h); - return -1; - } - if (type == REG_EXPAND_SZ) - { - char tmp[256]; - RegQueryValueEx (h, key, NULL, NULL, (BYTE*)tmp, &size); - *val = expand_path (tmp); - } - else - { - *val = (char *) xcalloc(1, size+1); - ec = RegQueryValueEx (h, key, NULL, &type, (BYTE*)*val, &size); - if (ec != ERROR_SUCCESS) - { - xfree (*val); - *val = NULL; - RegCloseKey (h); - return -1; - } - } - RegCloseKey (h); - return 0; -} - static int store_config_value (HKEY hk, const char *path, const char *key, const char *val) { @@ -885,14 +813,16 @@ store_extension_value (const char *key, const char *val) int load_extension_value (const char *key, char **val) { - int ret = load_config_value (HKEY_CURRENT_USER, GPGOL_REGPATH, key, val); - if (val) + if (!val) { - log_debug ("%s:%s: LoadReg '%s' val '%s'", - SRCNAME, __func__, key ? key : "null", - *val ? *val : "null"); + STRANGEPOINT; + return -1; } - return ret; + *val = read_w32_registry_string (nullptr, GPGOL_REGPATH, key); + log_debug ("%s:%s: LoadReg '%s' val '%s'", + SRCNAME, __func__, key ? key : "null", + *val ? *val : "null"); + return 0; } int commit 50e65b8425e2dece5dc791269bc564168bf819e1 Author: Andre Heinecke Date: Tue Oct 16 14:14:29 2018 +0200 Pass lang correctly to config dialog * src/addin-options.cpp (open_gpgolconfig): Pass lang. diff --git a/src/addin-options.cpp b/src/addin-options.cpp index d82b095..137d880 100644 --- a/src/addin-options.cpp +++ b/src/addin-options.cpp @@ -185,6 +185,9 @@ open_gpgolconfig (LPVOID arg) args.push_back (std::string("--gpgol-version")); args.push_back (std::string(VERSION)); + args.push_back (std::string ("--lang")); + args.push_back (std::string (gettext_localename ())); + auto ctx = GpgME::Context::createForEngine (GpgME::SpawnEngine); if (!ctx) { ----------------------------------------------------------------------- Summary of changes: src/addin-options.cpp | 3 ++ src/common.cpp | 86 +++++---------------------------------------------- 2 files changed, 11 insertions(+), 78 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 22 12:16:59 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 22 Oct 2018 12:16:59 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-4-g2aa65cb Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 2aa65cb3d86d0e8eee79db1ec72447707cd4a2f2 (commit) from 1f378c00bda53cec3057ef27684b671293cc21ac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2aa65cb3d86d0e8eee79db1ec72447707cd4a2f2 Author: Andre Heinecke Date: Mon Oct 22 12:13:48 2018 +0200 Fix check for debug levels for string debug * src/w32-gettext.h (wchar_to_utf8, utf8_to_wchar): Fix enable_debug check. -- The broken logic caused the string debugging to be active if one of the debug levels required was enabled. This caused data leak even if debug data was disabled. GnuPG-Bug-Id: T4193 diff --git a/src/w32-gettext.h b/src/w32-gettext.h index e8547d3..4dfe40c 100644 --- a/src/w32-gettext.h +++ b/src/w32-gettext.h @@ -73,7 +73,9 @@ char *native_to_utf8 (const char *string); #define utf8_to_wchar(VAR1) ({wchar_t *retval; \ retval = _utf8_to_wchar (VAR1); \ - if ((opt.enable_debug & (DBG_TRACE | DBG_DATA | DBG_MEMORY))) \ + if ((opt.enable_debug & DBG_TRACE) && \ + (opt.enable_debug & DBG_DATA) && \ + (opt.enable_debug & DBG_MEMORY)) \ { \ log_debug ("%s:%s:%i wchar_t alloc %p:%S", \ SRCNAME, __func__, __LINE__, retval, retval); \ @@ -82,7 +84,9 @@ retval;}) #define wchar_to_utf8(VAR1) ({char *retval; \ retval = _wchar_to_utf8 (VAR1); \ - if ((opt.enable_debug & (DBG_TRACE | DBG_DATA | DBG_MEMORY))) \ + if ((opt.enable_debug & DBG_TRACE) && \ + (opt.enable_debug & DBG_DATA) && \ + (opt.enable_debug & DBG_MEMORY)) \ { \ log_debug ("%s:%s:%i char utf8 alloc %p:%s", \ SRCNAME, __func__, __LINE__, retval, retval); \ ----------------------------------------------------------------------- Summary of changes: src/w32-gettext.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 22 14:23:48 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 22 Oct 2018 14:23:48 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-228-g0a7f446 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 0a7f446c189201ca6e527af08b44da756b343209 (commit) via f03928b16c4fb00077d22d8ec141575ef6d26913 (commit) from 78f542e1f4495195db2e668f9cd41657fb1afc77 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0a7f446c189201ca6e527af08b44da756b343209 Author: Werner Koch Date: Mon Oct 22 14:23:11 2018 +0200 dirmngr: In verbose mode print the OCSP responder id. * dirmngr/ocsp.c (ocsp_isvalid): Print the responder id. Signed-off-by: Werner Koch diff --git a/dirmngr/ocsp.c b/dirmngr/ocsp.c index ca28960..966eda3 100644 --- a/dirmngr/ocsp.c +++ b/dirmngr/ocsp.c @@ -653,6 +653,33 @@ ocsp_isvalid (ctrl_t ctrl, ksba_cert_t cert, const char *cert_fpr, if (err) goto leave; + /* It is sometimes useful to know the responder ID. */ + if (opt.verbose) + { + char *resp_name; + ksba_sexp_t resp_keyid; + + err = ksba_ocsp_get_responder_id (ocsp, &resp_name, &resp_keyid); + if (err) + log_info (_("error getting responder ID: %s\n"), gpg_strerror (err)); + else + { + log_info ("responder id: "); + if (resp_name) + log_printf ("'/%s' ", resp_name); + if (resp_keyid) + { + log_printf ("{"); + dump_serial (resp_keyid); + log_printf ("} "); + } + log_printf ("\n"); + } + ksba_free (resp_name); + ksba_free (resp_keyid); + err = 0; + } + /* We got a useful answer, check that the answer has a valid signature. */ sigval = ksba_ocsp_get_sig_val (ocsp, produced_at); if (!sigval || !*produced_at) commit f03928b16c4fb00077d22d8ec141575ef6d26913 Author: Werner Koch Date: Mon Oct 15 11:32:19 2018 +0200 tools: Replace duplicated code in mime-maker. * tools/rfc822parse.c (HEADER_NAME_CHARS): New. Taken from mime-maker.c. (rfc822_valid_header_name_p): New. Based on code from mime-maker.c. (rfc822_capitalize_header_name): New. Copied from mime-maker.c. (capitalize_header_name): Remove. Replace calls by new func. (my_toupper, my_strcasecmp): New. * tools/mime-maker.c: Include rfc822parse.h. (HEADER_NAME_CHARS, capitalize_header_name): Remove. (add_header): Replace check and capitalization by new functions. -- This is a straightforward change with two minor chnages: - In rfc822parse.c the capitalization handles MIME-Version special. - The check in mime-maker bow detects a zero-length name as invalid. my_toupper and my_strcasecmp are introduced to allow standalone use of that file. Signed-off-by: Werner Koch diff --git a/tools/mime-maker.c b/tools/mime-maker.c index 0edc14d..91eab82 100644 --- a/tools/mime-maker.c +++ b/tools/mime-maker.c @@ -25,14 +25,10 @@ #include "../common/util.h" #include "../common/zb32.h" +#include "rfc822parse.h" #include "mime-maker.h" -/* All valid characters in a header name. */ -#define HEADER_NAME_CHARS ("abcdefghijklmnopqrstuvwxyz" \ - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ - "-01234567890") - /* An object to store an header. Also used for a list of headers. */ struct header_s { @@ -269,38 +265,6 @@ ensure_part (mime_maker_t ctx, part_t *r_parent) } -/* Transform a header name into a standard capitalized format. - * "Content-Type". Conversion stops at the colon. */ -static void -capitalize_header_name (char *name) -{ - unsigned char *p = name; - int first = 1; - - /* Special cases first. */ - if (!ascii_strcasecmp (name, "MIME-Version")) - { - strcpy (name, "MIME-Version"); - return; - } - - /* Regular cases. */ - for (; *p && *p != ':'; p++) - { - if (*p == '-') - first = 1; - else if (first) - { - if (*p >= 'a' && *p <= 'z') - *p = *p - 'a' + 'A'; - first = 0; - } - else if (*p >= 'A' && *p <= 'Z') - *p = *p - 'A' + 'a'; - } -} - - /* Check whether a header with NAME has already been set into PART. * NAME must be in canonical capitalized format. Return true or * false. */ @@ -344,17 +308,14 @@ add_header (part_t part, const char *name, const char *value) memcpy (hdr->name, name, namelen); hdr->name[namelen] = 0; - /* Check that the header name is valid. We allow all lower and - * uppercase letters and, except for the first character, digits and - * the dash. */ - if (strspn (hdr->name, HEADER_NAME_CHARS) != namelen - || strchr ("-0123456789", *hdr->name)) + /* Check that the header name is valid. */ + if (!rfc822_valid_header_name_p (hdr->name)) { xfree (hdr); return gpg_error (GPG_ERR_INV_NAME); } - capitalize_header_name (hdr->name); + rfc822_capitalize_header_name (hdr->name); hdr->value = xtrystrdup (value); if (!hdr->value) { diff --git a/tools/rfc822parse.c b/tools/rfc822parse.c index e8cdb02..0a4e2bc 100644 --- a/tools/rfc822parse.c +++ b/tools/rfc822parse.c @@ -41,6 +41,12 @@ #include "rfc822parse.h" +/* All valid characters in a header name. */ +#define HEADER_NAME_CHARS ("abcdefghijklmnopqrstuvwxyz" \ + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ + "-01234567890") + + enum token_type { tSPACE, @@ -131,28 +137,31 @@ lowercase_string (unsigned char *string) *string = *string - 'A' + 'a'; } -/* Transform a header name into a standard capitalized format; i.e - "Content-Type". Conversion stops at the colon. As usual we don't - use the localized versions of ctype.h. - */ -static void -capitalize_header_name (unsigned char *name) + +static int +my_toupper (int c) { - int first = 1; + if (c >= 'a' && c <= 'z') + c &= ~0x20; + return c; +} + +/* This is the same as ascii_strcasecmp. */ +static int +my_strcasecmp (const char *a, const char *b) +{ + if (a == b) + return 0; - for (; *name && *name != ':'; name++) - if (*name == '-') - first = 1; - else if (first) - { - if (*name >= 'a' && *name <= 'z') - *name = *name - 'a' + 'A'; - first = 0; - } - else if (*name >= 'A' && *name <= 'Z') - *name = *name - 'A' + 'a'; + for (; *a && *b; a++, b++) + { + if (*a != *b && my_toupper(*a) != my_toupper(*b)) + break; + } + return *a == *b? 0 : (my_toupper (*a) - my_toupper (*b)); } + #ifndef HAVE_STPCPY static char * my_stpcpy (char *a,const char *b) @@ -228,6 +237,62 @@ release_handle_data (rfc822parse_t msg) } +/* Check that the header name is valid. We allow all lower and + * uppercase letters and, except for the first character, digits and + * the dash. The check stops at the first colon or at string end. + * Returns true if the name is valid. */ +int +rfc822_valid_header_name_p (const char *name) +{ + const char *s; + size_t namelen; + + if ((s=strchr (name, ':'))) + namelen = s - name; + else + namelen = strlen (name); + + if (!namelen + || strspn (name, HEADER_NAME_CHARS) != namelen + || strchr ("-0123456789", *name)) + return 0; + return 1; +} + + +/* Transform a header NAME into a standard capitalized format. + * Conversion stops at the colon. */ +void +rfc822_capitalize_header_name (char *name) +{ + unsigned char *p = name; + int first = 1; + + /* Special cases first. */ + if (!my_strcasecmp (name, "MIME-Version")) + { + strcpy (name, "MIME-Version"); + return; + } + + /* Regular cases. */ + for (; *p && *p != ':'; p++) + { + if (*p == '-') + first = 1; + else if (first) + { + if (*p >= 'a' && *p <= 'z') + *p = *p - 'a' + 'A'; + first = 0; + } + else if (*p >= 'A' && *p <= 'Z') + *p = *p - 'A' + 'a'; + } +} + + + /* Create a new parsing context for an entire rfc822 message and return it. CB and CB_VALUE may be given to callback for certain events. NULL is returned on error with errno set appropriately. */ @@ -432,7 +497,7 @@ insert_header (rfc822parse_t msg, const unsigned char *line, size_t length) /* Transform a field name into canonical format. */ if (!hdr->cont && strchr (line, ':')) - capitalize_header_name (hdr->line); + rfc822_capitalize_header_name (hdr->line); *msg->current_part->hdr_lines_tail = hdr; msg->current_part->hdr_lines_tail = &hdr->next; diff --git a/tools/rfc822parse.h b/tools/rfc822parse.h index 177d827..e2f2bed 100644 --- a/tools/rfc822parse.h +++ b/tools/rfc822parse.h @@ -48,6 +48,8 @@ typedef int (*rfc822parse_cb_t) (void *opaque, rfc822parse_event_t event, rfc822parse_t msg); +int rfc822_valid_header_name_p (const char *name); +void rfc822_capitalize_header_name (char *name); rfc822parse_t rfc822parse_open (rfc822parse_cb_t cb, void *opaque_value); ----------------------------------------------------------------------- Summary of changes: dirmngr/ocsp.c | 27 ++++++++++++++ tools/mime-maker.c | 47 ++---------------------- tools/rfc822parse.c | 103 ++++++++++++++++++++++++++++++++++++++++++---------- tools/rfc822parse.h | 2 + 4 files changed, 117 insertions(+), 62 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 22 17:27:55 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 22 Oct 2018 17:27:55 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-229-g68b8096 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 68b8096b6617cdad09c99d7eda2035176807e78f (commit) from 0a7f446c189201ca6e527af08b44da756b343209 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 68b8096b6617cdad09c99d7eda2035176807e78f Author: Werner Koch Date: Mon Oct 22 17:24:58 2018 +0200 agent: Fix build regression for Windows. * agent/command-ssh.c (get_client_info): Turn client_uid into an int. Fix setting of it in case of a failed getsocketopt. * agent/command.c (start_command_handler): Fix setting of the pid and uid for Windows. -- Fixes-commit: 28aa6890588cc108639951bb4bef03ac17743046 which obviously was only added to master. Signed-off-by: Werner Koch diff --git a/agent/command-ssh.c b/agent/command-ssh.c index df63ed7..ff1f0a5 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -3625,7 +3625,7 @@ static void get_client_info (int fd, struct peer_info_s *out) { pid_t client_pid = (pid_t)(-1); - uid_t client_uid = (uid_t)-1; + int client_uid = -1; #ifdef SO_PEERCRED { @@ -3640,10 +3640,10 @@ get_client_info (int fd, struct peer_info_s *out) { #if defined (HAVE_STRUCT_SOCKPEERCRED_PID) || defined (HAVE_STRUCT_UCRED_PID) client_pid = cr.pid; - client_uid = cr.uid; + client_uid = (int)cr.uid; #elif defined (HAVE_STRUCT_UCRED_CR_PID) client_pid = cr.cr_pid; - client_pid = cr.cr_uid; + client_uid = (int)cr.cr_uid; #else #error "Unknown SO_PEERCRED struct" #endif @@ -3660,7 +3660,7 @@ get_client_info (int fd, struct peer_info_s *out) len = sizeof (struct xucred); if (!getsockopt (fd, SOL_LOCAL, LOCAL_PEERCRED, &cr, &len)) - client_uid = cr.cr_uid; + client_uid = (int)cr.cr_uid; } #endif } @@ -3670,8 +3670,10 @@ get_client_info (int fd, struct peer_info_s *out) socklen_t unpl = sizeof unp; if (getsockopt (fd, 0, LOCAL_PEEREID, &unp, &unpl) != -1) - client_pid = unp.unp_pid; - client_uid = unp.unp_euid; + { + client_pid = unp.unp_pid; + client_uid = (int)unp.unp_euid; + } } #elif defined (HAVE_GETPEERUCRED) { @@ -3680,7 +3682,7 @@ get_client_info (int fd, struct peer_info_s *out) if (getpeerucred (fd, &ucred) != -1) { client_pid = ucred_getpid (ucred); - client_uid = ucred_geteuid (ucred); + client_uid = (int)ucred_geteuid (ucred); ucred_free (ucred); } } @@ -3689,7 +3691,7 @@ get_client_info (int fd, struct peer_info_s *out) #endif out->pid = (client_pid == (pid_t)(-1)? 0 : (unsigned long)client_pid); - out->uid = (int)client_uid; + out->uid = client_uid; } diff --git a/agent/command.c b/agent/command.c index 925d1f7..0871753 100644 --- a/agent/command.c +++ b/agent/command.c @@ -3588,8 +3588,13 @@ start_command_handler (ctrl_t ctrl, gnupg_fd_t listen_fd, gnupg_fd_t fd) } else { +#ifdef HAVE_W32_SYSTEM + pid = assuan_get_pid (ctx); + ctrl->client_uid = -1; +#else pid = client_creds->pid; ctrl->client_uid = client_creds->uid; +#endif } ctrl->client_pid = (pid == ASSUAN_INVALID_PID)? 0 : (unsigned long)pid; ctrl->server_local->connect_from_self = (pid == getpid ()); ----------------------------------------------------------------------- Summary of changes: agent/command-ssh.c | 18 ++++++++++-------- agent/command.c | 5 +++++ 2 files changed, 15 insertions(+), 8 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 22 19:29:32 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 22 Oct 2018 19:29:32 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-9-gb0d6e26 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via b0d6e26bf3c8decaa568c9e4a5b2451d9af0b25b (commit) from 7e2b0488d13561be2b754e28801de654747a8dcc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b0d6e26bf3c8decaa568c9e4a5b2451d9af0b25b Author: Werner Koch Date: Mon Oct 8 16:14:17 2018 +0200 gpg: Fix extra check for sign usage of a data signature. * g10/sig-check.c (check_signature_end_simple): -- Obviously we should not ignore a back signature here. Fixes-commit: 214b0077264e35c079e854a8b6374704aea45cd5 GnuPG-bug-id: 4014 Signed-off-by: Werner Koch (cherry picked from commit b6275f3bda8edff34274c5b921508567f491ab9c) diff --git a/g10/sig-check.c b/g10/sig-check.c index e59e0c9..a93b496 100644 --- a/g10/sig-check.c +++ b/g10/sig-check.c @@ -481,7 +481,8 @@ check_signature_end_simple (PKT_public_key *pk, PKT_signature *sig, } /* For data signatures check that the key has sign usage. */ - if (IS_SIG (sig) && !(pk->pubkey_usage & PUBKEY_USAGE_SIG)) + if (!IS_BACK_SIG (sig) && IS_SIG (sig) + && !(pk->pubkey_usage & PUBKEY_USAGE_SIG)) { rc = gpg_error (GPG_ERR_WRONG_KEY_USAGE); if (!opt.quiet) ----------------------------------------------------------------------- Summary of changes: g10/sig-check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 22 20:14:17 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 22 Oct 2018 20:14:17 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-10-ga2bd4a6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via a2bd4a64e5b057f291a60a9499f881dd47745e2f (commit) from b0d6e26bf3c8decaa568c9e4a5b2451d9af0b25b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a2bd4a64e5b057f291a60a9499f881dd47745e2f Author: Werner Koch Date: Mon Oct 22 20:13:08 2018 +0200 dirmngr: Prepare for updated WKD specs with ?l= param * dirmngr/server.c (proc_wkd_get): Tack the raw local address to the request. -- We append the raw non-canonicalized local address part to the hash. Servers who serve the requests from static files will ignore the parameters and a test with posteo shows that also services using a database ignore the parameter. The general idea is that service providers may use their own canonicalization rules. The problem is that we currently filter the returned key for the full mail address and thus we will never see a key if the service did a different canonicalization than we. So consider this to be an experiment. Signed-off-by: Werner Koch (cherry picked from commit 256a280c51f9ea862e4bfb0bb530c2a96f9088f9) diff --git a/dirmngr/server.c b/dirmngr/server.c index fcf0c1a..d414c0e 100644 --- a/dirmngr/server.c +++ b/dirmngr/server.c @@ -957,19 +957,28 @@ proc_wkd_get (ctrl_t ctrl, assuan_context_t ctx, char *line) } else { - uri = strconcat ("https://", - domain, - portstr, - "/.well-known/openpgpkey/hu/", - encodedhash, - NULL); - no_log = 1; - if (uri) + char *escapedmbox; + + escapedmbox = http_escape_string (mbox, "%;?&="); + if (escapedmbox) { - err = dirmngr_status_printf (ctrl, "SOURCE", "https://%s%s", - domain, portstr); - if (err) - goto leave; + uri = strconcat ("https://", + domain, + portstr, + "/.well-known/openpgpkey/hu/", + encodedhash, + "?l=", + escapedmbox, + NULL); + xfree (escapedmbox); + no_log = 1; + if (uri) + { + err = dirmngr_status_printf (ctrl, "SOURCE", "https://%s%s", + domain, portstr); + if (err) + goto leave; + } } } if (!uri) ----------------------------------------------------------------------- Summary of changes: dirmngr/server.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 05:47:51 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 23 Oct 2018 05:47:51 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-30-g40e22c7 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 40e22c774afebca23fdaa6dec2b8698572501c32 (commit) from 12b834ba59ae2f3cd0568e4cfa1dca47fc41269a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 40e22c774afebca23fdaa6dec2b8698572501c32 Author: NIIBE Yutaka Date: Tue Oct 23 11:50:45 2018 +0900 gpg-error-config: Fix cross build support. * configure.ac: Fix regexp matching multiarch environment. * src/gpg-error-config-new.in: Support standard cross build. Handle the case where $multiarch != $triplet. -- For standard cross build, use @exec_prefix@/$triplet/lib/pkgconfig. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 52966b9..25719d4 100644 --- a/configure.ac +++ b/configure.ac @@ -651,7 +651,7 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests], build_tests=$enableval, build_tests=yes) AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno]) -if expr $libdir : "/$host\$" >/dev/null; then +if expr $libdir : ".*/$host_alias\$" >/dev/null; then # Looks like it's multiarch, then, # let the script detect host architecture at runtime pkg_config_libdir=auto diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in index 0ccf55a..b8b7328 100644 --- a/src/gpg-error-config-new.in +++ b/src/gpg-error-config-new.in @@ -12,21 +12,48 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ -pkg_config_libdir=${PKG_CONFIG_LIBDIR:- at pkg_config_libdir@} -if [ "$pkg_config_libdir" = auto ]; then - # "auto" supports multiarch environment +pkg_config_libdir=@pkg_config_libdir@ +if [ x"${PKG_CONFIG_LIBDIR+set}" = x ]; then + # If PKG_CONFIG_LIBDIR is not specified, detect the directory. + + # We supports standard cross build with $CC triplet="" case "$CC" in *-*-*) triplet=${CC%-*} ;; *) ;; esac - if [ -z "$triplet" ]; then - triplet=$(gcc -dumpmachine) + if [ "$pkg_config_libdir" = auto ]; then + # It's multiarch environment. + # It may be standard cross build, native multiarch build, or + # multiarch-cross build + multiarch="" + if [ -n "$triplet" ]; then + triplet1=$triplet + else + triplet1=$(gcc -dumpmachine) + fi + # Follow existing practice for multiarch name + if expr $triplet1 : "^i[4567]86-" >/dev/null; then + multiarch="i386-${triplet1#*-}" + else + multiarch=$triplet1 + fi + if [ -n "$triplet" ]; then + PKG_CONFIG_LIBDIR="@exec_prefix@/$triplet/lib/pkgconfig:@exec_prefix@/lib/$multiarch/pkgconfig" + else + PKG_CONFIG_LIBDIR="@exec_prefix@/lib/$multiarch/pkgconfig" + fi + unset multiarch triplet1 + elif [ -n "$triplet" ]; then + # It's cross build + PKG_CONFIG_LIBDIR="@exec_prefix@/$triplet/lib/pkgconfig" + else + # Native build in standard (non-multiarch) environment + PKG_CONFIG_LIBDIR="$pkg_config_libdir" fi - pkg_config_libdir=@exec_prefix@/lib/$triplet/pkgconfig unset triplet fi -PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$pkg_config_libdir" +PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$PKG_CONFIG_LIBDIR" # #### start of functions for this script ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- src/gpg-error-config-new.in | 41 ++++++++++++++++++++++++++++++++++------- 2 files changed, 35 insertions(+), 8 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 07:01:13 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 23 Oct 2018 07:01:13 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-31-gf575b2f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via f575b2fd3f733d78fb61b04805ea63ce65d89e19 (commit) from 40e22c774afebca23fdaa6dec2b8698572501c32 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f575b2fd3f733d78fb61b04805ea63ce65d89e19 Author: NIIBE Yutaka Date: Tue Oct 23 13:54:10 2018 +0900 build: Supply CC to invoke gpg-error-config. * src/gpg-error.m4: Add CC when invoking gpg-error-config. * src/gpgrt.m4: Likewise. -- For standard cross build, the use of --with-libgpg-error-prefix will not be needed, as the script automatically finds the place. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 index 0564219..9f26fa4 100644 --- a/src/gpg-error.m4 +++ b/src/gpg-error.m4 @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,15 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ diff --git a/src/gpgrt.m4 b/src/gpgrt.m4 index 8c2b6f9..179f7ae 100644 --- a/src/gpgrt.m4 +++ b/src/gpgrt.m4 @@ -73,7 +73,7 @@ AC_DEFUN([AM_PATH_GPGRT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpgrt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpgrt_config_version=`$GPGRT_CONFIG $gpgrt_config_args --version` + gpgrt_config_version=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --version` major=`echo $gpgrt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpgrt_config_version | \ @@ -89,13 +89,15 @@ AC_DEFUN([AM_PATH_GPGRT], fi fi if test $ok = yes; then - GPGRT_CFLAGS=`$GPGRT_CONFIG $gpgrt_config_args --cflags` - GPGRT_LIBS=`$GPGRT_CONFIG $gpgrt_config_args --libs` - GPGRT_MT_CFLAGS=`$GPGRT_CONFIG $gpgrt_config_args --mt --cflags 2>/dev/null` - GPGRT_MT_LIBS=`$GPGRT_CONFIG $gpgrt_config_args --mt --libs 2>/dev/null` + GPGRT_CFLAGS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --cflags` + GPGRT_LIBS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --libs` + GPGRT_MT_CFLAGS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --mtcflags 2>/dev/null` + GPGRT_MT_CFLAGS="$GPGRT_CFLAGS${GPGRT_CFLAGS:+ }$GPGRT_MT_CFLAGS" + GPGRT_MT_LIBS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --mtlibs 2>/dev/null` + GPGRT_MT_LIBS="$GPGRT_LIBS${GPGRT_LIBS:+ }$GPGRT_MT_LIBS" AC_MSG_RESULT([yes ($gpgrt_config_version)]) ifelse([$2], , :, [$2]) - gpgrt_config_host=`$GPGRT_CONFIG $gpgrt_config_args --host 2>/dev/null || echo none` + gpgrt_config_host=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --variable=host 2>/dev/null || echo none` if test x"$gpgrt_config_host" != xnone ; then if test x"$gpgrt_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: src/gpg-error.m4 | 12 ++++++------ src/gpgrt.m4 | 14 ++++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 08:38:48 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 23 Oct 2018 08:38:48 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-32-g00e9555 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 00e955558c66f80acad9225d2eae82459d87dc54 (commit) from f575b2fd3f733d78fb61b04805ea63ce65d89e19 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 00e955558c66f80acad9225d2eae82459d87dc54 Author: NIIBE Yutaka Date: Tue Oct 23 15:36:15 2018 +0900 build: Fix detecting build on multiarch environment. * configure.ac: Rough match by shell pattern. -- Since libdir is i386-linux-gnu on Debian i686-linux-gnu machine, exact match to host_alias didn't work. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 25719d4..b735fa6 100644 --- a/configure.ac +++ b/configure.ac @@ -651,13 +651,16 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests], build_tests=$enableval, build_tests=yes) AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno]) -if expr $libdir : ".*/$host_alias\$" >/dev/null; then - # Looks like it's multiarch, then, - # let the script detect host architecture at runtime - pkg_config_libdir=auto -else - pkg_config_libdir=$libdir/pkgconfig -fi +case "$libdir" in + */*-*-*) + # Looks like it's multiarch, then, + # let the script detect host architecture at runtime + pkg_config_libdir=auto + ;; + *) + pkg_config_libdir=$libdir/pkgconfig + ;; +esac AC_SUBST(pkg_config_libdir) # # Substitution ----------------------------------------------------------------------- Summary of changes: configure.ac | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 12:01:43 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 23 Oct 2018 12:01:43 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-33-g25ea850 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 25ea85066cf100e3381f7f7b2d8858a7dfcea480 (commit) from 00e955558c66f80acad9225d2eae82459d87dc54 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 25ea85066cf100e3381f7f7b2d8858a7dfcea480 Author: NIIBE Yutaka Date: Tue Oct 23 18:59:29 2018 +0900 build: Fix permission. * build-aux/config.guess: Chmod +x. * build-aux/config.sub: Chmod +x. -- Downloading the file directly, file permission was changed. Fixes-commit: 6d2e0546d50a0d4511fb7167566bfd0058a68f38 Signed-off-by: NIIBE Yutaka diff --git a/build-aux/config.guess b/build-aux/config.guess old mode 100644 new mode 100755 diff --git a/build-aux/config.sub b/build-aux/config.sub old mode 100644 new mode 100755 ----------------------------------------------------------------------- Summary of changes: build-aux/config.guess | 0 build-aux/config.sub | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build-aux/config.guess mode change 100644 => 100755 build-aux/config.sub hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 14:40:05 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Tue, 23 Oct 2018 14:40:05 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-23-g04791c8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 04791c896712857feaf9a472a48d7a4c4f287775 (commit) from 59e38e3d2c14b40045e15c45b6c2f300e8f097dc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 04791c896712857feaf9a472a48d7a4c4f287775 Author: Ben McGinnes Date: Tue Oct 23 23:38:56 2018 +1100 docs: python howto * Fixed a few spelling and grammatical errors. diff --git a/lang/python/doc/src/gpgme-python-howto.org b/lang/python/doc/src/gpgme-python-howto.org index 07026b8..3c389d1 100644 --- a/lang/python/doc/src/gpgme-python-howto.org +++ b/lang/python/doc/src/gpgme-python-howto.org @@ -625,10 +625,10 @@ to or which are found by GPGME's configuration stage immediately prior to running the make commands. Which is exactly what the compiling and installing process of GPGME does by default. -Once that is done, however, it appears that a copy the compiled module -may be installed into a virtualenv of the same major and minor version -matching the build. Alternatively it is possible to utilise a -=sites.pth= file in the =site-packages/= directory of a viertualenv +Once that is done, however, it appears that a copy of the compiled +module may be installed into a virtualenv of the same major and minor +version matching the build. Alternatively it is possible to utilise a +=sites.pth= file in the =site-packages/= directory of a virtualenv installation, which links back to the system installations corresponding directory in order to import anything installed system wide. This may or may not be appropriate on a case by case basis. @@ -2876,7 +2876,7 @@ is the key IDs of the group as a string. The =group_lists= result is very similar in that it is a list of lists. The first part, =group_lists[i][0]= matches =group_lines[i][0]= as the name of the group, but =group_lists[i][1]= -is the key IDs of the group as a string. +is the key IDs of the group as a list. A demonstration of using the =groups.py= module is also available in the form of the executable =mutt-groups.py= script. This second ----------------------------------------------------------------------- Summary of changes: lang/python/doc/src/gpgme-python-howto.org | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 16:00:08 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 23 Oct 2018 16:00:08 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-11-g6b36c16 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via 6b36c16f77722d17f4f317c788701cbc1e9552b2 (commit) from a2bd4a64e5b057f291a60a9499f881dd47745e2f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6b36c16f77722d17f4f317c788701cbc1e9552b2 Author: Andre Heinecke Date: Tue Oct 23 12:46:38 2018 +0200 sm: Fix dirmngr loadcrl for intermediate certs * sm/call-dirmngr.c (run_command_inq_cb): Support ISTRUSTED. (inq_certificate): Distinguish unsupported inquiry error. -- When loading a CRL through "gpgsm --call-dirmngr loadcrl foo" dirmngr can ask gpgsm back if a certificate used ISTRUSTED, which previously resulted in an error. diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c index 3a38bca..fb05413 100644 --- a/sm/call-dirmngr.c +++ b/sm/call-dirmngr.c @@ -390,7 +390,7 @@ inq_certificate (void *opaque, const char *line) } else { - log_error ("unsupported inquiry '%s'\n", line); + log_error ("unsupported certificate inquiry '%s'\n", line); return gpg_error (GPG_ERR_ASS_UNKNOWN_INQUIRE); } @@ -950,9 +950,33 @@ run_command_inq_cb (void *opaque, const char *line) line = s; log_info ("dirmngr: %s\n", line); } + else if ((s = has_leading_keyword (line, "ISTRUSTED"))) + { + /* The server is asking us whether the certificate is a trusted + root certificate. */ + char fpr[41]; + struct rootca_flags_s rootca_flags; + int n; + + line = s; + + for (s=line,n=0; hexdigitp (s); s++, n++) + ; + if (*s || n != 40) + return gpg_error (GPG_ERR_ASS_PARAMETER); + for (s=line, n=0; n < 40; s++, n++) + fpr[n] = (*s >= 'a')? (*s & 0xdf): *s; + fpr[n] = 0; + + if (!gpgsm_agent_istrusted (parm->ctrl, NULL, fpr, &rootca_flags)) + rc = assuan_send_data (parm->ctx, "1", 1); + else + rc = 0; + return rc; + } else { - log_error ("unsupported inquiry '%s'\n", line); + log_error ("unsupported command inquiry '%s'\n", line); rc = gpg_error (GPG_ERR_ASS_UNKNOWN_INQUIRE); } ----------------------------------------------------------------------- Summary of changes: sm/call-dirmngr.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 21:54:25 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 23 Oct 2018 21:54:25 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.10.0-4-g493b02e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 493b02e523772c46abf3fa4c288ebe25234e4e68 (commit) from d7f0e50b7a455dc98df933e18ea6718b9e2649c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 493b02e523772c46abf3fa4c288ebe25234e4e68 Author: Werner Koch Date: Tue Oct 23 21:52:19 2018 +0200 po: Added missing files and sorted POTFILES -- The new files are: src/cm-unknown.c src/cm-geldkarte.c src/certchain.c src/gpagenkeycardop.c src/gpafileimportop.c src/format-dn.c src/keyimpseldlg.c src/gpa-uid-list.c GnuPG-bug-id: 4214 Signed-off-by: Werner Koch diff --git a/po/POTFILES.in b/po/POTFILES.in index 8c8cc7a..32ac0f9 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,25 +1,39 @@ +src/cardman.c +src/certchain.c src/clipboard.c src/clipboard.h +src/cm-dinsig.c +src/cm-geldkarte.c +src/cm-netkey.c +src/cm-object.c +src/cm-openpgp.c +src/cm-unknown.c src/confdialog.c src/convert.c src/encryptdlg.c src/expirydlg.c src/fileman.c src/filesigndlg.c +src/format-dn.c +src/gpa-key-details.c +src/gpa-uid-list.c src/gpa.c src/gpa.h src/gpabackupop.c src/gpacontext.c +src/gpadatebutton.c src/gpaexportclipop.c src/gpaexportfileop.c src/gpaexportop.c src/gpaexportserverop.c src/gpafiledecryptop.c src/gpafileencryptop.c +src/gpafileimportop.c src/gpafileop.c src/gpafilesignop.c src/gpafileverifyop.c src/gpagenkeyadvop.c +src/gpagenkeycardop.c src/gpagenkeyop.c src/gpagenkeysimpleop.c src/gpaimportclipop.c @@ -43,7 +57,6 @@ src/gpastreamverifyop.c src/gpasubkeylist.c src/gpawidgets.c src/gpawindowkeeper.c -src/gpadatebutton.c src/gpgmeedit.c src/gpgmetools.c src/gtktools.c @@ -55,9 +68,9 @@ src/keydeletedlg.c src/keyeditdlg.c src/keygendlg.c src/keygenwizard.c +src/keyimpseldlg.c src/keylist.c src/keymanager.c -src/gpa-key-details.c src/keyserver.c src/keysigndlg.c src/keytable.c @@ -72,9 +85,3 @@ src/settingsdlg.c src/siglist.c src/verifydlg.c src/w32reg.c -src/cardman.c -src/cm-object.c -src/cm-openpgp.c -src/cm-netkey.c -src/cm-dinsig.c - ----------------------------------------------------------------------- Summary of changes: po/POTFILES.in | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 22:37:59 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 23 Oct 2018 22:37:59 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-16-gd56bddc Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via d56bddc68db86878e1b3497362407c994c2841ca (commit) via a0bbba1c49286f09c5f2eb3cd788938fac2ed252 (commit) from af99234b21c98ad1a4eaf2b72fb52de67beba9d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d56bddc68db86878e1b3497362407c994c2841ca Author: Werner Koch Date: Tue Oct 23 22:23:08 2018 +0200 Use only one .PHONY target in a Makefile. * Makefile.am (.PHONY): Move to the end. -- Fixes-commit: 3e029a4ed0059116febe05924a14009ca622e3c5 Signed-off-by: Werner Koch diff --git a/Makefile.am b/Makefile.am index f188cda..e8e16bc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -63,7 +63,6 @@ distcheck-hook: gen_start_date = 2011-12-01T00:00:00 -.PHONY: gen-ChangeLog gen-ChangeLog: if test -d $(top_srcdir)/.git; then \ (cd $(top_srcdir) && \ @@ -80,17 +79,17 @@ gen-ChangeLog: stowinstall: $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libksba + + # Coverage targets if HAVE_GCOV -.PHONY: clean-coverage clean-coverage: @echo Removing old coverage results -find -name '*.gcda' -print | xargs -r rm -find -name '*.gcno' -print | xargs -r rm -rm -rf coverage.info coveragereport -.PHONY: coverage-html clean-coverage coverage-html: check @echo Collecting coverage data with lcov $(top_srcdir)/autogen.sh --coverage $(LCOV) $(GCOV) $(abs_builddir) \ @@ -101,3 +100,5 @@ coverage-html: check clean-local: clean-coverage endif # HAVE_GCOV + +.PHONY: gen-ChangeLog clean-coverage coverage-html commit a0bbba1c49286f09c5f2eb3cd788938fac2ed252 Author: Werner Koch Date: Tue Oct 23 22:14:01 2018 +0200 Fix test for existence of the signing_time * src/cms.c (build_signed_data_attributes): Fix test. -- The test predates the introduction of the ksba_isotime_t which orginally was a standard time_t. Obviously I missed to adjust this test back in 2003. GnuPG-bug-id: 4213 Signed-off-by: Werner Koch diff --git a/src/cms.c b/src/cms.c index 8d80464..c0fac0f 100644 --- a/src/cms.c +++ b/src/cms.c @@ -2510,7 +2510,7 @@ build_signed_data_attributes (ksba_cms_t cms) attridx++; /* Include the signing time */ - if (certlist->signing_time) + if (*certlist->signing_time) { attr = _ksba_asn_expand_tree (cms_tree->parse_tree, "CryptographicMessageSyntax.Attribute"); diff --git a/src/reader.c b/src/reader.c index 1ae8810..475054e 100644 --- a/src/reader.c +++ b/src/reader.c @@ -102,12 +102,12 @@ ksba_reader_set_release_notify (ksba_reader_t r, /* Clear the error and eof indicators for READER, so that it can be - continued to use. Also dicards any unread bytes. This is usually - required if the upper layer want to send to send an EOF to indicate + continued to use. Also discards any unread bytes. This is usually + required if the upper layer wants to send an EOF to indicate the logical end of one part of a file. If BUFFER and BUFLEN are not NULL, possible unread data is copied to a newly allocated buffer and this buffer is assigned to BUFFER, BUFLEN will be set to - the length of the unread bytes. */ + the length of the unread bytes. */ gpg_error_t ksba_reader_clear (ksba_reader_t r, unsigned char **buffer, size_t *buflen) { ----------------------------------------------------------------------- Summary of changes: Makefile.am | 7 ++++--- src/cms.c | 2 +- src/reader.c | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 22:44:17 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 23 Oct 2018 22:44:17 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-17-ga1ce3c1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via a1ce3c17ee0d44ba8c7c9553824ba55b7950e930 (commit) from d56bddc68db86878e1b3497362407c994c2841ca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a1ce3c17ee0d44ba8c7c9553824ba55b7950e930 Author: Werner Koch Date: Tue Oct 23 22:44:01 2018 +0200 Fix error detection in the CMS parser which may led to a NULL-deref. * src/cms.c (build_signed_data_rest): Fix c+p bug. -- GnuPG-bug-id: 4207 Signed-off-by: Werner Koch diff --git a/src/cms.c b/src/cms.c index c0fac0f..1cca810 100644 --- a/src/cms.c +++ b/src/cms.c @@ -2777,7 +2777,7 @@ build_signed_data_rest (ksba_cms_t cms) assert (si->root); assert (si->image); n2 = _ksba_asn_find_node (si->root, "SignerInfo.signedAttrs"); - if (!n2 || !n->down) + if (!n2 || !n2->down) { err = gpg_error (GPG_ERR_ELEMENT_NOT_FOUND); goto leave; ----------------------------------------------------------------------- Summary of changes: src/cms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 23 22:59:45 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 23 Oct 2018 22:59:45 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-90-ge2da4e8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via e2da4e8dee4b371804f3b2659b53431fb6380d93 (commit) via 9f2c7ec4d8b07e82663ad084c90c016d3c3b80c2 (commit) via 282f238f7788267768e823c0976aff15aeaff103 (commit) from 0f2c6ce2c9504c6df435463243edaa669e57b109 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e2da4e8dee4b371804f3b2659b53431fb6380d93 Author: Werner Koch Date: Tue Oct 23 22:58:09 2018 +0200 ecc: Fix potential unintended freeing of an internal param. * cipher/ecc-curves.c (_gcry_ecc_get_mpi): Fix c+p error -- GnuPG-bug-id: 4208 Signed-off-by: Werner Koch diff --git a/cipher/ecc-curves.c b/cipher/ecc-curves.c index 86d0b4e..75d7161 100644 --- a/cipher/ecc-curves.c +++ b/cipher/ecc-curves.c @@ -1206,7 +1206,7 @@ _gcry_ecc_get_mpi (const char *name, mpi_ec_t ec, int copy) if (!strcmp (name, "q.x") && ec->Q && ec->Q->x) return mpi_is_const (ec->Q->x) && !copy? ec->Q->x : mpi_copy (ec->Q->x); if (!strcmp (name, "q.y") && ec->Q && ec->Q->y) - return mpi_is_const (ec->G->y) && !copy? ec->Q->y : mpi_copy (ec->Q->y); + return mpi_is_const (ec->Q->y) && !copy? ec->Q->y : mpi_copy (ec->Q->y); /* If the base point has been requested, return it in standard encoding. */ commit 9f2c7ec4d8b07e82663ad084c90c016d3c3b80c2 Author: Werner Koch Date: Tue Oct 23 22:51:40 2018 +0200 sexp: Fix uninitialized use of a var in the error case. * src/sexp.c (_gcry_sexp_vextract_param): Initialize L1. -- GnuPG-bug-id: 4212 Signed-off-by: Werner Koch diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index d2dfe80..36bbf20 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -1318,7 +1318,7 @@ gpg_error_t gcry_md_extract (gcry_md_hd_t hd, int algo, void *buffer, size_t length); /* Convenience function to calculate the hash from the data in BUFFER - of size LENGTH using the algorithm ALGO avoiding the creating of a + of size LENGTH using the algorithm ALGO avoiding the creation of a hash object. The hash is returned in the caller provided buffer DIGEST which must be large enough to hold the digest of the given algorithm. */ diff --git a/src/sexp.c b/src/sexp.c index 9d89268..f2a164c 100644 --- a/src/sexp.c +++ b/src/sexp.c @@ -2232,7 +2232,7 @@ _gcry_sexp_vextract_param (gcry_sexp_t sexp, const char *path, gcry_mpi_t *array[20]; char arrayisdesc[20]; int idx; - gcry_sexp_t l1; + gcry_sexp_t l1 = NULL; int mode = '+'; /* Default to GCRYMPI_FMT_USG. */ gcry_sexp_t freethis = NULL; commit 282f238f7788267768e823c0976aff15aeaff103 Author: Werner Koch Date: Thu Jun 14 10:39:53 2018 +0200 doc: Fix example for gcry_sexp_extract_param -- diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index 4cae489..4f4f973 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -4472,14 +4472,15 @@ an @code{gcry_mpi_t} variable is expected that must be set to is expected. For example @example - _gcry_sexp_extract_param (key, NULL, "n/x+e d-'foo'", - &mpi_n, &mpi_x, &mpi_e, &mpi_foo, NULL) + gcry_sexp_extract_param (key, NULL, "n/x+e d-'foo'", + &mpi_n, &mpi_x, &mpi_e, &mpi_d, &mpi_foo, NULL) @end example stores the parameter 'n' from @var{key} as an unsigned MPI into @var{mpi_n}, the parameter 'x' as an opaque MPI into @var{mpi_x}, the -parameter 'e' again as an unsigned MPI into @var{mpi_e}, and the -parameter 'foo' as a signed MPI. +parameters 'e' and 'd' again as an unsigned MPI into @var{mpi_e} and + at var{mpi_d} and finally the parameter 'foo' as a signed MPI into + at var{mpi_foo}. @var{path} is an optional string used to locate a token. The exclamation mark separated tokens are used via ----------------------------------------------------------------------- Summary of changes: cipher/ecc-curves.c | 2 +- doc/gcrypt.texi | 9 +++++---- src/gcrypt.h.in | 2 +- src/sexp.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 03:39:46 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 03:39:46 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-34-g7b81ec2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 7b81ec272b0c54ac893c09be4715b76e84c27b23 (commit) from 25ea85066cf100e3381f7f7b2d8858a7dfcea480 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7b81ec272b0c54ac893c09be4715b76e84c27b23 Author: NIIBE Yutaka Date: Wed Oct 24 10:38:34 2018 +0900 gpg-error-config: Get var/attr from the first package. * src/gpg-error-config-new.in: Only get it from the first. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in index b8b7328..d0b9a32 100644 --- a/src/gpg-error-config-new.in +++ b/src/gpg-error-config-new.in @@ -576,10 +576,13 @@ all_required_config_files $module_list for p in $PKG_LIST; do read_config_file $p $PKG_CONFIG_PATH + # For want_var or want_attr, get it from the first package if [ -n "$want_var" ]; then - output="$output${output:+$delimiter}$(get_var $want_var)" + output="$(get_var $want_var)" + break elif [ -n "$want_attr" ]; then - output="$output${output:+$delimiter}$(get_attr $want_attr)" + output="$(get_attr $want_attr)" + break else cflags="$cflags${cflags:+ }$(get_attr Cflags)" libs="$libs${libs:+ }$(get_attr Libs)" ----------------------------------------------------------------------- Summary of changes: src/gpg-error-config-new.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 04:44:07 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 04:44:07 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-10-g9b16665 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 9b1666522f7b748cdbdd65cf7f91a76fdde6623b (commit) via f69f4c893f29c1a359cc60f8a87a79d05d9a6c15 (commit) via 9c74661d6f8028c616932b02eb5360a2e3587e81 (commit) via 34fd79ae2af25a2ac9a60a811229ec9d28926f9d (commit) from afeae6496f51d28958fd92b04cc933ee6ceb5b61 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9b1666522f7b748cdbdd65cf7f91a76fdde6623b Author: NIIBE Yutaka Date: Wed Oct 24 11:41:51 2018 +0900 build: Compatibility to pkg-config. * src/libassuan-config.in: Support --variable and --modversion. Signed-off-by: NIIBE Yutaka diff --git a/src/libassuan-config.in b/src/libassuan-config.in index c551bcb..4851c2f 100644 --- a/src/libassuan-config.in +++ b/src/libassuan-config.in @@ -70,6 +70,16 @@ while test $# -gt 0; do --exec-prefix) echo_exec_prefix=yes ;; + --variable=*) + case "${1#*=}" in + prefix) echo "$prefix" ;; + exec_prefix) echo "$exec_prefix" ;; + host) echo "$my_host" ;; + api_version) echo "$api_version" ;; + esac + exit 0 + ;; + --modversion) --version) echo "@PACKAGE_VERSION@" exit 0 commit f69f4c893f29c1a359cc60f8a87a79d05d9a6c15 Author: NIIBE Yutaka Date: Wed Oct 24 11:17:58 2018 +0900 build: Make libassuan.m4 use gpg-error-config. * src/libassuan.m4: Use gpg-error-config. -- The option --with-libassuan-prefix let it use libassuan-config. Signed-off-by: NIIBE Yutaka diff --git a/src/libassuan.m4 b/src/libassuan.m4 index fe45b06..ab1e855 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -16,19 +16,19 @@ dnl Returns ok set to yes or no. dnl AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], [ AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(libassuan-prefix, AC_HELP_STRING([--with-libassuan-prefix=PFX], [prefix where LIBASSUAN is installed (optional)]), libassuan_config_prefix="$withval", libassuan_config_prefix="") if test x$libassuan_config_prefix != x ; then - libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix" if test x${LIBASSUAN_CONFIG+set} != xset ; then LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config fi + else + LIBASSUAN_CONFIG="$GPG_ERROR_CONFIG libassuan" fi - AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no) - tmp=ifelse([$1], ,1:0.9.2,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libassuan_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -41,7 +41,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version) ok=no if test "$LIBASSUAN_CONFIG" != "no" \ - && test -f "$LIBASSUAN_CONFIG" ; then + && test -f "${LIBASSUAN_CONFIG% *}" ; then req_major=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_libassuan_version | \ @@ -49,7 +49,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], req_micro=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libassuan_config_version=`$LIBASSUAN_CONFIG --version` + libassuan_config_version=`CC=$CC $LIBASSUAN_CONFIG --modversion` major=`echo $libassuan_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libassuan_config_version | \ @@ -82,7 +82,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], if test $ok = yes; then if test "$req_libassuan_api" -gt 0 ; then - tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`CC=$CC $LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBASSUAN API version]) if test "$req_libassuan_api" -eq "$tmp" ; then @@ -97,12 +97,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], if test $ok = yes; then if test x"$host" != x ; then - libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none` + libassuan_config_host=`CC=$CC $LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none` if test x"$libassuan_config_host" != xnone ; then if test x"$libassuan_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $LIBASSUAN_CONFIG was +*** The config script "$LIBASSUAN_CONFIG" was *** built for $libassuan_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libassuan-prefix @@ -138,8 +138,8 @@ dnl AC_DEFUN([AM_PATH_LIBASSUAN], [ _AM_PATH_LIBASSUAN_COMMON($1) if test $ok = yes; then - LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags` - LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs` + LIBASSUAN_CFLAGS=`CC=$CC $LIBASSUAN_CONFIG --cflags` + LIBASSUAN_LIBS=`CC=$CC $LIBASSUAN_CONFIG --libs` ifelse([$2], , :, [$2]) else LIBASSUAN_CFLAGS="" commit 9c74661d6f8028c616932b02eb5360a2e3587e81 Author: NIIBE Yutaka Date: Wed Oct 24 10:41:00 2018 +0900 build: Provide libassuan.pc, generated by configure. * configure.ac (PACKAGE, VERSION): Remove. Generate src/libassuan.pc. * src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. (assuan.h): Use PACKAGE_VERSION and VERSION_NUMBER vars. * src/libassuan-config.in: Use @PACKAGE_VERSION at . * src/libassuan.pc.in: New. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index dad379a..2dadcd9 100644 --- a/configure.ac +++ b/configure.ac @@ -73,9 +73,6 @@ AC_SUBST(LIBASSUAN_LT_CURRENT) AC_SUBST(LIBASSUAN_LT_AGE) AC_SUBST(LIBASSUAN_LT_REVISION) -PACKAGE=$PACKAGE_NAME -VERSION=$PACKAGE_VERSION - AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip]) AM_MAINTAINER_MODE @@ -88,17 +85,10 @@ AB_INIT AC_GNU_SOURCE - -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) -AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",[Bug report address]) VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \ mym4_minor mym4_micro) AC_SUBST(VERSION_NUMBER) - # Don't default to build static libs. LT_PREREQ([2.2.6]) LT_INIT([win32-dll disable-static]) @@ -456,6 +446,7 @@ AC_CONFIG_FILES([doc/Makefile]) AC_CONFIG_FILES([tests/Makefile]) AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config]) AC_CONFIG_FILES([src/versioninfo.rc]) +AC_CONFIG_FILES([src/libassuan.pc]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index f353e29..089bc97 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,8 +19,12 @@ # SPDX-License-Identifier: LGPL-2.1+ ## Process this file with automake to produce Makefile.in +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libassuan.pc + EXTRA_DIST = libassuan-config.in libassuan.m4 libassuan.vers \ - versioninfo.rc.in libassuan.def mkheader.c gpgcedev.def + versioninfo.rc.in libassuan.def mkheader.c gpgcedev.def \ + libassuan.pc.in AM_CPPFLAGS = -I.. bin_SCRIPTS = libassuan-config @@ -149,6 +153,4 @@ mkheader: mkheader.c Makefile assuan.h: assuan.h.in mkheader $(parts_of_assuan_h) ./mkheader $(host_os) $(srcdir)/assuan.h.in \ - @VERSION@ @VERSION_NUMBER@ >$@ - - + $(PACKAGE_VERSION) $(VERSION_NUMBER) >$@ diff --git a/src/libassuan-config.in b/src/libassuan-config.in index 04177f0..c551bcb 100644 --- a/src/libassuan-config.in +++ b/src/libassuan-config.in @@ -71,7 +71,7 @@ while test $# -gt 0; do echo_exec_prefix=yes ;; --version) - echo "@VERSION@" + echo "@PACKAGE_VERSION@" exit 0 ;; --api-version) diff --git a/src/libassuan.pc.in b/src/libassuan.pc.in new file mode 100644 index 0000000..6b245fa --- /dev/null +++ b/src/libassuan.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ +host=@LIBASSUAN_CONFIG_HOST@ +api_version=@LIBASSUAN_CONFIG_API_VERSION@ + +Name: libassuan +Description: IPC library for the GnuPG components +Requires: gpg-error +Version: @PACKAGE_VERSION@ +Cflags: @LIBASSUAN_CONFIG_CFLAGS@ +Libs: @LIBASSUAN_CONFIG_LIB@ @LIBASSUAN_CONFIG_EXTRA_LIBS@ +URL: https://www.gnupg.org/related_software/libassuan/index.html commit 34fd79ae2af25a2ac9a60a811229ec9d28926f9d Author: NIIBE Yutaka Date: Wed Oct 24 09:44:15 2018 +0900 build: Update gpg-error.m4 from libgpg-error. * m4/gpg-error.m4: Update from libgpg-error 1.33. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index feb963c..9f26fa4 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -1,5 +1,5 @@ # gpg-error.m4 - autoconf macro to detect libgpg-error. -# Copyright (C) 2002, 2003, 2004, 2011 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -8,10 +8,21 @@ # This file is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Last-changed: 2014-10-02 + dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) -dnl Test for libgpg-error and define GPG_ERROR_CFLAGS and GPG_ERROR_LIBS +dnl +dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS, +dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are +dnl used for programs requireing real multi thread support. +dnl +dnl If a prefix option is not used, the config script is first +dnl searched in $SYSROOT/bin and then along $PATH. If the used +dnl config script does not match the host specification the script +dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_GPG_ERROR], [ AC_REQUIRE([AC_CANONICAL_HOST]) @@ -30,13 +41,26 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_ARG_WITH(gpg-error-prefix,, [gpg_error_config_prefix="$withval"]) - if test x$gpg_error_config_prefix != x ; then - if test x${GPG_ERROR_CONFIG+set} != xset ; then - GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config + if test x"${GPG_ERROR_CONFIG}" = x ; then + if test x"${gpg_error_config_prefix}" != x ; then + GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config" + else + case "${SYSROOT}" in + /*) + if test -x "${SYSROOT}/bin/gpg-error-config" ; then + GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config" + fi + ;; + '') + ;; + *) + AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) + ;; + esac fi fi - AC_PATH_TOOL(GPG_ERROR_CONFIG, gpg-error-config, no) + AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,0.0,$1) AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no @@ -46,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -62,11 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ @@ -74,17 +102,22 @@ AC_DEFUN([AM_PATH_GPG_ERROR], *** The config script $GPG_ERROR_CONFIG was *** built for $gpg_error_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-gpg-error-prefix -*** to specify a matching config script. +*** You may want to use the configure option --with-libgpg-error-prefix +*** to specify a matching config script or use \$SYSROOT. ***]]) + gpg_config_script_warn="$gpg_config_script_warn libgpg-error" fi fi else GPG_ERROR_CFLAGS="" GPG_ERROR_LIBS="" + GPG_ERROR_MT_CFLAGS="" + GPG_ERROR_MT_LIBS="" AC_MSG_RESULT(no) ifelse([$3], , :, [$3]) fi AC_SUBST(GPG_ERROR_CFLAGS) AC_SUBST(GPG_ERROR_LIBS) + AC_SUBST(GPG_ERROR_MT_CFLAGS) + AC_SUBST(GPG_ERROR_MT_LIBS) ]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 11 +--------- m4/gpg-error.m4 | 57 ++++++++++++++++++++++++++++++++++++++----------- src/Makefile.am | 10 +++++---- src/libassuan-config.in | 12 ++++++++++- src/libassuan.m4 | 20 ++++++++--------- src/libassuan.pc.in | 14 ++++++++++++ 6 files changed, 87 insertions(+), 37 deletions(-) create mode 100644 src/libassuan.pc.in hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 04:51:13 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 04:51:13 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-35-g6d8b1e9 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 6d8b1e958ca96b366daac38e7084f999d252a9f8 (commit) from 7b81ec272b0c54ac893c09be4715b76e84c27b23 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6d8b1e958ca96b366daac38e7084f999d252a9f8 Author: NIIBE Yutaka Date: Wed Oct 24 11:50:27 2018 +0900 gpg-error-config: Old gpg-error-config support --modversion. * src/gpg-error-config.in: Support --modversion. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error-config.in b/src/gpg-error-config.in index e050632..5c84dd8 100644 --- a/src/gpg-error-config.in +++ b/src/gpg-error-config.in @@ -63,6 +63,7 @@ while test $# -gt 0; do --exec-prefix) output="$output $exec_prefix" ;; + --modversion) --version) echo "@PACKAGE_VERSION@" exit 0 ----------------------------------------------------------------------- Summary of changes: src/gpg-error-config.in | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 05:44:56 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 05:44:56 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-21-gdfc3ad5 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via dfc3ad5c6e97cc11de4faa19de59203ae8d5eb1a (commit) via ce5247c0f3fcbe8a1e70c33ab4c83d807aecce63 (commit) via d0016a76942eb58748182ad282c03d5cd7a0dc86 (commit) via ec4e838ca91849b493f7ea77074e4415ed6a2d4a (commit) from a1ce3c17ee0d44ba8c7c9553824ba55b7950e930 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dfc3ad5c6e97cc11de4faa19de59203ae8d5eb1a Author: NIIBE Yutaka Date: Wed Oct 24 12:44:24 2018 +0900 build: Compatibility to pkg-config. * src/ksba-config.in: Support --variable and --modversion. Signed-off-by: NIIBE Yutaka diff --git a/src/ksba-config.in b/src/ksba-config.in index d43acd7..3c03c64 100644 --- a/src/ksba-config.in +++ b/src/ksba-config.in @@ -71,6 +71,16 @@ while test $# -gt 0; do --exec-prefix) echo_exec_prefix=yes ;; + --variable=*) + case "${1#*=}" in + prefix) echo "$prefix" ;; + exec_prefix) echo "$exec_prefix" ;; + host) echo "$my_host" ;; + api_version) echo "$api_version" ;; + esac + exit 0 + ;; + --modversion) --version) echo "@PACKAGE_VERSION@" exit 0 commit ce5247c0f3fcbe8a1e70c33ab4c83d807aecce63 Author: NIIBE Yutaka Date: Wed Oct 24 12:41:06 2018 +0900 build: Make ksba.m4 use gpg-error-config. * src/ksba.m4: Use gpg-error-config. -- The option --with-ksba-prefix let it use ksba-config. Signed-off-by: NIIBE Yutaka diff --git a/src/ksba.m4 b/src/ksba.m4 index 73b2e26..e7d2641 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -22,18 +22,19 @@ dnl with a changed API. dnl AC_DEFUN([AM_PATH_KSBA], [AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(ksba-prefix, AC_HELP_STRING([--with-ksba-prefix=PFX], [prefix where KSBA is installed (optional)]), ksba_config_prefix="$withval", ksba_config_prefix="") if test x$ksba_config_prefix != x ; then - ksba_config_args="$ksba_config_args --prefix=$ksba_config_prefix" - if test x${KSBA_CONFIG+set} != xset ; then - KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config - fi + if test x${KSBA_CONFIG+set} != xset ; then + KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config + fi + else + KSBA_CONFIG="$GPG_ERROR_CONFIG ksba" fi - AC_PATH_PROG(KSBA_CONFIG, ksba-config, no) tmp=ifelse([$1], ,1:1.0.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -52,7 +53,7 @@ AC_DEFUN([AM_PATH_KSBA], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ksba_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ksba_config_version=`$KSBA_CONFIG $ksba_config_args --version` + ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion` major=`echo $ksba_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ksba_config_version | \ @@ -84,7 +85,7 @@ AC_DEFUN([AM_PATH_KSBA], # Even if we have a recent libksba, we should check that the # API is compatible. if test "$req_ksba_api" -gt 0 ; then - tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([KSBA API version]) if test "$req_ksba_api" -eq "$tmp" ; then @@ -97,15 +98,15 @@ AC_DEFUN([AM_PATH_KSBA], fi fi if test $ok = yes; then - KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags` - KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs` + KSBA_CFLAGS=`CC=$CC $KSBA_CONFIG --cflags` + KSBA_LIBS=`CC=$CC $KSBA_CONFIG --libs` ifelse([$2], , :, [$2]) - libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none` + libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none` if test x"$libksba_config_host" != xnone ; then if test x"$libksba_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $LIBKSBA_CONFIG was +*** The config script "$KSBA_CONFIG" was *** built for $libksba_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libksba-prefix commit d0016a76942eb58748182ad282c03d5cd7a0dc86 Author: NIIBE Yutaka Date: Wed Oct 24 12:30:43 2018 +0900 build: Provide libassuan.pc, generated by configure. * configure.ac (PACKAGE, VERSION): Remove. Generate src/ksba.pc. * src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. * src/ksba-config.in: Use @PACKAGE_VERSION at . * src/ksba.pc.in: New. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 4f8928d..cc084a7 100644 --- a/configure.ac +++ b/configure.ac @@ -61,9 +61,6 @@ KSBA_CONFIG_API_VERSION=1 NEED_GPG_ERROR_VERSION=1.8 -PACKAGE=$PACKAGE_NAME -VERSION=$PACKAGE_VERSION - AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/ksba.h]) AM_INIT_AUTOMAKE([serial-tests dist-bzip2 no-dist-gzip]) @@ -84,10 +81,7 @@ AM_MAINTAINER_MODE AC_SUBST(LIBKSBA_LT_CURRENT) AC_SUBST(LIBKSBA_LT_AGE) AC_SUBST(LIBKSBA_LT_REVISION) -AC_SUBST(PACKAGE) -AC_SUBST(VERSION) -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) + AH_TOP([ #ifndef _KSBA_CONFIG_H_INCLUDED @@ -435,6 +429,7 @@ m4/Makefile gl/Makefile src/Makefile src/ksba-config +src/ksba.pc src/versioninfo.rc tests/Makefile doc/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index e8a5692..a5291ef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,11 +18,14 @@ ## Process this file with automake to produce Makefile.in +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = ksba.pc + asn1_modules = tmttv2.asn cms.asn buildtool_src = asn1-gentables.c gen-help.c gen-help.h EXTRA_DIST = ksba-config.in $(asn1_modules) ksba.m4 libksba.vers libksba.def \ - asn1-parse.c asn1-tables.c $(buildtool_src) + asn1-parse.c asn1-tables.c $(buildtool_src) ksba.pc.in BUILT_SOURCES = asn1-parse.c asn1-tables.c bin_SCRIPTS = ksba-config include_HEADERS = ksba.h diff --git a/src/ksba-config.in b/src/ksba-config.in index 55f4fcb..d43acd7 100644 --- a/src/ksba-config.in +++ b/src/ksba-config.in @@ -72,7 +72,7 @@ while test $# -gt 0; do echo_exec_prefix=yes ;; --version) - echo "@VERSION@" + echo "@PACKAGE_VERSION@" exit 0 ;; --api-version) diff --git a/src/ksba.pc.in b/src/ksba.pc.in new file mode 100644 index 0000000..28b32c5 --- /dev/null +++ b/src/ksba.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ +host=@KSBA_CONFIG_HOST@ +api_version=@KSBA_CONFIG_API_VERSION@ + +Name: ksba +Description: X.509 and CMS support library +Requires: gpg-error +Version: @PACKAGE_VERSION@ +Cflags: @KSBA_CONFIG_CFLAGS@ +Libs: @KSBA_CONFIG_LIB@ +URL: http://www.gnupg.org/related_software/libksba/ commit ec4e838ca91849b493f7ea77074e4415ed6a2d4a Author: NIIBE Yutaka Date: Wed Oct 24 11:52:52 2018 +0900 build: Update gpg-error.m4 from libgpg-error. * m4/gpg-error.m4: Update from libgpg-error 1.33. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 1661204..9f26fa4 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,13 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ @@ -100,7 +102,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], *** The config script $GPG_ERROR_CONFIG was *** built for $gpg_error_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-gpg-error-prefix +*** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) gpg_config_script_warn="$gpg_config_script_warn libgpg-error" ----------------------------------------------------------------------- Summary of changes: configure.ac | 9 ++------- m4/gpg-error.m4 | 16 +++++++++------- src/Makefile.am | 5 ++++- src/ksba-config.in | 12 +++++++++++- src/ksba.m4 | 23 ++++++++++++----------- src/ksba.pc.in | 14 ++++++++++++++ 6 files changed, 52 insertions(+), 27 deletions(-) create mode 100644 src/ksba.pc.in hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 07:15:45 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 07:15:45 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-36-g184c22b Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 184c22bea37d2bee3885ef96c1a3664361b02912 (commit) from 6d8b1e958ca96b366daac38e7084f999d252a9f8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 184c22bea37d2bee3885ef96c1a3664361b02912 Author: NIIBE Yutaka Date: Wed Oct 24 14:14:59 2018 +0900 gpg-error-config: Fix previous commit. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error-config.in b/src/gpg-error-config.in index 5c84dd8..c1c771a 100644 --- a/src/gpg-error-config.in +++ b/src/gpg-error-config.in @@ -63,8 +63,7 @@ while test $# -gt 0; do --exec-prefix) output="$output $exec_prefix" ;; - --modversion) - --version) + --modversion|--version) echo "@PACKAGE_VERSION@" exit 0 ;; ----------------------------------------------------------------------- Summary of changes: src/gpg-error-config.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 07:18:24 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 07:18:24 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-11-gb9fb02a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via b9fb02a823f72f97d93344d16d49b73e39a7aaaf (commit) from 9b1666522f7b748cdbdd65cf7f91a76fdde6623b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b9fb02a823f72f97d93344d16d49b73e39a7aaaf Author: NIIBE Yutaka Date: Wed Oct 24 14:18:04 2018 +0900 build: Fix previous commit. Signed-off-by: NIIBE Yutaka diff --git a/src/libassuan-config.in b/src/libassuan-config.in index 4851c2f..914c7ef 100644 --- a/src/libassuan-config.in +++ b/src/libassuan-config.in @@ -79,8 +79,7 @@ while test $# -gt 0; do esac exit 0 ;; - --modversion) - --version) + --modversion|--version) echo "@PACKAGE_VERSION@" exit 0 ;; ----------------------------------------------------------------------- Summary of changes: src/libassuan-config.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 07:19:33 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 07:19:33 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-22-g5a21f74 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via 5a21f7465ca2aadfb3877a53f6536859b6973463 (commit) from dfc3ad5c6e97cc11de4faa19de59203ae8d5eb1a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5a21f7465ca2aadfb3877a53f6536859b6973463 Author: NIIBE Yutaka Date: Wed Oct 24 14:19:20 2018 +0900 build: Fix previous commit. Signed-off-by: NIIBE Yutaka diff --git a/src/ksba-config.in b/src/ksba-config.in index 3c03c64..76d038d 100644 --- a/src/ksba-config.in +++ b/src/ksba-config.in @@ -80,8 +80,7 @@ while test $# -gt 0; do esac exit 0 ;; - --modversion) - --version) + --modversion|--version) echo "@PACKAGE_VERSION@" exit 0 ;; ----------------------------------------------------------------------- Summary of changes: src/ksba-config.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 08:23:19 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 24 Oct 2018 08:23:19 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-5-ga9f1c04 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via a9f1c04e2933ca8f3dbdfda546bc191383f6d5a3 (commit) from 2aa65cb3d86d0e8eee79db1ec72447707cd4a2f2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a9f1c04e2933ca8f3dbdfda546bc191383f6d5a3 Author: Andre Heinecke Date: Tue Oct 23 10:55:07 2018 +0200 Only log raw crypto data if DBG_DATA is enabled * src/mimedataprovider.cpp (MimeDataProvider::collect_input_lines): Change a log_debug to log_data. -- This can be signed data so it might be a data leak. diff --git a/src/mimedataprovider.cpp b/src/mimedataprovider.cpp index 01841da..be10e14 100644 --- a/src/mimedataprovider.cpp +++ b/src/mimedataprovider.cpp @@ -787,7 +787,7 @@ MimeDataProvider::collect_input_lines(const char *input, size_t insize) len = b64_decode (&m_mime_ctx->base64, linebuf, pos); else len = pos; - log_debug ("Writing crypto data: %.*s", + log_data ("Writing crypto data: %.*s", (int)pos, linebuf); if (len) m_crypto_data.write(linebuf, len); ----------------------------------------------------------------------- Summary of changes: src/mimedataprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 08:26:10 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 08:26:10 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-95-gc60eabb Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via c60eabb11435665fa84a3a82b2a15f48870cc4d7 (commit) via 7da887d69d72ea0ea0d106054c48a8c03e242a18 (commit) via 97194b422bc89a6137f4e218d4cdee118c63e96e (commit) via 5b1febb5e40d92072bef425bd9e63f7a07edd57e (commit) via 0f4545b441b6fbdd6e9c4e95f5f2a367483e78ad (commit) from e2da4e8dee4b371804f3b2659b53431fb6380d93 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c60eabb11435665fa84a3a82b2a15f48870cc4d7 Author: NIIBE Yutaka Date: Wed Oct 24 15:13:40 2018 +0900 build: Compatibility to pkg-config. * src/libgcrypt-config.in: Support --variable and --modversion. Signed-off-by: NIIBE Yutaka diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in index f7a13af..6b3b356 100644 --- a/src/libgcrypt-config.in +++ b/src/libgcrypt-config.in @@ -96,7 +96,19 @@ while test $# -gt 0; do --exec-prefix) echo_exec_prefix=yes ;; - --version) + --variable=*) + case "${1#*=}" in + prefix) echo "$prefix" ;; + exec_prefix) echo "$exec_prefix" ;; + host) echo "$my_host" ;; + api_version) echo "$api_version" ;; + symmetric_ciphers) echo "$symmetric_ciphers" ;; + asymmetric_ciphers) echo "$asymmetric_ciphers" ;; + digests) echo "$digests" ;; + esac + exit 0 + ;; + --modversion|--version) echo_version=yes ;; --api-version) commit 7da887d69d72ea0ea0d106054c48a8c03e242a18 Author: NIIBE Yutaka Date: Wed Oct 24 15:07:18 2018 +0900 build: Make libgcrypt.m4 use gpg-error-config. * src/libgcrypt.m4: Use gpg-error-config. -- With the option --with-libgcrypt-prefix, it still keeps using libgcrypt-config script. Signed-off-by: NIIBE Yutaka diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 index c67cfec..df6469d 100644 --- a/src/libgcrypt.m4 +++ b/src/libgcrypt.m4 @@ -1,5 +1,5 @@ # libgcrypt.m4 - Autoconf macros to detect libgcrypt -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-24 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, @@ -29,6 +29,7 @@ dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(libgcrypt-prefix, AC_HELP_STRING([--with-libgcrypt-prefix=PFX], [prefix where LIBGCRYPT is installed (optional)]), @@ -44,15 +45,16 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi ;; '') + LIBGCRYPT_CONFIG="$GPG_ERROR_CONFIG libgcrypt" ;; *) + LIBGCRYPT_CONFIG="$GPG_ERROR_CONFIG libgcrypt" AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi fi - AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -71,7 +73,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` + libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --modversion` major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ @@ -103,7 +105,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then - tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`CC=$CC $LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then @@ -116,15 +118,15 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi if test $ok = yes; then - LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` - LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` + LIBGCRYPT_CFLAGS=`CC=$CC $LIBGCRYPT_CONFIG --cflags` + LIBGCRYPT_LIBS=`CC=$CC $LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) - libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $LIBGCRYPT_CONFIG was +*** The config script "$LIBGCRYPT_CONFIG" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix commit 97194b422bc89a6137f4e218d4cdee118c63e96e Author: NIIBE Yutaka Date: Wed Oct 24 14:57:53 2018 +0900 build: Provide libgcrypt.pc, generated by configure. * configure.ac: Generate src/libgcrypt.pc. * src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. (EXTRA_DIST): Add libgcrypt.pc.in. * src/libgcrypt-config.in: Use @PACKAGE_VERSION at . * src/libgcrypt.pc.in: New. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 7658f6c..cdce339 100644 --- a/configure.ac +++ b/configure.ac @@ -2670,6 +2670,7 @@ doc/Makefile src/Makefile src/gcrypt.h src/libgcrypt-config +src/libgcrypt.pc src/versioninfo.rc tests/Makefile ]) diff --git a/src/Makefile.am b/src/Makefile.am index 3cc4a55..82d6e8a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,8 +20,11 @@ ## Process this file with automake to produce Makefile.in +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libgcrypt.pc + EXTRA_DIST = libgcrypt-config.in libgcrypt.m4 libgcrypt.vers \ - gcrypt.h.in libgcrypt.def + gcrypt.h.in libgcrypt.def libgcrypt.pc.in bin_SCRIPTS = libgcrypt-config m4datadir = $(datadir)/aclocal diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in index c052638..f7a13af 100644 --- a/src/libgcrypt-config.in +++ b/src/libgcrypt-config.in @@ -14,7 +14,7 @@ # General. prefix="@prefix@" exec_prefix="@exec_prefix@" -version="@VERSION@" +version="@PACKAGE_VERSION@" includedir="@includedir@" libdir="@libdir@" gpg_error_libs="@GPG_ERROR_LIBS@" diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in new file mode 100644 index 0000000..5472da5 --- /dev/null +++ b/src/libgcrypt.pc.in @@ -0,0 +1,17 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ +host=@LIBGCRYPT_CONFIG_HOST@ +api_version=@LIBGCRYPT_CONFIG_API_VERSION@ +symmetric_ciphers="@LIBGCRYPT_CIPHERS@" +asymmetric_ciphers="@LIBGCRYPT_PUBKEY_CIPHERS@" +digests="@LIBGCRYPT_DIGESTS@" + +Name: libgcrypt +Description: General purpose cryptographic library +Requires: gpg-error +Version: @PACKAGE_VERSION@ +Cflags: @LIBGCRYPT_CONFIG_CFLAGS@ +Libs: @LIBGCRYPT_CONFIG_LIB@ +URL: https://www.gnupg.org/software/libgcrypt/index.html commit 5b1febb5e40d92072bef425bd9e63f7a07edd57e Author: NIIBE Yutaka Date: Wed Oct 24 14:33:23 2018 +0900 build: Update gpg-error.m4 from libgpg-error. * m4/gpg-error.m4: Update from libgpg-error 1.33. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 1661204..9f26fa4 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,13 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ @@ -100,7 +102,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], *** The config script $GPG_ERROR_CONFIG was *** built for $gpg_error_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-gpg-error-prefix +*** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) gpg_config_script_warn="$gpg_config_script_warn libgpg-error" commit 0f4545b441b6fbdd6e9c4e95f5f2a367483e78ad Author: NIIBE Yutaka Date: Wed Oct 24 14:29:45 2018 +0900 build: Don't default to underscore=yes for cross-build. * acinclude.m4: Don't set ac_cv_sys_symbol_underscore for cross build. -- It made sense in the past when cross compile were basically for a.out system, but nowadays, it's better not to assume that. Signed-off-by: NIIBE Yutaka diff --git a/acinclude.m4 b/acinclude.m4 index fc208c5..6f7789d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -111,14 +111,10 @@ case "${host}" in ac_cv_sys_symbol_underscore=yes ;; *) - if test "$cross_compiling" = yes; then - if test "x$ac_cv_sys_symbol_underscore" = x ; then - ac_cv_sys_symbol_underscore=yes - fi - else + if test "$cross_compiling" != yes; then tmp_do_check="yes" fi - ;; + ;; esac if test "$tmp_do_check" = "yes"; then AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) ----------------------------------------------------------------------- Summary of changes: acinclude.m4 | 8 ++------ configure.ac | 1 + m4/gpg-error.m4 | 16 +++++++++------- src/Makefile.am | 5 ++++- src/libgcrypt-config.in | 16 ++++++++++++++-- src/libgcrypt.m4 | 20 +++++++++++--------- src/libgcrypt.pc.in | 17 +++++++++++++++++ 7 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 src/libgcrypt.pc.in hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 08:34:45 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 08:34:45 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-23-g4754816 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via 4754816d10a38ebe97acd2f3bfaa835055566696 (commit) from 5a21f7465ca2aadfb3877a53f6536859b6973463 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4754816d10a38ebe97acd2f3bfaa835055566696 Author: NIIBE Yutaka Date: Wed Oct 24 15:34:03 2018 +0900 build: Fix ksba.pc. * src/ksba.pc.in: Fix typo. Signed-off-by: NIIBE Yutaka diff --git a/src/ksba.pc.in b/src/ksba.pc.in index 28b32c5..9666235 100644 --- a/src/ksba.pc.in +++ b/src/ksba.pc.in @@ -10,5 +10,5 @@ Description: X.509 and CMS support library Requires: gpg-error Version: @PACKAGE_VERSION@ Cflags: @KSBA_CONFIG_CFLAGS@ -Libs: @KSBA_CONFIG_LIB@ +Libs: @KSBA_CONFIG_LIBS@ URL: http://www.gnupg.org/related_software/libksba/ ----------------------------------------------------------------------- Summary of changes: src/ksba.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 08:35:19 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 08:35:19 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-96-g0e07137 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 0e071372fc0e6fed4a449955ed0789803ba5e709 (commit) from c60eabb11435665fa84a3a82b2a15f48870cc4d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0e071372fc0e6fed4a449955ed0789803ba5e709 Author: NIIBE Yutaka Date: Wed Oct 24 15:34:57 2018 +0900 build: Fix libgcrypt.pc. * src/libgcrypt.pc.in: Fix typo. Signed-off-by: NIIBE Yutaka diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in index 5472da5..ec68fa2 100644 --- a/src/libgcrypt.pc.in +++ b/src/libgcrypt.pc.in @@ -13,5 +13,5 @@ Description: General purpose cryptographic library Requires: gpg-error Version: @PACKAGE_VERSION@ Cflags: @LIBGCRYPT_CONFIG_CFLAGS@ -Libs: @LIBGCRYPT_CONFIG_LIB@ +Libs: @LIBGCRYPT_CONFIG_LIBS@ URL: https://www.gnupg.org/software/libgcrypt/index.html ----------------------------------------------------------------------- Summary of changes: src/libgcrypt.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 08:43:21 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 08:43:21 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-12-g2579725 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 25797256e1588db9f3171a050246008ac66c66b3 (commit) from b9fb02a823f72f97d93344d16d49b73e39a7aaaf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 25797256e1588db9f3171a050246008ac66c66b3 Author: NIIBE Yutaka Date: Wed Oct 24 15:42:39 2018 +0900 build: Fix libassuan.pc. * src/libassuan.pc.in: Fix typo. Signed-off-by: NIIBE Yutaka diff --git a/src/libassuan.pc.in b/src/libassuan.pc.in index 6b245fa..a5caac6 100644 --- a/src/libassuan.pc.in +++ b/src/libassuan.pc.in @@ -10,5 +10,5 @@ Description: IPC library for the GnuPG components Requires: gpg-error Version: @PACKAGE_VERSION@ Cflags: @LIBASSUAN_CONFIG_CFLAGS@ -Libs: @LIBASSUAN_CONFIG_LIB@ @LIBASSUAN_CONFIG_EXTRA_LIBS@ +Libs: @LIBASSUAN_CONFIG_LIBS@ @LIBASSUAN_CONFIG_EXTRA_LIBS@ URL: https://www.gnupg.org/related_software/libassuan/index.html ----------------------------------------------------------------------- Summary of changes: src/libassuan.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 09:20:04 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 24 Oct 2018 09:20:04 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-12-g01baee2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via 01baee2b0ef4f81ac6ffa55480e91168dd27b430 (commit) from 6b36c16f77722d17f4f317c788701cbc1e9552b2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 01baee2b0ef4f81ac6ffa55480e91168dd27b430 Author: Andre Heinecke Date: Wed Oct 24 09:17:39 2018 +0200 dirmngr: Only print info for no ldapserver file * dirmngr/dirmngr.c (parse_ldapserver_file): Only print info for ENOENT. -- It is very common that there is no ldapserver file. In that case users are confused by an error printed at dirmngr startup. diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 5965f84..55c7a49 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -1629,7 +1629,11 @@ parse_ldapserver_file (const char* filename) fp = es_fopen (filename, "r"); if (!fp) { - log_error (_("error opening '%s': %s\n"), filename, strerror (errno)); + if (errno == ENOENT) + log_info ("No ldapserver file at: '%s'\n", filename); + else + log_error (_("error opening '%s': %s\n"), filename, + strerror (errno)); return NULL; } ----------------------------------------------------------------------- Summary of changes: dirmngr/dirmngr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 09:22:33 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 09:22:33 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-7-gea6edaf Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via ea6edafcf8393fd7ae6eb0cef5c3b41d943c3e2b (commit) via 06e6d62dcaf6ecd08e16cc692a4bb4bc6acc9307 (commit) via 548b70b9db46f028d43a1ae41118b73d170bb57e (commit) via f4e5435e1d4cf0c9517d9056e293cc13bc2b5000 (commit) from 9d54948d6ca3e3e3e3040dab0c5fded0757472e9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ea6edafcf8393fd7ae6eb0cef5c3b41d943c3e2b Author: NIIBE Yutaka Date: Wed Oct 24 16:17:17 2018 +0900 build: Compatibility to pkg-config. * src/ntbtls-config.in: Support --variable and --modversion. Signed-off-by: NIIBE Yutaka diff --git a/src/ntbtls-config.in b/src/ntbtls-config.in index c29586c..f6eef3e 100644 --- a/src/ntbtls-config.in +++ b/src/ntbtls-config.in @@ -91,7 +91,16 @@ while test $# -gt 0; do --exec-prefix) echo_exec_prefix=yes ;; - --version) + --variable=*) + case "${1#*=}" in + prefix) echo "$prefix" ;; + exec_prefix) echo "$exec_prefix" ;; + host) echo "$my_host" ;; + api_version) echo "$api_version" ;; + esac + exit 0 + ;; + --modversion|--version) echo_version=yes ;; --api-version) commit 06e6d62dcaf6ecd08e16cc692a4bb4bc6acc9307 Author: NIIBE Yutaka Date: Wed Oct 24 16:13:21 2018 +0900 build: Make ntbtls.m4 use gpg-error-config. * src/ntbtls.m4: Use gpg-error-config. -- With the option --with-ntbtls-prefix, it still uses ntbtls-config script. Signed-off-by: NIIBE Yutaka diff --git a/src/ntbtls.m4 b/src/ntbtls.m4 index 85c8ee9..4a551b6 100644 --- a/src/ntbtls.m4 +++ b/src/ntbtls.m4 @@ -38,15 +38,16 @@ AC_DEFUN([AM_PATH_NTBTLS], fi ;; '') + NTBTLS_CONFIG="$GPG_ERROR_CONFIG ntbtls" ;; *) + NTBTLS_CONFIG="$GPG_ERROR_CONFIG ntbtls" AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi fi - AC_PATH_PROG(NTBTLS_CONFIG, ntbtls-config, no) tmp=ifelse([$1], ,1:1.0.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_ntbtls_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -65,7 +66,7 @@ AC_DEFUN([AM_PATH_NTBTLS], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ntbtls_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ntbtls_config_version=`$NTBTLS_CONFIG --version` + ntbtls_config_version=`CC=$CC $NTBTLS_CONFIG --version` major=`echo $ntbtls_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ntbtls_config_version | \ @@ -97,7 +98,7 @@ AC_DEFUN([AM_PATH_NTBTLS], # If we have a recent ntbtls, we should also check that the # API is compatible if test "$req_ntbtls_api" -gt 0 ; then - tmp=`$NTBTLS_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`CC=$CC $NTBTLS_CONFIG --variable=api_version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([NTBTLS API version]) if test "$req_ntbtls_api" -eq "$tmp" ; then @@ -110,15 +111,15 @@ AC_DEFUN([AM_PATH_NTBTLS], fi fi if test $ok = yes; then - NTBTLS_CFLAGS=`$NTBTLS_CONFIG --cflags` - NTBTLS_LIBS=`$NTBTLS_CONFIG --libs` + NTBTLS_CFLAGS=`CC=$CC $NTBTLS_CONFIG --cflags` + NTBTLS_LIBS=`CC=$CC $NTBTLS_CONFIG --libs` ifelse([$2], , :, [$2]) - ntbtls_config_host=`$NTBTLS_CONFIG --host 2>/dev/null || echo none` + ntbtls_config_host=`CC=$CC $NTBTLS_CONFIG --variable=host 2>/dev/null || echo none` if test x"$ntbtls_config_host" != xnone ; then if test x"$ntbtls_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $NTBTLS_CONFIG was +*** The config script "$NTBTLS_CONFIG" was *** built for $ntbtls_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-ntbtls-prefix commit 548b70b9db46f028d43a1ae41118b73d170bb57e Author: NIIBE Yutaka Date: Wed Oct 24 16:06:38 2018 +0900 build: Provide ntbtls.pc, generated by configure. * configure.ac (PACKAGE, VERSION): Remove. Generate src/ntbtls.pc. * src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. (EXTRA_DIST): Add ntbtls.pc.in. * src/ntbtls-config.in: Use @PACKAGE_VERSION at . * src/ntbtls.pc.in: New. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index d149c62..af15467 100644 --- a/configure.ac +++ b/configure.ac @@ -72,9 +72,6 @@ NEED_KSBA_VERSION=1.2.0 # End of config section -PACKAGE=$PACKAGE_NAME -VERSION=$PACKAGE_VERSION - AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/ntbtls.h.in]) AC_CONFIG_HEADER([config.h]) @@ -91,20 +88,12 @@ use_zip=yes AC_SUBST(LIBNTBTLS_LT_CURRENT) AC_SUBST(LIBNTBTLS_LT_AGE) AC_SUBST(LIBNTBTLS_LT_REVISION) -AC_SUBST(PACKAGE) -AC_SUBST(PACKAGE_GT) -AC_SUBST(VERSION) -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) -AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT", - [Name of this package for gettext]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) + VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_major \ mym4_minor mym4_micro) AC_SUBST(VERSION_NUMBER) -AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT", - [Bug report address]) AC_DEFINE_UNQUOTED(NEED_LIBGCRYPT_VERSION, "$NEED_LIBGCRYPT_VERSION", [Required version of Libgcrypt]) AC_DEFINE_UNQUOTED(NEED_KSBA_VERSION, "$NEED_KSBA_VERSION", @@ -682,6 +671,7 @@ m4/Makefile src/Makefile src/ntbtls.h src/ntbtls-config +src/ntbtls.pc src/versioninfo.rc ]) AC_CONFIG_COMMANDS([ntbtls-conf],[[ diff --git a/src/Makefile.am b/src/Makefile.am index 8e8b63d..73262ba 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,8 +18,11 @@ ## Process this file with automake to produce Makefile.in +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = ntbtls.pc + EXTRA_DIST = ntbtls.h.in ntbtls.m4 libntbtls.vers libntbtls.def \ - versioninfo.rc.in + versioninfo.rc.in ntbtls.pc.in bin_SCRIPTS = ntbtls-config include_HEADERS = ntbtls.h lib_LTLIBRARIES = libntbtls.la diff --git a/src/ntbtls-config.in b/src/ntbtls-config.in index a9510a4..c29586c 100644 --- a/src/ntbtls-config.in +++ b/src/ntbtls-config.in @@ -14,7 +14,7 @@ # General. prefix="@prefix@" exec_prefix="@exec_prefix@" -version="@VERSION@" +version="@PACKAGE_VERSION@" includedir="@includedir@" libdir="@libdir@" gpg_error_libs="@GPG_ERROR_LIBS@" diff --git a/src/ntbtls.pc.in b/src/ntbtls.pc.in new file mode 100644 index 0000000..89ab645 --- /dev/null +++ b/src/ntbtls.pc.in @@ -0,0 +1,14 @@ +prefix="@prefix@" +exec_prefix="@exec_prefix@" +includedir="@includedir@" +libdir="@libdir@" +host="@NTBTLS_CONFIG_HOST@" +api_version="@NTBTLS_CONFIG_API_VERSION@" + +Name: ntbtls +Description: The Not Too Bad TLS Library +Requires: gpg-error +Version: @PACKAGE_VERSION@ +Cflags: @NTBTLS_CONFIG_CFLAGS@ +Libs: @NTBTLS_CONFIG_LIBS@ +URL: https://www.gnupg.org/software/ntbtls/index.html commit f4e5435e1d4cf0c9517d9056e293cc13bc2b5000 Author: NIIBE Yutaka Date: Wed Oct 24 15:40:57 2018 +0900 build: Update m4 scripts. * m4/gpg-error.m4: Update from libgpg-error. * m4/ksba.m4: Update from libksba. * m4/libgcrypt.m4: Update from libgcrypt. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 1661204..9f26fa4 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,13 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ @@ -100,7 +102,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], *** The config script $GPG_ERROR_CONFIG was *** built for $gpg_error_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-gpg-error-prefix +*** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) gpg_config_script_warn="$gpg_config_script_warn libgpg-error" diff --git a/m4/ksba.m4 b/m4/ksba.m4 index 73b2e26..e7d2641 100644 --- a/m4/ksba.m4 +++ b/m4/ksba.m4 @@ -22,18 +22,19 @@ dnl with a changed API. dnl AC_DEFUN([AM_PATH_KSBA], [AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(ksba-prefix, AC_HELP_STRING([--with-ksba-prefix=PFX], [prefix where KSBA is installed (optional)]), ksba_config_prefix="$withval", ksba_config_prefix="") if test x$ksba_config_prefix != x ; then - ksba_config_args="$ksba_config_args --prefix=$ksba_config_prefix" - if test x${KSBA_CONFIG+set} != xset ; then - KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config - fi + if test x${KSBA_CONFIG+set} != xset ; then + KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config + fi + else + KSBA_CONFIG="$GPG_ERROR_CONFIG ksba" fi - AC_PATH_PROG(KSBA_CONFIG, ksba-config, no) tmp=ifelse([$1], ,1:1.0.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -52,7 +53,7 @@ AC_DEFUN([AM_PATH_KSBA], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ksba_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ksba_config_version=`$KSBA_CONFIG $ksba_config_args --version` + ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion` major=`echo $ksba_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ksba_config_version | \ @@ -84,7 +85,7 @@ AC_DEFUN([AM_PATH_KSBA], # Even if we have a recent libksba, we should check that the # API is compatible. if test "$req_ksba_api" -gt 0 ; then - tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([KSBA API version]) if test "$req_ksba_api" -eq "$tmp" ; then @@ -97,15 +98,15 @@ AC_DEFUN([AM_PATH_KSBA], fi fi if test $ok = yes; then - KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags` - KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs` + KSBA_CFLAGS=`CC=$CC $KSBA_CONFIG --cflags` + KSBA_LIBS=`CC=$CC $KSBA_CONFIG --libs` ifelse([$2], , :, [$2]) - libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none` + libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none` if test x"$libksba_config_host" != xnone ; then if test x"$libksba_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $LIBKSBA_CONFIG was +*** The config script "$KSBA_CONFIG" was *** built for $libksba_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libksba-prefix diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4 index c67cfec..df6469d 100644 --- a/m4/libgcrypt.m4 +++ b/m4/libgcrypt.m4 @@ -1,5 +1,5 @@ # libgcrypt.m4 - Autoconf macros to detect libgcrypt -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-24 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, @@ -29,6 +29,7 @@ dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(libgcrypt-prefix, AC_HELP_STRING([--with-libgcrypt-prefix=PFX], [prefix where LIBGCRYPT is installed (optional)]), @@ -44,15 +45,16 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi ;; '') + LIBGCRYPT_CONFIG="$GPG_ERROR_CONFIG libgcrypt" ;; *) + LIBGCRYPT_CONFIG="$GPG_ERROR_CONFIG libgcrypt" AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi fi - AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -71,7 +73,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` + libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --modversion` major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ @@ -103,7 +105,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then - tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`CC=$CC $LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then @@ -116,15 +118,15 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi if test $ok = yes; then - LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` - LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` + LIBGCRYPT_CFLAGS=`CC=$CC $LIBGCRYPT_CONFIG --cflags` + LIBGCRYPT_LIBS=`CC=$CC $LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) - libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $LIBGCRYPT_CONFIG was +*** The config script "$LIBGCRYPT_CONFIG" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix ----------------------------------------------------------------------- Summary of changes: configure.ac | 14 ++------------ m4/gpg-error.m4 | 16 +++++++++------- m4/ksba.m4 | 23 ++++++++++++----------- m4/libgcrypt.m4 | 20 +++++++++++--------- src/Makefile.am | 5 ++++- src/ntbtls-config.in | 13 +++++++++++-- src/ntbtls.m4 | 15 ++++++++------- src/ntbtls.pc.in | 14 ++++++++++++++ 8 files changed, 71 insertions(+), 49 deletions(-) create mode 100644 src/ntbtls.pc.in hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 09:40:43 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 09:40:43 +0200 Subject: [git] GPA - branch, master, updated. gpa-0.10.0-5-g70858dc Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Assistant". The branch, master has been updated via 70858dcd6062f2e77956b5dd14597d38633bb09a (commit) from 493b02e523772c46abf3fa4c288ebe25234e4e68 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 70858dcd6062f2e77956b5dd14597d38633bb09a Author: Werner Koch Date: Wed Oct 24 09:40:30 2018 +0200 Trim tooltips before displaying. * src/gtktools.c (gpa_add_tooltip): Strip traling LFs. * src/confdialog.c (create_dialog_tabs_2): Use gpa_add_tooltip. -- GnuPG-bug-id: 4216 Signed-off-by: Werner Koch diff --git a/src/confdialog.c b/src/confdialog.c index 7f83165..a7c49f0 100644 --- a/src/confdialog.c +++ b/src/confdialog.c @@ -1203,7 +1203,7 @@ create_dialog_tabs_2 (gpgme_conf_comp_t old_conf, gpgme_conf_comp_t new_conf) char *description = xstrdup (option->description); percent_unescape (description, 0); - gtk_widget_set_tooltip_text (vbox, description); + gpa_add_tooltip (vbox, description); xfree (description); } #endif diff --git a/src/gtktools.c b/src/gtktools.c index 2116769..fe2ee39 100644 --- a/src/gtktools.c +++ b/src/gtktools.c @@ -169,7 +169,23 @@ gpa_add_tooltip (GtkWidget *widget, const char *text) { #if GTK_CHECK_VERSION (2, 12, 0) if (widget && text && *text) - gtk_widget_set_tooltip_text (widget, text); + { + size_t len = strlen (text); + if (text[len-1] == '\n') + { + /* Remove trailing line feeds. The reason for this may be + * that the tooltip text is used for other purposes as + * well. */ + char *buf = g_strdup (text); + for ( ;len && buf[len-1] == '\n'; len--) + buf[len-1] = 0; + if (*buf) + gtk_widget_set_tooltip_text (widget, buf); + g_free (buf); + } + else + gtk_widget_set_tooltip_text (widget, text); + } #endif } ----------------------------------------------------------------------- Summary of changes: src/confdialog.c | 2 +- src/gtktools.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Assistant http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 09:43:57 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 09:43:57 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-8-g39d0b3a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via 39d0b3a02afe78cced546e7f9a61566b7be068c1 (commit) from ea6edafcf8393fd7ae6eb0cef5c3b41d943c3e2b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 39d0b3a02afe78cced546e7f9a61566b7be068c1 Author: NIIBE Yutaka Date: Wed Oct 24 16:42:48 2018 +0900 build: Fix ntbtls.m4. * src/ntbtls.m4: Use --modversion to get the version. -- Fixes-commit: 06e6d62dcaf6ecd08e16cc692a4bb4bc6acc9307 Signed-off-by: NIIBE Yutaka diff --git a/src/ntbtls.m4 b/src/ntbtls.m4 index 4a551b6..a958dda 100644 --- a/src/ntbtls.m4 +++ b/src/ntbtls.m4 @@ -66,7 +66,7 @@ AC_DEFUN([AM_PATH_NTBTLS], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ntbtls_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ntbtls_config_version=`CC=$CC $NTBTLS_CONFIG --version` + ntbtls_config_version=`CC=$CC $NTBTLS_CONFIG --modversion` major=`echo $ntbtls_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ntbtls_config_version | \ ----------------------------------------------------------------------- Summary of changes: src/ntbtls.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 10:03:41 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 10:03:41 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-97-g149ceb3 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 149ceb3cae03d0385341d32430aa5ae57de90007 (commit) from 0e071372fc0e6fed4a449955ed0789803ba5e709 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 149ceb3cae03d0385341d32430aa5ae57de90007 Author: Werner Koch Date: Wed Oct 24 09:50:17 2018 +0200 ecc: Fix possible memory leakage in parameter check of eddsa. * cipher/ecc-eddsa.c (_gcry_ecc_eddsa_verify): Fix mem leak. -- GnuPG-bug-id: 4209 Signed-off-by: Werner Koch diff --git a/cipher/ecc-eddsa.c b/cipher/ecc-eddsa.c index 813e030..89b708a 100644 --- a/cipher/ecc-eddsa.c +++ b/cipher/ecc-eddsa.c @@ -760,7 +760,10 @@ _gcry_ecc_eddsa_verify (gcry_mpi_t input, ECC_public_key *pkey, pkey->E.p, pkey->E.a, pkey->E.b); b = ctx->nbits/8; if (b != 256/8) - return GPG_ERR_INTERNAL; /* We only support 256 bit. */ + { + rc = GPG_ERR_INTERNAL; /* We only support 256 bit. */ + goto leave; + } /* Decode and check the public key. */ rc = _gcry_ecc_eddsa_decodepoint (pk, ctx, &Q, &encpk, &encpklen); ----------------------------------------------------------------------- Summary of changes: cipher/ecc-eddsa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 10:12:57 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 24 Oct 2018 10:12:57 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-9-gace1fa9 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via ace1fa90ec40e30cefa65a3cf8552960c9f5e761 (commit) from 39d0b3a02afe78cced546e7f9a61566b7be068c1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ace1fa90ec40e30cefa65a3cf8552960c9f5e761 Author: NIIBE Yutaka Date: Wed Oct 24 17:12:26 2018 +0900 build: Fix ntbtls.pc.in. * src/ntbtls.pc.in: Don't quote. Signed-off-by: NIIBE Yutaka diff --git a/src/ntbtls.pc.in b/src/ntbtls.pc.in index 89ab645..6e59dc8 100644 --- a/src/ntbtls.pc.in +++ b/src/ntbtls.pc.in @@ -1,9 +1,9 @@ -prefix="@prefix@" -exec_prefix="@exec_prefix@" -includedir="@includedir@" -libdir="@libdir@" -host="@NTBTLS_CONFIG_HOST@" -api_version="@NTBTLS_CONFIG_API_VERSION@" +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ +host=@NTBTLS_CONFIG_HOST@ +api_version=@NTBTLS_CONFIG_API_VERSION@ Name: ntbtls Description: The Not Too Bad TLS Library ----------------------------------------------------------------------- Summary of changes: src/ntbtls.pc.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 11:55:47 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 11:55:47 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-99-gf74687f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via f74687fd43f5772a372f54031d5a9527597f4ce4 (commit) via e57e75ea517f32109b508113f18298fc69fd1192 (commit) from 149ceb3cae03d0385341d32430aa5ae57de90007 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f74687fd43f5772a372f54031d5a9527597f4ce4 Author: Werner Koch Date: Wed Oct 24 11:55:34 2018 +0200 Fix memory leak in secmem in out of core conditions. * src/secmem.c (_gcry_secmem_malloc_internal): Release pool descriptor if the pool could not be allocated. -- GnuPG-bug-id: 4211 Signed-off-by: Werner Koch diff --git a/src/secmem.c b/src/secmem.c index 79c135f..3e091d8 100644 --- a/src/secmem.c +++ b/src/secmem.c @@ -658,7 +658,10 @@ _gcry_secmem_malloc_internal (size_t size, int xhint) pool->size = auto_expand? auto_expand : STANDARD_POOL_SIZE; pool->mem = malloc (pool->size); if (!pool->mem) - return NULL; /* Not enough memory available for a new pool. */ + { + free (pool); + return NULL; /* Not enough memory available for a new pool. */ + } /* Initialize first memory block. */ mb = (memblock_t *) pool->mem; mb->size = pool->size - BLOCK_HEAD_SIZE; commit e57e75ea517f32109b508113f18298fc69fd1192 Author: Werner Koch Date: Wed Oct 24 11:50:46 2018 +0200 ecc: Fix memory leak in the error case of ecc_encrypt_raw * cipher/ecc.c (ecc_encrypt_raw): Add proper error cleanup in the main block. -- GnuPG-bug-id: 4210 Signed-off-by: Werner Koch diff --git a/cipher/ecc.c b/cipher/ecc.c index 4e3e5b1..3f221a2 100644 --- a/cipher/ecc.c +++ b/cipher/ecc.c @@ -1392,6 +1392,7 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms) unsigned char *rawmpi; unsigned int rawmpilen; + rc = 0; x = mpi_new (0); if (ec->model == MPI_EC_MONTGOMERY) y = NULL; @@ -1418,7 +1419,7 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms) if (!(flags & PUBKEY_FLAG_DJB_TWEAK)) { /* It's not for X25519, then, the input data was simply wrong. */ rc = GPG_ERR_INV_DATA; - goto leave; + goto leave_main; } } if (y) @@ -1443,7 +1444,7 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms) if (_gcry_mpi_ec_get_affine (x, y, &R, ec)) { rc = GPG_ERR_INV_DATA; - goto leave; + goto leave_main; } if (y) mpi_e = _gcry_ecc_ec2os (x, y, pk.E.p); @@ -1461,11 +1462,12 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms) } } - + leave_main: mpi_free (x); mpi_free (y); - point_free (&R); + if (rc) + goto leave; } if (!rc) ----------------------------------------------------------------------- Summary of changes: cipher/ecc.c | 10 ++++++---- src/secmem.c | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 12:06:43 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 12:06:43 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-100-g0cfd41c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 0cfd41c662792cd5707a7bd738c341c29abdb4e7 (commit) from f74687fd43f5772a372f54031d5a9527597f4ce4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0cfd41c662792cd5707a7bd738c341c29abdb4e7 Author: Werner Koch Date: Wed Oct 24 12:06:07 2018 +0200 doc: Update yat2m.c from upstream (libgpg-error) -- GnuPG-bug-id: 4102 Signed-off-by: Werner Koch diff --git a/doc/yat2m.c b/doc/yat2m.c index 7599081..3c7b363 100644 --- a/doc/yat2m.c +++ b/doc/yat2m.c @@ -1,5 +1,5 @@ /* yat2m.c - Yet Another Texi 2 Man converter - * Copyright (C) 2005, 2013, 2015, 2016 g10 Code GmbH + * Copyright (C) 2005, 2013, 2015, 2016, 2017 g10 Code GmbH * Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify @@ -128,7 +128,11 @@ #define PGM "yat2m" -#define VERSION "1.0" +#ifdef PACKAGE_VERSION +# define VERSION PACKAGE_VERSION +#else +# define VERSION "1.0" +#endif /* The maximum length of a line including the linefeed and one extra character. */ @@ -353,7 +357,7 @@ ascii_strupr (char *string) const char * isodatestring (void) { - static char buffer[11+5]; + static char buffer[36]; struct tm *tp; time_t atime; @@ -482,6 +486,9 @@ evaluate_conditions (const char *fname, int lnr) { int i; + (void)fname; + (void)lnr; + /* for (i=0; i < condition_stack_idx; i++) */ /* inf ("%s:%d: stack[%d] %s %s %c", */ /* fname, lnr, i, condition_stack[i]->isset? "set":"clr", */ @@ -729,7 +736,8 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, { "asis", 7 }, { "anchor", 7 }, { "cartouche", 1 }, - { "xref", 0, "see: [", "]" }, + { "ref", 0, "[", "]" }, + { "xref", 0, "See: [", "]" }, { "pxref", 0, "see: [", "]" }, { "uref", 0, "(\\fB", "\\fR)" }, { "footnote",0, " ([", "])" }, @@ -746,7 +754,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, { "subsection", 6, "\n.SS " }, { "chapheading", 0}, { "item", 2, ".TP\n.B " }, - { "itemx", 2, ".TP\n.B " }, + { "itemx", 2, ".TQ\n.B " }, { "table", 3 }, { "itemize", 3 }, { "bullet", 0, "* " }, @@ -793,6 +801,8 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, { if ((*table_level)-- > 1) fputs (".RE\n", fp); + else + fputs (".P\n", fp); } else if (n >= 7 && !memcmp (s, "example", 7) && (!n || s[7] == ' ' || s[7] == '\t' || s[7] == '\n')) @@ -850,18 +860,20 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, } else { - size_t len = s - (rest + 1); + size_t rlen = s - (rest + 1); macro_t m; for (m = variablelist; m; m = m->next) - if (strlen (m->name) == len - &&!strncmp (m->name, rest+1, len)) - break; + { + if (strlen (m->name) == rlen + && !strncmp (m->name, rest+1, rlen)) + break; + } if (m) fputs (m->value, fp); else inf ("texinfo variable '%.*s' is not set", - (int)len, rest+1); + (int)rlen, rest+1); } } break; @@ -1475,6 +1487,7 @@ int main (int argc, char **argv) { int last_argc = -1; + const char *s; opt_source = "GNU"; opt_release = ""; @@ -1513,13 +1526,13 @@ main (int argc, char **argv) " -I DIR also search in include DIR\n" " -D gpgone the only usable define\n\n" "With no FILE, or when FILE is -, read standard input.\n\n" - "Report bugs to ."); + "Report bugs to ."); exit (0); } else if (!strcmp (*argv, "--version")) { puts (PGM " " VERSION "\n" - "Copyright (C) 2005 g10 Code GmbH\n" + "Copyright (C) 2005, 2017 g10 Code GmbH\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "This is free software, and you are welcome to redistribute it\n" "under certain conditions. See the file COPYING for details."); @@ -1608,6 +1621,11 @@ main (int argc, char **argv) if (argc > 1) die ("usage: " PGM " [OPTION] [FILE] (try --help for more information)\n"); + /* Take care of supplied timestamp for reproducible builds. See + * https://reproducible-builds.org/specs/source-date-epoch/ */ + if (!opt_date && (s = getenv ("SOURCE_DATE_EPOCH")) && *s) + opt_date = s; + /* Start processing. */ if (argc && strcmp (*argv, "-")) { ----------------------------------------------------------------------- Summary of changes: doc/yat2m.c | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 12:30:12 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 12:30:12 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-102-g03bb25e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 03bb25ee7ed6f1076bf788ab981ca68672880daa (commit) via b0ad66e48c46b79af69349606e276cf0a6b9a020 (commit) from 0cfd41c662792cd5707a7bd738c341c29abdb4e7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 03bb25ee7ed6f1076bf788ab981ca68672880daa Author: Werner Koch Date: Wed Oct 24 12:24:44 2018 +0200 build: Add release make target * Makefile.am (release, sign-release): New targets. Signed-off-by: Werner Koch diff --git a/Makefile.am b/Makefile.am index 21e91ac..24c362a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,8 +14,17 @@ # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later + +# Location of the released tarball archives. Note that this is an +# internal archive and before uploading this to the public server, +# manual tests should be run and the git release tagged and pushed. +# Adjust as needed. +RELEASE_ARCHIVE_DIR = wk at vigenere:tarballs/libgpg-error/ +# The key used to sign the released sources. Adjust as needed. +RELEASE_SIGNING_KEY = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 + ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = --disable-random-daemon --enable-doc \ @@ -88,3 +97,50 @@ gen-ChangeLog: stowinstall: $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgcrypt + +# Macro to help the release target. +RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) + +release: + +(set -e;\ + if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \ + echo "error: build directory must not be the source directory" >&2;\ + exit 2;\ + fi ;\ + echo "/* Build started at $$(date -uIseconds) */" ;\ + cd $(top_srcdir); \ + ./autogen.sh --force; \ + cd $(abs_top_builddir); \ + rm -rf dist; mkdir dist ; cd dist ; \ + $(abs_top_srcdir)/configure --enable-maintainer-mode; \ + $(MAKE) distcheck; \ + echo "/* Build finished at $$(date -uIseconds) */" ;\ + echo "/*" ;\ + echo " * Please run the final step interactivly:" ;\ + echo " * make sign-release" ;\ + echo " */" ;\ + ) 2>&1 | tee "$(RELEASE_NAME).buildlog" + +sign-release: + +(set -e; \ + cd dist; \ + files1="$(RELEASE_NAME).tar.bz2 \ + $(RELEASE_NAME).tar.gz" ; \ + files2="$(RELEASE_NAME).tar.bz2.sig \ + $(RELEASE_NAME).tar.gz.sig \ + $(RELEASE_NAME).swdb \ + $(RELEASE_NAME).buildlog" ;\ + echo "/* Signing the source tarball ..." ;\ + gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.bz2 ;\ + gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.gz ;\ + cat $(RELEASE_NAME).swdb >swdb.snippet;\ + echo >>swdb.snippet ;\ + sha1sum $${files1} >>swdb.snippet ;\ + cat "../$(RELEASE_NAME).buildlog" swdb.snippet \ + | gzip >$(RELEASE_NAME).buildlog ;\ + echo "Copying to local archive ..." ;\ + scp -p $${files1} $${files2} $(RELEASE_ARCHIVE_DIR)/ || true;\ + echo '/*' ;\ + echo ' * All done; for checksums see dist/swdb.snippet' ;\ + echo ' */' ;\ + ) commit b0ad66e48c46b79af69349606e276cf0a6b9a020 Author: Werner Koch Date: Wed Oct 24 12:23:47 2018 +0200 build: Make distcheck work again. * cipher/Makefile.am: Prettified source file lists. EXTRA_libcipher_la_SOURCES): Add missing asm-common-aarch64.h. Signed-off-by: Werner Koch diff --git a/cipher/Makefile.am b/cipher/Makefile.am index 599e3c1..98320ca 100644 --- a/cipher/Makefile.am +++ b/cipher/Makefile.am @@ -40,75 +40,89 @@ libcipher_la_DEPENDENCIES = $(GCRYPT_MODULES) libcipher_la_LIBADD = $(GCRYPT_MODULES) libcipher_la_SOURCES = \ -cipher.c cipher-internal.h \ -cipher-cbc.c cipher-cfb.c cipher-ofb.c cipher-ctr.c cipher-aeswrap.c \ -cipher-ccm.c cipher-cmac.c cipher-gcm.c cipher-gcm-intel-pclmul.c \ - cipher-gcm-armv8-aarch32-ce.S cipher-gcm-armv8-aarch64-ce.S \ -cipher-poly1305.c cipher-ocb.c cipher-xts.c cipher-eax.c \ -cipher-selftest.c cipher-selftest.h \ -pubkey.c pubkey-internal.h pubkey-util.c \ -md.c \ -mac.c mac-internal.h \ -mac-hmac.c mac-cmac.c mac-gmac.c mac-poly1305.c \ -poly1305.c poly1305-internal.h \ -kdf.c kdf-internal.h \ -hmac-tests.c \ -bithelp.h \ -bufhelp.h \ -primegen.c \ -hash-common.c hash-common.h \ -dsa-common.c rsa-common.c \ -sha1.h + cipher.c cipher-internal.h \ + cipher-cbc.c \ + cipher-cfb.c \ + cipher-ofb.c \ + cipher-ctr.c \ + cipher-aeswrap.c \ + cipher-ccm.c \ + cipher-cmac.c \ + cipher-gcm.c cipher-gcm-intel-pclmul.c \ + cipher-gcm-armv8-aarch32-ce.S cipher-gcm-armv8-aarch64-ce.S \ + cipher-poly1305.c \ + cipher-ocb.c \ + cipher-xts.c \ + cipher-eax.c \ + cipher-selftest.c cipher-selftest.h \ + pubkey.c pubkey-internal.h pubkey-util.c \ + md.c \ + mac.c mac-internal.h \ + mac-hmac.c mac-cmac.c mac-gmac.c mac-poly1305.c \ + poly1305.c poly1305-internal.h \ + kdf.c kdf-internal.h \ + hmac-tests.c \ + bithelp.h \ + bufhelp.h \ + primegen.c \ + hash-common.c hash-common.h \ + dsa-common.c rsa-common.c \ + sha1.h EXTRA_libcipher_la_SOURCES = \ -asm-common-amd64.h \ -arcfour.c arcfour-amd64.S \ -blowfish.c blowfish-amd64.S blowfish-arm.S \ -cast5.c cast5-amd64.S cast5-arm.S \ -chacha20.c chacha20-amd64-ssse3.S chacha20-amd64-avx2.S chacha20-armv7-neon.S \ - chacha20-aarch64.S \ -crc.c \ - crc-intel-pclmul.c \ -des.c des-amd64.S \ -dsa.c \ -elgamal.c \ -ecc.c ecc-curves.c ecc-misc.c ecc-common.h \ -ecc-ecdsa.c ecc-eddsa.c ecc-gost.c \ -idea.c \ -gost28147.c gost.h \ -gostr3411-94.c \ -md4.c \ -md5.c \ -rijndael.c rijndael-internal.h rijndael-tables.h rijndael-aesni.c \ - rijndael-padlock.c rijndael-amd64.S rijndael-arm.S \ - rijndael-ssse3-amd64.c rijndael-ssse3-amd64-asm.S \ - rijndael-armv8-ce.c rijndael-armv8-aarch32-ce.S rijndael-armv8-aarch64-ce.S \ - rijndael-aarch64.S \ -rmd160.c \ -rsa.c \ -salsa20.c salsa20-amd64.S salsa20-armv7-neon.S \ -scrypt.c \ -seed.c \ -serpent.c serpent-sse2-amd64.S serpent-avx2-amd64.S serpent-armv7-neon.S \ -sha1.c sha1-ssse3-amd64.S sha1-avx-amd64.S sha1-avx-bmi2-amd64.S \ - sha1-armv7-neon.S sha1-armv8-aarch32-ce.S sha1-armv8-aarch64-ce.S \ - sha1-intel-shaext.c \ -sha256.c sha256-ssse3-amd64.S sha256-avx-amd64.S sha256-avx2-bmi2-amd64.S \ - sha256-armv8-aarch32-ce.S sha256-armv8-aarch64-ce.S sha256-intel-shaext.c \ -sha512.c sha512-ssse3-amd64.S sha512-avx-amd64.S sha512-avx2-bmi2-amd64.S \ - sha512-armv7-neon.S sha512-arm.S \ -sm3.c \ -keccak.c keccak_permute_32.h keccak_permute_64.h keccak-armv7-neon.S \ -stribog.c \ -tiger.c \ -whirlpool.c whirlpool-sse2-amd64.S \ -twofish.c twofish-amd64.S twofish-arm.S twofish-aarch64.S \ - twofish-avx2-amd64.S \ -rfc2268.c \ -camellia.c camellia.h camellia-glue.c camellia-aesni-avx-amd64.S \ - camellia-aesni-avx2-amd64.S camellia-arm.S camellia-aarch64.S \ -blake2.c \ - blake2b-amd64-avx2.S blake2s-amd64-avx.S + asm-common-amd64.h \ + asm-common-aarch64.h \ + arcfour.c arcfour-amd64.S \ + blowfish.c blowfish-amd64.S blowfish-arm.S \ + cast5.c cast5-amd64.S cast5-arm.S \ + chacha20.c chacha20-amd64-ssse3.S chacha20-amd64-avx2.S \ + chacha20-armv7-neon.S chacha20-aarch64.S \ + crc.c crc-intel-pclmul.c \ + des.c des-amd64.S \ + dsa.c \ + elgamal.c \ + ecc.c ecc-curves.c ecc-misc.c ecc-common.h \ + ecc-ecdsa.c ecc-eddsa.c ecc-gost.c \ + idea.c \ + gost28147.c gost.h \ + gostr3411-94.c \ + md4.c \ + md5.c \ + rijndael.c rijndael-internal.h rijndael-tables.h \ + rijndael-aesni.c rijndael-padlock.c \ + rijndael-amd64.S rijndael-arm.S \ + rijndael-ssse3-amd64.c rijndael-ssse3-amd64-asm.S \ + rijndael-armv8-ce.c rijndael-armv8-aarch32-ce.S \ + rijndael-armv8-aarch64-ce.S rijndael-aarch64.S \ + rmd160.c \ + rsa.c \ + salsa20.c salsa20-amd64.S salsa20-armv7-neon.S \ + scrypt.c \ + seed.c \ + serpent.c serpent-sse2-amd64.S \ + serpent-avx2-amd64.S serpent-armv7-neon.S \ + sha1.c sha1-ssse3-amd64.S sha1-avx-amd64.S sha1-avx-bmi2-amd64.S \ + sha1-armv7-neon.S sha1-armv8-aarch32-ce.S sha1-armv8-aarch64-ce.S \ + sha1-intel-shaext.c \ + sha256.c sha256-ssse3-amd64.S sha256-avx-amd64.S \ + sha256-avx2-bmi2-amd64.S \ + sha256-armv8-aarch32-ce.S sha256-armv8-aarch64-ce.S \ + sha256-intel-shaext.c \ + sha512.c sha512-ssse3-amd64.S sha512-avx-amd64.S \ + sha512-avx2-bmi2-amd64.S \ + sha512-armv7-neon.S sha512-arm.S \ + sm3.c \ + keccak.c keccak_permute_32.h keccak_permute_64.h keccak-armv7-neon.S \ + stribog.c \ + tiger.c \ + whirlpool.c whirlpool-sse2-amd64.S \ + twofish.c twofish-amd64.S twofish-arm.S twofish-aarch64.S \ + twofish-avx2-amd64.S \ + rfc2268.c \ + camellia.c camellia.h camellia-glue.c camellia-aesni-avx-amd64.S \ + camellia-aesni-avx2-amd64.S camellia-arm.S camellia-aarch64.S \ + blake2.c \ + blake2b-amd64-avx2.S blake2s-amd64-avx.S gost28147.lo: gost-sb.h gost-sb.h: gost-s-box ----------------------------------------------------------------------- Summary of changes: Makefile.am | 60 +++++++++++++++++++++- cipher/Makefile.am | 148 +++++++++++++++++++++++++++++------------------------ 2 files changed, 139 insertions(+), 69 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 12:32:25 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 12:32:25 +0200 Subject: [git] GCRYPT - branch, LIBGCRYPT-1.8-BRANCH, updated. libgcrypt-1.8.3-10-g99a5bab Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1.8-BRANCH has been updated via 99a5babfd1e759310db8ab8b11d182f2e139dfb1 (commit) via 4e044b80b296f94a4cd011ddd7e2b3a5abb1a254 (commit) via abd267bf239345ceae5c0de239d1530b427a53a1 (commit) via 60224352f4de1189e0076c6172886dc787a1e6e6 (commit) via 347987d4cf29b6a611b7fafa14fddeb50c0651d2 (commit) via 7f4de8bab99181b244b40f721fc8297b4374ecbe (commit) via be68b3ee4fd1f85edc95eaad11c8fd52ccd27ccd (commit) via 8cc7cac82ec2087c3e1ece56dbd12855a383f090 (commit) from 20c034865f2dd15ce2871385b6e29c15d1570539 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 99a5babfd1e759310db8ab8b11d182f2e139dfb1 Author: Werner Koch Date: Wed Oct 24 12:24:44 2018 +0200 build: Add release make target * Makefile.am (release, sign-release): New targets. Signed-off-by: Werner Koch (cherry picked from commit 03bb25ee7ed6f1076bf788ab981ca68672880daa) diff --git a/Makefile.am b/Makefile.am index f97af7f..452cb96 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,8 +14,17 @@ # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public -# License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# License along with this program; if not, see . +# SPDX-License-Identifier: LGPL-2.1-or-later + +# Location of the released tarball archives. Note that this is an +# internal archive and before uploading this to the public server, +# manual tests should be run and the git release tagged and pushed. +# Adjust as needed. +RELEASE_ARCHIVE_DIR = wk at vigenere:tarballs/libgpg-error/ +# The key used to sign the released sources. Adjust as needed. +RELEASE_SIGNING_KEY = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 + ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = --disable-random-daemon --enable-doc \ @@ -92,3 +101,50 @@ gen-ChangeLog: stowinstall: $(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgcrypt + +# Macro to help the release target. +RELEASE_NAME = $(PACKAGE_TARNAME)-$(PACKAGE_VERSION) + +release: + +(set -e;\ + if [ "$(abs_top_builddir)" = "$(abs_top_srcdir)" ]; then \ + echo "error: build directory must not be the source directory" >&2;\ + exit 2;\ + fi ;\ + echo "/* Build started at $$(date -uIseconds) */" ;\ + cd $(top_srcdir); \ + ./autogen.sh --force; \ + cd $(abs_top_builddir); \ + rm -rf dist; mkdir dist ; cd dist ; \ + $(abs_top_srcdir)/configure --enable-maintainer-mode; \ + $(MAKE) distcheck; \ + echo "/* Build finished at $$(date -uIseconds) */" ;\ + echo "/*" ;\ + echo " * Please run the final step interactivly:" ;\ + echo " * make sign-release" ;\ + echo " */" ;\ + ) 2>&1 | tee "$(RELEASE_NAME).buildlog" + +sign-release: + +(set -e; \ + cd dist; \ + files1="$(RELEASE_NAME).tar.bz2 \ + $(RELEASE_NAME).tar.gz" ; \ + files2="$(RELEASE_NAME).tar.bz2.sig \ + $(RELEASE_NAME).tar.gz.sig \ + $(RELEASE_NAME).swdb \ + $(RELEASE_NAME).buildlog" ;\ + echo "/* Signing the source tarball ..." ;\ + gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.bz2 ;\ + gpg -sbu $(RELEASE_SIGNING_KEY) $(RELEASE_NAME).tar.gz ;\ + cat $(RELEASE_NAME).swdb >swdb.snippet;\ + echo >>swdb.snippet ;\ + sha1sum $${files1} >>swdb.snippet ;\ + cat "../$(RELEASE_NAME).buildlog" swdb.snippet \ + | gzip >$(RELEASE_NAME).buildlog ;\ + echo "Copying to local archive ..." ;\ + scp -p $${files1} $${files2} $(RELEASE_ARCHIVE_DIR)/ || true;\ + echo '/*' ;\ + echo ' * All done; for checksums see dist/swdb.snippet' ;\ + echo ' */' ;\ + ) commit 4e044b80b296f94a4cd011ddd7e2b3a5abb1a254 Author: Werner Koch Date: Wed Oct 24 12:06:07 2018 +0200 doc: Update yat2m.c from upstream (libgpg-error) -- GnuPG-bug-id: 4102 Signed-off-by: Werner Koch (cherry picked from commit 0cfd41c662792cd5707a7bd738c341c29abdb4e7) diff --git a/doc/yat2m.c b/doc/yat2m.c index 7599081..3c7b363 100644 --- a/doc/yat2m.c +++ b/doc/yat2m.c @@ -1,5 +1,5 @@ /* yat2m.c - Yet Another Texi 2 Man converter - * Copyright (C) 2005, 2013, 2015, 2016 g10 Code GmbH + * Copyright (C) 2005, 2013, 2015, 2016, 2017 g10 Code GmbH * Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify @@ -128,7 +128,11 @@ #define PGM "yat2m" -#define VERSION "1.0" +#ifdef PACKAGE_VERSION +# define VERSION PACKAGE_VERSION +#else +# define VERSION "1.0" +#endif /* The maximum length of a line including the linefeed and one extra character. */ @@ -353,7 +357,7 @@ ascii_strupr (char *string) const char * isodatestring (void) { - static char buffer[11+5]; + static char buffer[36]; struct tm *tp; time_t atime; @@ -482,6 +486,9 @@ evaluate_conditions (const char *fname, int lnr) { int i; + (void)fname; + (void)lnr; + /* for (i=0; i < condition_stack_idx; i++) */ /* inf ("%s:%d: stack[%d] %s %s %c", */ /* fname, lnr, i, condition_stack[i]->isset? "set":"clr", */ @@ -729,7 +736,8 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, { "asis", 7 }, { "anchor", 7 }, { "cartouche", 1 }, - { "xref", 0, "see: [", "]" }, + { "ref", 0, "[", "]" }, + { "xref", 0, "See: [", "]" }, { "pxref", 0, "see: [", "]" }, { "uref", 0, "(\\fB", "\\fR)" }, { "footnote",0, " ([", "])" }, @@ -746,7 +754,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, { "subsection", 6, "\n.SS " }, { "chapheading", 0}, { "item", 2, ".TP\n.B " }, - { "itemx", 2, ".TP\n.B " }, + { "itemx", 2, ".TQ\n.B " }, { "table", 3 }, { "itemize", 3 }, { "bullet", 0, "* " }, @@ -793,6 +801,8 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, { if ((*table_level)-- > 1) fputs (".RE\n", fp); + else + fputs (".P\n", fp); } else if (n >= 7 && !memcmp (s, "example", 7) && (!n || s[7] == ' ' || s[7] == '\t' || s[7] == '\n')) @@ -850,18 +860,20 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len, } else { - size_t len = s - (rest + 1); + size_t rlen = s - (rest + 1); macro_t m; for (m = variablelist; m; m = m->next) - if (strlen (m->name) == len - &&!strncmp (m->name, rest+1, len)) - break; + { + if (strlen (m->name) == rlen + && !strncmp (m->name, rest+1, rlen)) + break; + } if (m) fputs (m->value, fp); else inf ("texinfo variable '%.*s' is not set", - (int)len, rest+1); + (int)rlen, rest+1); } } break; @@ -1475,6 +1487,7 @@ int main (int argc, char **argv) { int last_argc = -1; + const char *s; opt_source = "GNU"; opt_release = ""; @@ -1513,13 +1526,13 @@ main (int argc, char **argv) " -I DIR also search in include DIR\n" " -D gpgone the only usable define\n\n" "With no FILE, or when FILE is -, read standard input.\n\n" - "Report bugs to ."); + "Report bugs to ."); exit (0); } else if (!strcmp (*argv, "--version")) { puts (PGM " " VERSION "\n" - "Copyright (C) 2005 g10 Code GmbH\n" + "Copyright (C) 2005, 2017 g10 Code GmbH\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "This is free software, and you are welcome to redistribute it\n" "under certain conditions. See the file COPYING for details."); @@ -1608,6 +1621,11 @@ main (int argc, char **argv) if (argc > 1) die ("usage: " PGM " [OPTION] [FILE] (try --help for more information)\n"); + /* Take care of supplied timestamp for reproducible builds. See + * https://reproducible-builds.org/specs/source-date-epoch/ */ + if (!opt_date && (s = getenv ("SOURCE_DATE_EPOCH")) && *s) + opt_date = s; + /* Start processing. */ if (argc && strcmp (*argv, "-")) { commit abd267bf239345ceae5c0de239d1530b427a53a1 Author: Werner Koch Date: Wed Oct 24 11:55:34 2018 +0200 Fix memory leak in secmem in out of core conditions. * src/secmem.c (_gcry_secmem_malloc_internal): Release pool descriptor if the pool could not be allocated. -- GnuPG-bug-id: 4211 Signed-off-by: Werner Koch (cherry picked from commit f74687fd43f5772a372f54031d5a9527597f4ce4) diff --git a/src/secmem.c b/src/secmem.c index 79c135f..3e091d8 100644 --- a/src/secmem.c +++ b/src/secmem.c @@ -658,7 +658,10 @@ _gcry_secmem_malloc_internal (size_t size, int xhint) pool->size = auto_expand? auto_expand : STANDARD_POOL_SIZE; pool->mem = malloc (pool->size); if (!pool->mem) - return NULL; /* Not enough memory available for a new pool. */ + { + free (pool); + return NULL; /* Not enough memory available for a new pool. */ + } /* Initialize first memory block. */ mb = (memblock_t *) pool->mem; mb->size = pool->size - BLOCK_HEAD_SIZE; commit 60224352f4de1189e0076c6172886dc787a1e6e6 Author: Werner Koch Date: Wed Oct 24 11:50:46 2018 +0200 ecc: Fix memory leak in the error case of ecc_encrypt_raw * cipher/ecc.c (ecc_encrypt_raw): Add proper error cleanup in the main block. -- GnuPG-bug-id: 4210 Signed-off-by: Werner Koch (cherry picked from commit e57e75ea517f32109b508113f18298fc69fd1192) diff --git a/cipher/ecc.c b/cipher/ecc.c index 4e3e5b1..3f221a2 100644 --- a/cipher/ecc.c +++ b/cipher/ecc.c @@ -1392,6 +1392,7 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms) unsigned char *rawmpi; unsigned int rawmpilen; + rc = 0; x = mpi_new (0); if (ec->model == MPI_EC_MONTGOMERY) y = NULL; @@ -1418,7 +1419,7 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms) if (!(flags & PUBKEY_FLAG_DJB_TWEAK)) { /* It's not for X25519, then, the input data was simply wrong. */ rc = GPG_ERR_INV_DATA; - goto leave; + goto leave_main; } } if (y) @@ -1443,7 +1444,7 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms) if (_gcry_mpi_ec_get_affine (x, y, &R, ec)) { rc = GPG_ERR_INV_DATA; - goto leave; + goto leave_main; } if (y) mpi_e = _gcry_ecc_ec2os (x, y, pk.E.p); @@ -1461,11 +1462,12 @@ ecc_encrypt_raw (gcry_sexp_t *r_ciph, gcry_sexp_t s_data, gcry_sexp_t keyparms) } } - + leave_main: mpi_free (x); mpi_free (y); - point_free (&R); + if (rc) + goto leave; } if (!rc) commit 347987d4cf29b6a611b7fafa14fddeb50c0651d2 Author: Werner Koch Date: Wed Oct 24 09:50:17 2018 +0200 ecc: Fix possible memory leakage in parameter check of eddsa. * cipher/ecc-eddsa.c (_gcry_ecc_eddsa_verify): Fix mem leak. -- GnuPG-bug-id: 4209 Signed-off-by: Werner Koch (cherry picked from commit 149ceb3cae03d0385341d32430aa5ae57de90007) diff --git a/cipher/ecc-eddsa.c b/cipher/ecc-eddsa.c index 813e030..89b708a 100644 --- a/cipher/ecc-eddsa.c +++ b/cipher/ecc-eddsa.c @@ -760,7 +760,10 @@ _gcry_ecc_eddsa_verify (gcry_mpi_t input, ECC_public_key *pkey, pkey->E.p, pkey->E.a, pkey->E.b); b = ctx->nbits/8; if (b != 256/8) - return GPG_ERR_INTERNAL; /* We only support 256 bit. */ + { + rc = GPG_ERR_INTERNAL; /* We only support 256 bit. */ + goto leave; + } /* Decode and check the public key. */ rc = _gcry_ecc_eddsa_decodepoint (pk, ctx, &Q, &encpk, &encpklen); commit 7f4de8bab99181b244b40f721fc8297b4374ecbe Author: Werner Koch Date: Thu Jun 14 10:39:53 2018 +0200 doc: Fix example for gcry_sexp_extract_param -- (cherry picked from commit 282f238f7788267768e823c0976aff15aeaff103) diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index c18b498..c32748f 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -4454,14 +4454,15 @@ an @code{gcry_mpi_t} variable is expected that must be set to is expected. For example @example - _gcry_sexp_extract_param (key, NULL, "n/x+e d-'foo'", - &mpi_n, &mpi_x, &mpi_e, &mpi_foo, NULL) + gcry_sexp_extract_param (key, NULL, "n/x+e d-'foo'", + &mpi_n, &mpi_x, &mpi_e, &mpi_d, &mpi_foo, NULL) @end example stores the parameter 'n' from @var{key} as an unsigned MPI into @var{mpi_n}, the parameter 'x' as an opaque MPI into @var{mpi_x}, the -parameter 'e' again as an unsigned MPI into @var{mpi_e}, and the -parameter 'foo' as a signed MPI. +parameters 'e' and 'd' again as an unsigned MPI into @var{mpi_e} and + at var{mpi_d} and finally the parameter 'foo' as a signed MPI into + at var{mpi_foo}. @var{path} is an optional string used to locate a token. The exclamation mark separated tokens are used via commit be68b3ee4fd1f85edc95eaad11c8fd52ccd27ccd Author: Werner Koch Date: Tue Oct 23 22:58:09 2018 +0200 ecc: Fix potential unintended freeing of an internal param. * cipher/ecc-curves.c (_gcry_ecc_get_mpi): Fix c+p error -- GnuPG-bug-id: 4208 Signed-off-by: Werner Koch (cherry picked from commit e2da4e8dee4b371804f3b2659b53431fb6380d93) diff --git a/cipher/ecc-curves.c b/cipher/ecc-curves.c index 3488ed3..39bad1a 100644 --- a/cipher/ecc-curves.c +++ b/cipher/ecc-curves.c @@ -1193,7 +1193,7 @@ _gcry_ecc_get_mpi (const char *name, mpi_ec_t ec, int copy) if (!strcmp (name, "q.x") && ec->Q && ec->Q->x) return mpi_is_const (ec->Q->x) && !copy? ec->Q->x : mpi_copy (ec->Q->x); if (!strcmp (name, "q.y") && ec->Q && ec->Q->y) - return mpi_is_const (ec->G->y) && !copy? ec->Q->y : mpi_copy (ec->Q->y); + return mpi_is_const (ec->Q->y) && !copy? ec->Q->y : mpi_copy (ec->Q->y); /* If the base point has been requested, return it in standard encoding. */ commit 8cc7cac82ec2087c3e1ece56dbd12855a383f090 Author: Werner Koch Date: Tue Oct 23 22:51:40 2018 +0200 sexp: Fix uninitialized use of a var in the error case. * src/sexp.c (_gcry_sexp_vextract_param): Initialize L1. -- GnuPG-bug-id: 4212 Signed-off-by: Werner Koch (cherry picked from commit 9f2c7ec4d8b07e82663ad084c90c016d3c3b80c2) diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index 89b1303..75c49a0 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -1311,7 +1311,7 @@ gpg_error_t gcry_md_extract (gcry_md_hd_t hd, int algo, void *buffer, size_t length); /* Convenience function to calculate the hash from the data in BUFFER - of size LENGTH using the algorithm ALGO avoiding the creating of a + of size LENGTH using the algorithm ALGO avoiding the creation of a hash object. The hash is returned in the caller provided buffer DIGEST which must be large enough to hold the digest of the given algorithm. */ diff --git a/src/sexp.c b/src/sexp.c index 9d89268..f2a164c 100644 --- a/src/sexp.c +++ b/src/sexp.c @@ -2232,7 +2232,7 @@ _gcry_sexp_vextract_param (gcry_sexp_t sexp, const char *path, gcry_mpi_t *array[20]; char arrayisdesc[20]; int idx; - gcry_sexp_t l1; + gcry_sexp_t l1 = NULL; int mode = '+'; /* Default to GCRYMPI_FMT_USG. */ gcry_sexp_t freethis = NULL; ----------------------------------------------------------------------- Summary of changes: Makefile.am | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++-- cipher/ecc-curves.c | 2 +- cipher/ecc-eddsa.c | 5 ++++- cipher/ecc.c | 10 +++++---- doc/gcrypt.texi | 9 ++++---- doc/yat2m.c | 42 ++++++++++++++++++++++++++----------- src/gcrypt.h.in | 2 +- src/secmem.c | 5 ++++- src/sexp.c | 2 +- 9 files changed, 110 insertions(+), 27 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 12:59:05 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 24 Oct 2018 12:59:05 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-7-g0ab051a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 0ab051af6406cb877200f651ca23ebf1ead6482a (commit) via ffeeda76a797633952370cc3c10548229042536f (commit) from a9f1c04e2933ca8f3dbdfda546bc191383f6d5a3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0ab051af6406cb877200f651ca23ebf1ead6482a Author: Andre Heinecke Date: Wed Oct 24 12:53:05 2018 +0200 Add temporary logging to readRegStr * src/common.cpp (readRegStr): Add temporary verbose logging. -- This will be reverted after a little beta release to debug an on site issue. diff --git a/src/common.cpp b/src/common.cpp index 72fa16f..ef232b4 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -108,6 +108,15 @@ get_root_key(const char *root) return root_key; } +const char *nullguard (const char *str) +{ + if (str) + { + return str; + } + return "null"; +} + static std::string readRegStr (const char *root, const char *dir, const char *name) { @@ -120,34 +129,47 @@ readRegStr (const char *root, const char *dir, const char *name) DWORD n1, nbytes, type; std::string ret; + log_debug ("Read reg str root: '%s', '%s', '%s'", + nullguard(root), nullguard(dir), nullguard(name)); + if (!(root_key = get_root_key(root))) { + log_debug("Failed to get root key"); return ret; } if (RegOpenKeyExA(root_key, dir, 0, KEY_READ, &key_handle)) { + log_debug("Failed to open root"); if (root) { + log_debug("Failed to open root with forced root"); /* no need for a RegClose, so return direct */ return ret; } /* Fallback to HKLM */ + log_debug("Fallback to HKLM"); if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { + log_debug("HKLM open failed"); return ret; } } nbytes = 1; if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { + log_debug("Query Value failed"); if (root) { + log_debug("Forced root: bail!"); RegCloseKey (key_handle); return ret; } /* Try to fallback to HKLM also vor a missing value. */ + log_debug("HKLM Value fallback!"); RegCloseKey (key_handle); if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { + log_debug("Failed to open key"); return ret; } if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { + log_debug("Failed to open fallback value for %s", nullguard(name)); RegCloseKey(key_handle); return ret; } @@ -155,6 +177,7 @@ readRegStr (const char *root, const char *dir, const char *name) n1 = nbytes+1; char result[n1]; if (RegQueryValueExA(key_handle, name, 0, &type, (LPBYTE)result, &n1)) { + log_debug ("Query Value real failed"); RegCloseKey(key_handle); return ret; } @@ -181,6 +204,7 @@ readRegStr (const char *root, const char *dir, const char *name) ret = tmp; } } + log_debug ("returning: %s", ret.c_str ()); return ret; #endif } commit ffeeda76a797633952370cc3c10548229042536f Author: Andre Heinecke Date: Wed Oct 24 12:51:26 2018 +0200 Pseudonym some more without DBG_DATA * src/oomhelp.cpp (get_sender_SentRepresentingAddress): anonstr. * src/mimemaker.cpp (write_part): Anonstr filename. diff --git a/src/mimemaker.cpp b/src/mimemaker.cpp index 7adb25b..acec070 100644 --- a/src/mimemaker.cpp +++ b/src/mimemaker.cpp @@ -901,7 +901,7 @@ write_part (sink_t sink, const char *data, size_t datalen, log_debug ("Writing part of length %d%s filename=`%s'\n", (int)datalen, is_mapibody? " (body)":"", - filename?filename:"[none]"); + filename ? anonstr (filename) : "[none]"); ct = infer_content_type (data, datalen, filename, is_mapibody, &use_b64); use_qp = 0; diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp index b859cb7..9ac1083 100644 --- a/src/oomhelp.cpp +++ b/src/oomhelp.cpp @@ -2522,7 +2522,7 @@ get_sender_SentRepresentingAddress (LPDISPATCH mailitem) if (buf && strlen (buf)) { log_debug ("%s:%s Found sent representing address \"%s\"", - SRCNAME, __func__, buf); + SRCNAME, __func__, anonstr (buf)); TRETURN buf; } xfree (buf); ----------------------------------------------------------------------- Summary of changes: src/common.cpp | 24 ++++++++++++++++++++++++ src/mimemaker.cpp | 2 +- src/oomhelp.cpp | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 13:05:06 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 24 Oct 2018 13:05:06 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-8-g56ea58e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 56ea58e405b57dcc46f6e8a02dd8dca5a619ef31 (commit) from 0ab051af6406cb877200f651ca23ebf1ead6482a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 56ea58e405b57dcc46f6e8a02dd8dca5a619ef31 Author: Andre Heinecke Date: Wed Oct 24 13:04:39 2018 +0200 Addionally add outputdebugstring debugs -- This commit is also temporary. diff --git a/src/common.cpp b/src/common.cpp index ef232b4..71192e1 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -132,14 +132,22 @@ readRegStr (const char *root, const char *dir, const char *name) log_debug ("Read reg str root: '%s', '%s', '%s'", nullguard(root), nullguard(dir), nullguard(name)); + OutputDebugStringA ("----GPGOL Registry load one value start ----"); + OutputDebugStringA (nullguard (root)); + OutputDebugStringA (nullguard (dir)); + OutputDebugStringA (nullguard (name)); + if (!(root_key = get_root_key(root))) { + OutputDebugStringA ("TRACE 1"); log_debug("Failed to get root key"); return ret; } if (RegOpenKeyExA(root_key, dir, 0, KEY_READ, &key_handle)) { + OutputDebugStringA ("TRACE 2"); log_debug("Failed to open root"); if (root) { + OutputDebugStringA ("TRACE 3"); log_debug("Failed to open root with forced root"); /* no need for a RegClose, so return direct */ return ret; @@ -147,7 +155,9 @@ readRegStr (const char *root, const char *dir, const char *name) /* Fallback to HKLM */ log_debug("Fallback to HKLM"); + OutputDebugStringA ("TRACE 4"); if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { + OutputDebugStringA ("TRACE 5"); log_debug("HKLM open failed"); return ret; } @@ -155,20 +165,25 @@ readRegStr (const char *root, const char *dir, const char *name) nbytes = 1; if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { + OutputDebugStringA ("TRACE 6"); log_debug("Query Value failed"); if (root) { log_debug("Forced root: bail!"); + OutputDebugStringA ("TRACE 7"); RegCloseKey (key_handle); return ret; } /* Try to fallback to HKLM also vor a missing value. */ log_debug("HKLM Value fallback!"); + OutputDebugStringA ("TRACE 8"); RegCloseKey (key_handle); if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { + OutputDebugStringA ("TRACE 9"); log_debug("Failed to open key"); return ret; } if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { + OutputDebugStringA ("TRACE 10"); log_debug("Failed to open fallback value for %s", nullguard(name)); RegCloseKey(key_handle); return ret; @@ -177,6 +192,7 @@ readRegStr (const char *root, const char *dir, const char *name) n1 = nbytes+1; char result[n1]; if (RegQueryValueExA(key_handle, name, 0, &type, (LPBYTE)result, &n1)) { + OutputDebugStringA ("TRACE 11"); log_debug ("Query Value real failed"); RegCloseKey(key_handle); return ret; @@ -204,6 +220,9 @@ readRegStr (const char *root, const char *dir, const char *name) ret = tmp; } } + OutputDebugStringA ("Value is:"); + OutputDebugStringA (ret.c_str ()); + OutputDebugStringA ("-------------- Load one value end ----------"); log_debug ("returning: %s", ret.c_str ()); return ret; #endif ----------------------------------------------------------------------- Summary of changes: src/common.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 14:46:14 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 24 Oct 2018 14:46:14 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-11-g2fbb76c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 2fbb76c2d31813399203882eca98866566363815 (commit) via c321d3c3394bd04cb1f12be288f6e5cacb3fba32 (commit) via ba8e0516d784a366d676350ae9e87fed41d89224 (commit) from 56ea58e405b57dcc46f6e8a02dd8dca5a619ef31 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2fbb76c2d31813399203882eca98866566363815 Author: Andre Heinecke Date: Wed Oct 24 14:45:33 2018 +0200 Pass --w64 parameter to gpgolconfig * src/addin-options.cpp (open_gpgolconfig): Pass --64 on 64 bit systems. diff --git a/src/addin-options.cpp b/src/addin-options.cpp index 137d880..c228b17 100644 --- a/src/addin-options.cpp +++ b/src/addin-options.cpp @@ -188,6 +188,10 @@ open_gpgolconfig (LPVOID arg) args.push_back (std::string ("--lang")); args.push_back (std::string (gettext_localename ())); +#ifdef _WIN64 + args.push_back (std::string ("--w64")); +#endif + auto ctx = GpgME::Context::createForEngine (GpgME::SpawnEngine); if (!ctx) { commit c321d3c3394bd04cb1f12be288f6e5cacb3fba32 Author: Andre Heinecke Date: Wed Oct 24 13:16:06 2018 +0200 Revert "Add temporary logging to readRegStr" This reverts commit 0ab051af6406cb877200f651ca23ebf1ead6482a. diff --git a/src/common.cpp b/src/common.cpp index ef232b4..72fa16f 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -108,15 +108,6 @@ get_root_key(const char *root) return root_key; } -const char *nullguard (const char *str) -{ - if (str) - { - return str; - } - return "null"; -} - static std::string readRegStr (const char *root, const char *dir, const char *name) { @@ -129,47 +120,34 @@ readRegStr (const char *root, const char *dir, const char *name) DWORD n1, nbytes, type; std::string ret; - log_debug ("Read reg str root: '%s', '%s', '%s'", - nullguard(root), nullguard(dir), nullguard(name)); - if (!(root_key = get_root_key(root))) { - log_debug("Failed to get root key"); return ret; } if (RegOpenKeyExA(root_key, dir, 0, KEY_READ, &key_handle)) { - log_debug("Failed to open root"); if (root) { - log_debug("Failed to open root with forced root"); /* no need for a RegClose, so return direct */ return ret; } /* Fallback to HKLM */ - log_debug("Fallback to HKLM"); if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { - log_debug("HKLM open failed"); return ret; } } nbytes = 1; if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { - log_debug("Query Value failed"); if (root) { - log_debug("Forced root: bail!"); RegCloseKey (key_handle); return ret; } /* Try to fallback to HKLM also vor a missing value. */ - log_debug("HKLM Value fallback!"); RegCloseKey (key_handle); if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { - log_debug("Failed to open key"); return ret; } if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { - log_debug("Failed to open fallback value for %s", nullguard(name)); RegCloseKey(key_handle); return ret; } @@ -177,7 +155,6 @@ readRegStr (const char *root, const char *dir, const char *name) n1 = nbytes+1; char result[n1]; if (RegQueryValueExA(key_handle, name, 0, &type, (LPBYTE)result, &n1)) { - log_debug ("Query Value real failed"); RegCloseKey(key_handle); return ret; } @@ -204,7 +181,6 @@ readRegStr (const char *root, const char *dir, const char *name) ret = tmp; } } - log_debug ("returning: %s", ret.c_str ()); return ret; #endif } commit ba8e0516d784a366d676350ae9e87fed41d89224 Author: Andre Heinecke Date: Wed Oct 24 13:15:57 2018 +0200 Revert "Addionally add outputdebugstring debugs" This reverts commit 56ea58e405b57dcc46f6e8a02dd8dca5a619ef31. diff --git a/src/common.cpp b/src/common.cpp index 71192e1..ef232b4 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -132,22 +132,14 @@ readRegStr (const char *root, const char *dir, const char *name) log_debug ("Read reg str root: '%s', '%s', '%s'", nullguard(root), nullguard(dir), nullguard(name)); - OutputDebugStringA ("----GPGOL Registry load one value start ----"); - OutputDebugStringA (nullguard (root)); - OutputDebugStringA (nullguard (dir)); - OutputDebugStringA (nullguard (name)); - if (!(root_key = get_root_key(root))) { - OutputDebugStringA ("TRACE 1"); log_debug("Failed to get root key"); return ret; } if (RegOpenKeyExA(root_key, dir, 0, KEY_READ, &key_handle)) { - OutputDebugStringA ("TRACE 2"); log_debug("Failed to open root"); if (root) { - OutputDebugStringA ("TRACE 3"); log_debug("Failed to open root with forced root"); /* no need for a RegClose, so return direct */ return ret; @@ -155,9 +147,7 @@ readRegStr (const char *root, const char *dir, const char *name) /* Fallback to HKLM */ log_debug("Fallback to HKLM"); - OutputDebugStringA ("TRACE 4"); if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { - OutputDebugStringA ("TRACE 5"); log_debug("HKLM open failed"); return ret; } @@ -165,25 +155,20 @@ readRegStr (const char *root, const char *dir, const char *name) nbytes = 1; if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { - OutputDebugStringA ("TRACE 6"); log_debug("Query Value failed"); if (root) { log_debug("Forced root: bail!"); - OutputDebugStringA ("TRACE 7"); RegCloseKey (key_handle); return ret; } /* Try to fallback to HKLM also vor a missing value. */ log_debug("HKLM Value fallback!"); - OutputDebugStringA ("TRACE 8"); RegCloseKey (key_handle); if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { - OutputDebugStringA ("TRACE 9"); log_debug("Failed to open key"); return ret; } if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { - OutputDebugStringA ("TRACE 10"); log_debug("Failed to open fallback value for %s", nullguard(name)); RegCloseKey(key_handle); return ret; @@ -192,7 +177,6 @@ readRegStr (const char *root, const char *dir, const char *name) n1 = nbytes+1; char result[n1]; if (RegQueryValueExA(key_handle, name, 0, &type, (LPBYTE)result, &n1)) { - OutputDebugStringA ("TRACE 11"); log_debug ("Query Value real failed"); RegCloseKey(key_handle); return ret; @@ -220,9 +204,6 @@ readRegStr (const char *root, const char *dir, const char *name) ret = tmp; } } - OutputDebugStringA ("Value is:"); - OutputDebugStringA (ret.c_str ()); - OutputDebugStringA ("-------------- Load one value end ----------"); log_debug ("returning: %s", ret.c_str ()); return ret; #endif ----------------------------------------------------------------------- Summary of changes: src/addin-options.cpp | 4 ++++ src/common.cpp | 43 ------------------------------------------- 2 files changed, 4 insertions(+), 43 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 16:18:38 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 16:18:38 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-232-g64a1e86 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 64a1e86fc06d89c980a196c61d2b6d77d167565e (commit) via 3b88bceb4dc31e076da80987ce67260c62bc7a93 (commit) via 256a280c51f9ea862e4bfb0bb530c2a96f9088f9 (commit) from 68b8096b6617cdad09c99d7eda2035176807e78f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 64a1e86fc06d89c980a196c61d2b6d77d167565e Author: Werner Koch Date: Wed Oct 24 16:18:27 2018 +0200 gpg: Unfinished support for v5 signatures. * g10/parse-packet.c (parse_signature): Allow for v5 signatures. * g10/sig-check.c (check_signature_end_simple): Support the 64bit v5 byte count. * g10/sign.c (hash_sigversion_to_magic): Ditto. (write_signature_packets): Request v5 sig for v5 keys. Remove useless condition. (make_keysig_packet): Request v5 sig for v5 keys. Signed-off-by: Werner Koch diff --git a/g10/build-packet.c b/g10/build-packet.c index 3c500d3..dd4ad54 100644 --- a/g10/build-packet.c +++ b/g10/build-packet.c @@ -1536,7 +1536,7 @@ do_signature( IOBUF out, int ctb, PKT_signature *sig ) else iobuf_put( a, sig->version ); if ( sig->version < 4 ) - iobuf_put (a, 5 ); /* Constant */ + iobuf_put (a, 5 ); /* Constant used by pre-v4 signatures. */ iobuf_put (a, sig->sig_class ); if ( sig->version < 4 ) { diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 92c6529..78413e4 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -1932,7 +1932,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, { int md5_len = 0; unsigned n; - int is_v4 = 0; + int is_v4or5 = 0; int rc = 0; int i, ndata; @@ -1945,8 +1945,8 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, } sig->version = iobuf_get_noeof (inp); pktlen--; - if (sig->version == 4) - is_v4 = 1; + if (sig->version == 4 || sig->version == 5) + is_v4or5 = 1; else if (sig->version != 2 && sig->version != 3) { log_error ("packet(%d) with unknown version %d\n", @@ -1957,7 +1957,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, goto leave; } - if (!is_v4) + if (!is_v4or5) { if (pktlen == 0) goto underflow; @@ -1968,7 +1968,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, goto underflow; sig->sig_class = iobuf_get_noeof (inp); pktlen--; - if (!is_v4) + if (!is_v4or5) { if (pktlen < 12) goto underflow; @@ -1987,7 +1987,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, pktlen--; sig->flags.exportable = 1; sig->flags.revocable = 1; - if (is_v4) /* Read subpackets. */ + if (is_v4or5) /* Read subpackets. */ { if (pktlen < 2) goto underflow; @@ -2058,7 +2058,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, sig->digest_start[1] = iobuf_get_noeof (inp); pktlen--; - if (is_v4 && sig->pubkey_algo) /* Extract required information. */ + if (is_v4or5 && sig->pubkey_algo) /* Extract required information. */ { const byte *p; size_t len; @@ -2159,7 +2159,7 @@ parse_signature (IOBUF inp, int pkttype, unsigned long pktlen, (ulong) sig->keyid[0], (ulong) sig->keyid[1], sig->version, (ulong) sig->timestamp, md5_len, sig->sig_class, sig->digest_algo, sig->digest_start[0], sig->digest_start[1]); - if (is_v4) + if (is_v4or5) { parse_sig_subpkt (sig->hashed, SIGSUBPKT_LIST_HASHED, NULL); parse_sig_subpkt (sig->unhashed, SIGSUBPKT_LIST_UNHASHED, NULL); diff --git a/g10/sig-check.c b/g10/sig-check.c index 9c32d4d..6d7f1af 100644 --- a/g10/sig-check.c +++ b/g10/sig-check.c @@ -510,7 +510,8 @@ check_signature_end_simple (PKT_public_key *pk, PKT_signature *sig, } else { - byte buf[6]; + byte buf[10]; + int i; size_t n; gcry_md_putc (digest, sig->pubkey_algo); gcry_md_putc (digest, sig->digest_algo); @@ -531,13 +532,21 @@ check_signature_end_simple (PKT_public_key *pk, PKT_signature *sig, n = 6; } /* add some magic per Section 5.2.4 of RFC 4880. */ - buf[0] = sig->version; - buf[1] = 0xff; - buf[2] = n >> 24; - buf[3] = n >> 16; - buf[4] = n >> 8; - buf[5] = n; - gcry_md_write( digest, buf, 6 ); + i = 0; + buf[i++] = sig->version; + buf[i++] = 0xff; + if (sig->version >= 5) + { + buf[i++] = 0; + buf[i++] = 0; + buf[i++] = 0; + buf[i++] = 0; + } + buf[i++] = n >> 24; + buf[i++] = n >> 16; + buf[i++] = n >> 8; + buf[i++] = n; + gcry_md_write (digest, buf, i); } gcry_md_final( digest ); @@ -572,7 +581,7 @@ hash_uid_packet (PKT_user_id *uid, gcry_md_hd_t md, PKT_signature *sig ) { if (uid->attrib_data) { - if (sig->version >=4) + if (sig->version >= 4) { byte buf[5]; buf[0] = 0xd1; /* packet of type 17 */ @@ -586,7 +595,7 @@ hash_uid_packet (PKT_user_id *uid, gcry_md_hd_t md, PKT_signature *sig ) } else { - if (sig->version >=4) + if (sig->version >= 4) { byte buf[5]; buf[0] = 0xb4; /* indicates a userid packet */ diff --git a/g10/sign.c b/g10/sign.c index 83f4551..213fd01 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -220,7 +220,8 @@ hash_uid (gcry_md_hd_t md, int sigversion, const PKT_user_id *uid) static void hash_sigversion_to_magic (gcry_md_hd_t md, const PKT_signature *sig) { - byte buf[6]; + byte buf[10]; + int i; size_t n; gcry_md_putc (md, sig->version); @@ -242,13 +243,21 @@ hash_sigversion_to_magic (gcry_md_hd_t md, const PKT_signature *sig) n = 6; } /* Add some magic. */ - buf[0] = sig->version; - buf[1] = 0xff; - buf[2] = n >> 24; /* (n is only 16 bit, so this is always 0) */ - buf[3] = n >> 16; - buf[4] = n >> 8; - buf[5] = n; - gcry_md_write (md, buf, 6); + i = 0; + buf[i++] = sig->version; + buf[i++] = 0xff; + if (sig->version >= 5) + { + buf[i++] = 0; + buf[i++] = 0; + buf[i++] = 0; + buf[i++] = 0; + } + buf[i++] = n >> 24; /* (n is only 16 bit, so this is always 0) */ + buf[i++] = n >> 16; + buf[i++] = n >> 8; + buf[i++] = n; + gcry_md_write (md, buf, i); } @@ -731,11 +740,10 @@ write_signature_packets (ctrl_t ctrl, if (!sig) return gpg_error_from_syserror (); - if (duration || opt.sig_policy_url - || opt.sig_notations || opt.sig_keyserver_url) - sig->version = 4; + if (pk->version >= 5) + sig->version = 5; /* Required for v5 keys. */ else - sig->version = pk->version; + sig->version = 4; /*Required. */ keyid_from_pk (pk, sig->keyid); sig->digest_algo = hash_for (pk); @@ -751,12 +759,8 @@ write_signature_packets (ctrl_t ctrl, if (gcry_md_copy (&md, hash)) BUG (); - if (sig->version >= 4) - { - build_sig_subpkt_from_sig (sig, pk); - mk_notation_policy_etc (sig, NULL, pk); - } - + build_sig_subpkt_from_sig (sig, pk); + mk_notation_policy_etc (sig, NULL, pk); hash_sigversion_to_magic (md, sig); gcry_md_final (md); @@ -1523,9 +1527,10 @@ make_keysig_packet (ctrl_t ctrl, || sigclass == 0x20 || sigclass == 0x18 || sigclass == 0x19 || sigclass == 0x30 || sigclass == 0x28 ); - sigversion = 4; - if (sigversion < pksk->version) - sigversion = pksk->version; + if (pksk->version >= 5) + sigversion = 5; + else + sigversion = 4; if (!digest_algo) { commit 3b88bceb4dc31e076da80987ce67260c62bc7a93 Author: Werner Koch Date: Wed Oct 24 16:00:20 2018 +0200 indent: Modernize g10/sign.c -- diff --git a/g10/sign.c b/g10/sign.c index 581a08f..83f4551 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -51,7 +51,8 @@ static int recipient_digest_algo=0; -/**************** + +/* * Create notations and other stuff. It is assumed that the stings in * STRLIST are already checked to contain only printable data and have * a valid NAME=VALUE format. @@ -574,129 +575,135 @@ print_status_sig_created (PKT_public_key *pk, PKT_signature *sig, int what) * Loop over the secret certificates in SK_LIST and build the one pass * signature packets. OpenPGP says that the data should be bracket by * the onepass-sig and signature-packet; so we build these onepass - * packet here in reverse order + * packet here in reverse order. */ static int write_onepass_sig_packets (SK_LIST sk_list, IOBUF out, int sigclass ) { - int skcount; - SK_LIST sk_rover; + int skcount; + SK_LIST sk_rover; - for (skcount=0, sk_rover=sk_list; sk_rover; sk_rover = sk_rover->next) - skcount++; + for (skcount=0, sk_rover=sk_list; sk_rover; sk_rover = sk_rover->next) + skcount++; - for (; skcount; skcount--) { - PKT_public_key *pk; - PKT_onepass_sig *ops; - PACKET pkt; - int i, rc; + for (; skcount; skcount--) + { + PKT_public_key *pk; + PKT_onepass_sig *ops; + PACKET pkt; + int i, rc; - for (i=0, sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next ) { - if (++i == skcount) - break; - } + for (i=0, sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next) + if (++i == skcount) + break; - pk = sk_rover->pk; - ops = xmalloc_clear (sizeof *ops); - ops->sig_class = sigclass; - ops->digest_algo = hash_for (pk); - ops->pubkey_algo = pk->pubkey_algo; - keyid_from_pk (pk, ops->keyid); - ops->last = (skcount == 1); - - init_packet(&pkt); - pkt.pkttype = PKT_ONEPASS_SIG; - pkt.pkt.onepass_sig = ops; - rc = build_packet (out, &pkt); - free_packet (&pkt, NULL); - if (rc) { - log_error ("build onepass_sig packet failed: %s\n", - gpg_strerror (rc)); - return rc; + pk = sk_rover->pk; + ops = xmalloc_clear (sizeof *ops); + ops->sig_class = sigclass; + ops->digest_algo = hash_for (pk); + ops->pubkey_algo = pk->pubkey_algo; + keyid_from_pk (pk, ops->keyid); + ops->last = (skcount == 1); + + init_packet (&pkt); + pkt.pkttype = PKT_ONEPASS_SIG; + pkt.pkt.onepass_sig = ops; + rc = build_packet (out, &pkt); + free_packet (&pkt, NULL); + if (rc) + { + log_error ("build onepass_sig packet failed: %s\n", + gpg_strerror (rc)); + return rc; } } - return 0; + return 0; } + /* * Helper to write the plaintext (literal data) packet */ static int write_plaintext_packet (IOBUF out, IOBUF inp, const char *fname, int ptmode) { - PKT_plaintext *pt = NULL; - u32 filesize; - int rc = 0; + PKT_plaintext *pt = NULL; + u32 filesize; + int rc = 0; - if (!opt.no_literal) - pt=setup_plaintext_name(fname,inp); + if (!opt.no_literal) + pt = setup_plaintext_name (fname, inp); - /* try to calculate the length of the data */ - if ( !iobuf_is_pipe_filename (fname) && *fname ) - { - off_t tmpsize; - int overflow; - - if( !(tmpsize = iobuf_get_filelength(inp, &overflow)) - && !overflow && opt.verbose) - log_info (_("WARNING: '%s' is an empty file\n"), fname); - - /* We can't encode the length of very large files because - OpenPGP uses only 32 bit for file sizes. So if the size of - a file is larger than 2^32 minus some bytes for packet - headers, we switch to partial length encoding. */ - if ( tmpsize < (IOBUF_FILELENGTH_LIMIT - 65536) ) - filesize = tmpsize; - else - filesize = 0; - - /* Because the text_filter modifies the length of the - * data, it is not possible to know the used length - * without a double read of the file - to avoid that - * we simple use partial length packets. */ - if ( ptmode == 't' || ptmode == 'u' || ptmode == 'm') - filesize = 0; - } - else - filesize = opt.set_filesize? opt.set_filesize : 0; /* stdin */ - - if (!opt.no_literal) { - PACKET pkt; - - /* Note that PT has been initialized above in no_literal mode. */ - pt->timestamp = make_timestamp (); - pt->mode = ptmode; - pt->len = filesize; - pt->new_ctb = !pt->len; - pt->buf = inp; - init_packet(&pkt); - pkt.pkttype = PKT_PLAINTEXT; - pkt.pkt.plaintext = pt; - /*cfx.datalen = filesize? calc_packet_length( &pkt ) : 0;*/ - if( (rc = build_packet (out, &pkt)) ) - log_error ("build_packet(PLAINTEXT) failed: %s\n", - gpg_strerror (rc) ); - pt->buf = NULL; - free_packet (&pkt, NULL); + /* Try to calculate the length of the data. */ + if ( !iobuf_is_pipe_filename (fname) && *fname) + { + off_t tmpsize; + int overflow; + + if (!(tmpsize = iobuf_get_filelength (inp, &overflow)) + && !overflow && opt.verbose) + log_info (_("WARNING: '%s' is an empty file\n"), fname); + + /* We can't encode the length of very large files because + * OpenPGP uses only 32 bit for file sizes. So if the size of a + * file is larger than 2^32 minus some bytes for packet headers, + * we switch to partial length encoding. */ + if (tmpsize < (IOBUF_FILELENGTH_LIMIT - 65536)) + filesize = tmpsize; + else + filesize = 0; + + /* Because the text_filter modifies the length of the + * data, it is not possible to know the used length + * without a double read of the file - to avoid that + * we simple use partial length packets. */ + if (ptmode == 't' || ptmode == 'u' || ptmode == 'm') + filesize = 0; } - else { - byte copy_buffer[4096]; - int bytes_copied; - - while ((bytes_copied = iobuf_read(inp, copy_buffer, 4096)) != -1) - if ( (rc=iobuf_write(out, copy_buffer, bytes_copied)) ) { - log_error ("copying input to output failed: %s\n", - gpg_strerror (rc)); - break; - } - wipememory(copy_buffer,4096); /* burn buffer */ + else + filesize = opt.set_filesize? opt.set_filesize : 0; /* stdin */ + + if (!opt.no_literal) + { + PACKET pkt; + + /* Note that PT has been initialized above in no_literal mode. */ + pt->timestamp = make_timestamp (); + pt->mode = ptmode; + pt->len = filesize; + pt->new_ctb = !pt->len; + pt->buf = inp; + init_packet (&pkt); + pkt.pkttype = PKT_PLAINTEXT; + pkt.pkt.plaintext = pt; + /*cfx.datalen = filesize? calc_packet_length( &pkt ) : 0;*/ + if ((rc = build_packet (out, &pkt))) + log_error ("build_packet(PLAINTEXT) failed: %s\n", + gpg_strerror (rc) ); + pt->buf = NULL; + free_packet (&pkt, NULL); } - /* fixme: it seems that we never freed pt/pkt */ + else + { + byte copy_buffer[4096]; + int bytes_copied; - return rc; + while ((bytes_copied = iobuf_read (inp, copy_buffer, 4096)) != -1) + if ((rc = iobuf_write (out, copy_buffer, bytes_copied))) + { + log_error ("copying input to output failed: %s\n", + gpg_strerror (rc)); + break; + } + wipememory (copy_buffer, 4096); /* burn buffer */ + } + /* fixme: it seems that we never freed pt/pkt */ + + return rc; } + /* * Write the signatures from the SK_LIST to OUT. HASH must be a non-finalized * hash which will not be changes here. @@ -782,7 +789,7 @@ write_signature_packets (ctrl_t ctrl, } -/**************** +/* * Sign the files whose names are in FILENAME. * If DETACHED has the value true, * make a detached signature. If FILENAMES->d is NULL read from stdin @@ -798,62 +805,65 @@ int sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr, int encryptflag, strlist_t remusr, const char *outfile ) { - const char *fname; - armor_filter_context_t *afx; - compress_filter_context_t zfx; - md_filter_context_t mfx; - text_filter_context_t tfx; - progress_filter_context_t *pfx; - encrypt_filter_context_t efx; - IOBUF inp = NULL, out = NULL; - PACKET pkt; - int rc = 0; - PK_LIST pk_list = NULL; - SK_LIST sk_list = NULL; - SK_LIST sk_rover = NULL; - int multifile = 0; - u32 duration=0; - - pfx = new_progress_context (); - afx = new_armor_context (); - memset( &zfx, 0, sizeof zfx); - memset( &mfx, 0, sizeof mfx); - memset( &efx, 0, sizeof efx); - efx.ctrl = ctrl; - init_packet( &pkt ); - - if( filenames ) { - fname = filenames->d; - multifile = !!filenames->next; + const char *fname; + armor_filter_context_t *afx; + compress_filter_context_t zfx; + md_filter_context_t mfx; + text_filter_context_t tfx; + progress_filter_context_t *pfx; + encrypt_filter_context_t efx; + iobuf_t inp = NULL; + iobuf_t out = NULL; + PACKET pkt; + int rc = 0; + PK_LIST pk_list = NULL; + SK_LIST sk_list = NULL; + SK_LIST sk_rover = NULL; + int multifile = 0; + u32 duration=0; + + pfx = new_progress_context (); + afx = new_armor_context (); + memset (&zfx, 0, sizeof zfx); + memset (&mfx, 0, sizeof mfx); + memset (&efx, 0, sizeof efx); + efx.ctrl = ctrl; + init_packet (&pkt); + + if (filenames) + { + fname = filenames->d; + multifile = !!filenames->next; } - else - fname = NULL; + else + fname = NULL; - if( fname && filenames->next && (!detached || encryptflag) ) - log_bug("multiple files can only be detached signed"); + if (fname && filenames->next && (!detached || encryptflag)) + log_bug ("multiple files can only be detached signed"); - if(encryptflag==2 - && (rc=setup_symkey(&efx.symkey_s2k,&efx.symkey_dek))) - goto leave; + if (encryptflag == 2 + && (rc = setup_symkey (&efx.symkey_s2k, &efx.symkey_dek))) + goto leave; - if (opt.ask_sig_expire && !opt.batch) - duration = ask_expire_interval(1,opt.def_sig_expire); - else - duration = parse_expire_string(opt.def_sig_expire); + if (opt.ask_sig_expire && !opt.batch) + duration = ask_expire_interval(1,opt.def_sig_expire); + else + duration = parse_expire_string(opt.def_sig_expire); - /* Note: In the old non-agent version the following call used to - unprotect the secret key. This is now done on demand by the agent. */ - if( (rc = build_sk_list (ctrl, locusr, &sk_list, PUBKEY_USAGE_SIG )) ) - goto leave; + /* Note: In the old non-agent version the following call used to + * unprotect the secret key. This is now done on demand by the agent. */ + if ((rc = build_sk_list (ctrl, locusr, &sk_list, PUBKEY_USAGE_SIG ))) + goto leave; - if (encryptflag - && (rc=build_pk_list (ctrl, remusr, &pk_list))) - goto leave; + if (encryptflag + && (rc = build_pk_list (ctrl, remusr, &pk_list))) + goto leave; - /* prepare iobufs */ - if( multifile ) /* have list of filenames */ - inp = NULL; /* we do it later */ - else { + /* Prepare iobufs. */ + if (multifile) /* have list of filenames */ + inp = NULL; /* we do it later */ + else + { inp = iobuf_open(fname); if (inp && is_secured_file (iobuf_get_fd (inp))) { @@ -861,407 +871,435 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr, inp = NULL; gpg_err_set_errno (EPERM); } - if( !inp ) + if (!inp) { rc = gpg_error_from_syserror (); log_error (_("can't open '%s': %s\n"), fname? fname: "[stdin]", - strerror(errno) ); + strerror (errno)); goto leave; } - handle_progress (pfx, inp, fname); + handle_progress (pfx, inp, fname); } - if( outfile ) { - if (is_secured_filename ( outfile )) { - out = NULL; - gpg_err_set_errno (EPERM); + if (outfile) + { + if (is_secured_filename (outfile)) + { + out = NULL; + gpg_err_set_errno (EPERM); } - else - out = iobuf_create (outfile, 0); - if( !out ) - { - rc = gpg_error_from_syserror (); - log_error(_("can't create '%s': %s\n"), outfile, strerror(errno) ); - goto leave; - } - else if( opt.verbose ) - log_info(_("writing to '%s'\n"), outfile ); + else + out = iobuf_create (outfile, 0); + if (!out) + { + rc = gpg_error_from_syserror (); + log_error (_("can't create '%s': %s\n"), outfile, gpg_strerror (rc)); + goto leave; + } + else if (opt.verbose) + log_info (_("writing to '%s'\n"), outfile); + } + else if ((rc = open_outfile (-1, fname, + opt.armor? 1 : detached? 2 : 0, 0, &out))) + { + goto leave; } - else if( (rc = open_outfile (-1, fname, - opt.armor? 1: detached? 2:0, 0, &out))) - goto leave; - /* prepare to calculate the MD over the input */ - if( opt.textmode && !outfile && !multifile ) - { - memset( &tfx, 0, sizeof tfx); - iobuf_push_filter( inp, text_filter, &tfx ); - } + /* Prepare to calculate the MD over the input. */ + if (opt.textmode && !outfile && !multifile) + { + memset (&tfx, 0, sizeof tfx); + iobuf_push_filter (inp, text_filter, &tfx); + } - if ( gcry_md_open (&mfx.md, 0, 0) ) - BUG (); - if (DBG_HASHING) - gcry_md_debug (mfx.md, "sign"); - - /* If we're encrypting and signing, it is reasonable to pick the - hash algorithm to use out of the recipient key prefs. This is - best effort only, as in a DSA2 and smartcard world there are - cases where we cannot please everyone with a single hash (DSA2 - wants >160 and smartcards want =160). In the future this could - be more complex with different hashes for each sk, but the - current design requires a single hash for all SKs. */ - if(pk_list) - { - if(opt.def_digest_algo) - { - if(!opt.expert && - select_algo_from_prefs(pk_list,PREFTYPE_HASH, - opt.def_digest_algo, - NULL)!=opt.def_digest_algo) - log_info(_("WARNING: forcing digest algorithm %s (%d)" - " violates recipient preferences\n"), - gcry_md_algo_name (opt.def_digest_algo), - opt.def_digest_algo ); - } - else - { - int algo, smartcard=0; - union pref_hint hint; - - hint.digest_length = 0; - - /* Of course, if the recipient asks for something - unreasonable (like the wrong hash for a DSA key) then - don't do it. Check all sk's - if any are DSA or live - on a smartcard, then the hash has restrictions and we - may not be able to give the recipient what they want. - For DSA, pass a hint for the largest q we have. Note - that this means that a q>160 key will override a q=160 - key and force the use of truncation for the q=160 key. - The alternative would be to ignore the recipient prefs - completely and get a different hash for each DSA key in - hash_for(). The override behavior here is more or less - reasonable as it is under the control of the user which - keys they sign with for a given message and the fact - that the message with multiple signatures won't be - usable on an implementation that doesn't understand - DSA2 anyway. */ - - for (sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next ) - { - if (sk_rover->pk->pubkey_algo == PUBKEY_ALGO_DSA - || sk_rover->pk->pubkey_algo == PUBKEY_ALGO_ECDSA) - { - int temp_hashlen = (gcry_mpi_get_nbits - (sk_rover->pk->pkey[1])); - - if (sk_rover->pk->pubkey_algo == PUBKEY_ALGO_ECDSA) - temp_hashlen = ecdsa_qbits_from_Q (temp_hashlen); - temp_hashlen = (temp_hashlen+7)/8; - - /* Pick a hash that is large enough for our - largest q */ - - if (hint.digest_lengthpk->is_protected */ - /* && sk_rover->pk->protect.s2k.mode == 1002) */ - /* smartcard = 1; */ - } - - /* Current smartcards only do 160-bit hashes. If we have - to have a >160-bit hash, then we can't use the - recipient prefs as we'd need both =160 and >160 at the - same time and recipient prefs currently require a - single hash for all signatures. All this may well have - to change as the cards add algorithms. */ - - if (!smartcard || (smartcard && hint.digest_length==20)) - if ( (algo= - select_algo_from_prefs(pk_list,PREFTYPE_HASH,-1,&hint)) > 0) - recipient_digest_algo=algo; - } - } + if (gcry_md_open (&mfx.md, 0, 0)) + BUG (); + if (DBG_HASHING) + gcry_md_debug (mfx.md, "sign"); + + /* If we're encrypting and signing, it is reasonable to pick the + * hash algorithm to use out of the recipient key prefs. This is + * best effort only, as in a DSA2 and smartcard world there are + * cases where we cannot please everyone with a single hash (DSA2 + * wants >160 and smartcards want =160). In the future this could + * be more complex with different hashes for each sk, but the + * current design requires a single hash for all SKs. */ + if (pk_list) + { + if (opt.def_digest_algo) + { + if (!opt.expert + && select_algo_from_prefs (pk_list,PREFTYPE_HASH, + opt.def_digest_algo, + NULL) != opt.def_digest_algo) + { + log_info (_("WARNING: forcing digest algorithm %s (%d)" + " violates recipient preferences\n"), + gcry_md_algo_name (opt.def_digest_algo), + opt.def_digest_algo); + } + } + else + { + int algo; + int smartcard=0; + union pref_hint hint; + + hint.digest_length = 0; + + /* Of course, if the recipient asks for something + * unreasonable (like the wrong hash for a DSA key) then + * don't do it. Check all sk's - if any are DSA or live + * on a smartcard, then the hash has restrictions and we + * may not be able to give the recipient what they want. + * For DSA, pass a hint for the largest q we have. Note + * that this means that a q>160 key will override a q=160 + * key and force the use of truncation for the q=160 key. + * The alternative would be to ignore the recipient prefs + * completely and get a different hash for each DSA key in + * hash_for(). The override behavior here is more or less + * reasonable as it is under the control of the user which + * keys they sign with for a given message and the fact + * that the message with multiple signatures won't be + * usable on an implementation that doesn't understand + * DSA2 anyway. */ + for (sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next ) + { + if (sk_rover->pk->pubkey_algo == PUBKEY_ALGO_DSA + || sk_rover->pk->pubkey_algo == PUBKEY_ALGO_ECDSA) + { + int temp_hashlen = gcry_mpi_get_nbits (sk_rover->pk->pkey[1]); + + if (sk_rover->pk->pubkey_algo == PUBKEY_ALGO_ECDSA) + temp_hashlen = ecdsa_qbits_from_Q (temp_hashlen); + + temp_hashlen = (temp_hashlen+7)/8; + + /* Pick a hash that is large enough for our largest Q */ + if (hint.digest_length < temp_hashlen) + hint.digest_length = temp_hashlen; + } + /* FIXME: need to check gpg-agent for this. */ + /* else if (sk_rover->pk->is_protected */ + /* && sk_rover->pk->protect.s2k.mode == 1002) */ + /* smartcard = 1; */ + } - for (sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next) - gcry_md_enable (mfx.md, hash_for (sk_rover->pk)); + /* Current smartcards only do 160-bit hashes. If we have + * to have a >160-bit hash, then we can't use the + * recipient prefs as we'd need both =160 and >160 at the + * same time and recipient prefs currently require a + * single hash for all signatures. All this may well have + * to change as the cards add algorithms. */ + if ((!smartcard || (smartcard && hint.digest_length==20)) + && ((algo = select_algo_from_prefs (pk_list, PREFTYPE_HASH, + -1, &hint)) > 0)) + { + recipient_digest_algo = algo; + } + } + } - if( !multifile ) - iobuf_push_filter( inp, md_filter, &mfx ); + for (sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next) + gcry_md_enable (mfx.md, hash_for (sk_rover->pk)); - if( detached && !encryptflag) - afx->what = 2; + if (!multifile) + iobuf_push_filter (inp, md_filter, &mfx); - if( opt.armor && !outfile ) - push_armor_filter (afx, out); + if (detached && !encryptflag) + afx->what = 2; + + if (opt.armor && !outfile) + push_armor_filter (afx, out); - if( encryptflag ) { - efx.pk_list = pk_list; - /* fixme: set efx.cfx.datalen if known */ - iobuf_push_filter( out, encrypt_filter, &efx ); + if (encryptflag) + { + efx.pk_list = pk_list; + /* fixme: set efx.cfx.datalen if known */ + iobuf_push_filter (out, encrypt_filter, &efx); } - if (opt.compress_algo && !outfile && !detached) - { - int compr_algo=opt.compress_algo; - - /* If not forced by user */ - if(compr_algo==-1) - { - /* If we're not encrypting, then select_algo_from_prefs - will fail and we'll end up with the default. If we are - encrypting, select_algo_from_prefs cannot fail since - there is an assumed preference for uncompressed data. - Still, if it did fail, we'll also end up with the - default. */ - - if((compr_algo= - select_algo_from_prefs(pk_list,PREFTYPE_ZIP,-1,NULL))==-1) - compr_algo=default_compress_algo(); - } - else if(!opt.expert && pk_list - && select_algo_from_prefs(pk_list,PREFTYPE_ZIP, - compr_algo,NULL)!=compr_algo) - log_info(_("WARNING: forcing compression algorithm %s (%d)" - " violates recipient preferences\n"), - compress_algo_to_string(compr_algo),compr_algo); - - /* algo 0 means no compression */ - if( compr_algo ) - push_compress_filter(out,&zfx,compr_algo); - } + if (opt.compress_algo && !outfile && !detached) + { + int compr_algo = opt.compress_algo; - /* Write the one-pass signature packets if needed */ - if (!detached) { - rc = write_onepass_sig_packets (sk_list, out, - opt.textmode && !outfile ? 0x01:0x00); - if (rc) - goto leave; + /* If not forced by user */ + if (compr_algo==-1) + { + /* If we're not encrypting, then select_algo_from_prefs + * will fail and we'll end up with the default. If we are + * encrypting, select_algo_from_prefs cannot fail since + * there is an assumed preference for uncompressed data. + * Still, if it did fail, we'll also end up with the + * default. */ + if ((compr_algo = select_algo_from_prefs (pk_list, PREFTYPE_ZIP, + -1, NULL)) == -1) + { + compr_algo = default_compress_algo(); + } + } + else if (!opt.expert && pk_list + && select_algo_from_prefs (pk_list, PREFTYPE_ZIP, + compr_algo, NULL) != compr_algo) + { + log_info (_("WARNING: forcing compression algorithm %s (%d)" + " violates recipient preferences\n"), + compress_algo_to_string (compr_algo), compr_algo); + } + + /* Algo 0 means no compression. */ + if (compr_algo) + push_compress_filter (out, &zfx, compr_algo); } - write_status_begin_signing (mfx.md); - - /* Setup the inner packet. */ - if( detached ) { - if( multifile ) { - strlist_t sl; - - if( opt.verbose ) - log_info(_("signing:") ); - /* must walk reverse trough this list */ - for( sl = strlist_last(filenames); sl; - sl = strlist_prev( filenames, sl ) ) { - inp = iobuf_open(sl->d); - if (inp && is_secured_file (iobuf_get_fd (inp))) - { - iobuf_close (inp); - inp = NULL; - gpg_err_set_errno (EPERM); - } - if( !inp ) - { - rc = gpg_error_from_syserror (); - log_error(_("can't open '%s': %s\n"), - sl->d,strerror(errno)); - goto leave; - } - handle_progress (pfx, inp, sl->d); - if( opt.verbose ) - log_printf (" '%s'", sl->d ); - if(opt.textmode) - { - memset( &tfx, 0, sizeof tfx); - iobuf_push_filter( inp, text_filter, &tfx ); - } - iobuf_push_filter( inp, md_filter, &mfx ); - while( iobuf_get(inp) != -1 ) - ; - iobuf_close(inp); inp = NULL; + /* Write the one-pass signature packets if needed */ + if (!detached) + { + rc = write_onepass_sig_packets (sk_list, out, + opt.textmode && !outfile ? 0x01:0x00); + if (rc) + goto leave; + } + + write_status_begin_signing (mfx.md); + + /* Setup the inner packet. */ + if (detached) + { + if (multifile) + { + strlist_t sl; + + if (opt.verbose) + log_info (_("signing:") ); + /* Must walk reverse trough this list. */ + for (sl = strlist_last(filenames); + sl; + sl = strlist_prev( filenames, sl)) + { + inp = iobuf_open (sl->d); + if (inp && is_secured_file (iobuf_get_fd (inp))) + { + iobuf_close (inp); + inp = NULL; + gpg_err_set_errno (EPERM); + } + if (!inp) + { + rc = gpg_error_from_syserror (); + log_error (_("can't open '%s': %s\n"), + sl->d, gpg_strerror (rc)); + goto leave; + } + handle_progress (pfx, inp, sl->d); + if (opt.verbose) + log_printf (" '%s'", sl->d ); + if (opt.textmode) + { + memset (&tfx, 0, sizeof tfx); + iobuf_push_filter (inp, text_filter, &tfx); + } + iobuf_push_filter (inp, md_filter, &mfx); + while (iobuf_get (inp) != -1) + ; + iobuf_close (inp); + inp = NULL; } - if( opt.verbose ) - log_printf ("\n"); + if (opt.verbose) + log_printf ("\n"); } - else { - /* read, so that the filter can calculate the digest */ - while( iobuf_get(inp) != -1 ) - ; + else + { + /* Read, so that the filter can calculate the digest. */ + while (iobuf_get(inp) != -1) + ; } } - else { - rc = write_plaintext_packet (out, inp, fname, - opt.textmode && !outfile ? - (opt.mimemode? 'm':'t'):'b'); + else + { + rc = write_plaintext_packet (out, inp, fname, + (opt.textmode && !outfile) ? + (opt.mimemode? 'm' : 't') : 'b'); } - /* catch errors from above */ - if (rc) - goto leave; + /* Catch errors from above. */ + if (rc) + goto leave; - /* write the signatures */ - rc = write_signature_packets (ctrl, sk_list, out, mfx.md, - opt.textmode && !outfile? 0x01 : 0x00, - 0, duration, detached ? 'D':'S', NULL); - if( rc ) - goto leave; + /* Write the signatures. */ + rc = write_signature_packets (ctrl, sk_list, out, mfx.md, + opt.textmode && !outfile? 0x01 : 0x00, + 0, duration, detached ? 'D':'S', NULL); + if (rc) + goto leave; - leave: - if( rc ) - iobuf_cancel(out); - else { - iobuf_close(out); - if (encryptflag) - write_status( STATUS_END_ENCRYPTION ); + leave: + if (rc) + iobuf_cancel (out); + else + { + iobuf_close (out); + if (encryptflag) + write_status (STATUS_END_ENCRYPTION); } - iobuf_close(inp); - gcry_md_close ( mfx.md ); - release_sk_list( sk_list ); - release_pk_list( pk_list ); - recipient_digest_algo=0; - release_progress_context (pfx); - release_armor_context (afx); - return rc; + iobuf_close (inp); + gcry_md_close (mfx.md); + release_sk_list (sk_list); + release_pk_list (pk_list); + recipient_digest_algo = 0; + release_progress_context (pfx); + release_armor_context (afx); + return rc; } - -/**************** - * make a clear signature. note that opt.armor is not needed +/* + * Make a clear signature. Note that opt.armor is not needed. */ int clearsign_file (ctrl_t ctrl, - const char *fname, strlist_t locusr, const char *outfile ) + const char *fname, strlist_t locusr, const char *outfile) { - armor_filter_context_t *afx; - progress_filter_context_t *pfx; - gcry_md_hd_t textmd = NULL; - IOBUF inp = NULL, out = NULL; - PACKET pkt; - int rc = 0; - SK_LIST sk_list = NULL; - SK_LIST sk_rover = NULL; - u32 duration=0; - - pfx = new_progress_context (); - afx = new_armor_context (); - init_packet( &pkt ); - - if (opt.ask_sig_expire && !opt.batch) - duration = ask_expire_interval (1,opt.def_sig_expire); - else - duration = parse_expire_string (opt.def_sig_expire); - - /* Note: In the old non-agent version the following call used to - unprotect the secret key. This is now done on demand by the agent. */ - if( (rc=build_sk_list (ctrl, locusr, &sk_list, PUBKEY_USAGE_SIG )) ) - goto leave; - - /* prepare iobufs */ - inp = iobuf_open(fname); - if (inp && is_secured_file (iobuf_get_fd (inp))) - { - iobuf_close (inp); - inp = NULL; - gpg_err_set_errno (EPERM); - } - if( !inp ) { - rc = gpg_error_from_syserror (); - log_error (_("can't open '%s': %s\n"), - fname? fname: "[stdin]", strerror(errno) ); - goto leave; + armor_filter_context_t *afx; + progress_filter_context_t *pfx; + gcry_md_hd_t textmd = NULL; + iobuf_t inp = NULL; + iobuf_t out = NULL; + PACKET pkt; + int rc = 0; + SK_LIST sk_list = NULL; + SK_LIST sk_rover = NULL; + u32 duration = 0; + + pfx = new_progress_context (); + afx = new_armor_context (); + init_packet( &pkt ); + + if (opt.ask_sig_expire && !opt.batch) + duration = ask_expire_interval (1, opt.def_sig_expire); + else + duration = parse_expire_string (opt.def_sig_expire); + + /* Note: In the old non-agent version the following call used to + * unprotect the secret key. This is now done on demand by the agent. */ + if ((rc=build_sk_list (ctrl, locusr, &sk_list, PUBKEY_USAGE_SIG))) + goto leave; + + /* Prepare iobufs. */ + inp = iobuf_open (fname); + if (inp && is_secured_file (iobuf_get_fd (inp))) + { + iobuf_close (inp); + inp = NULL; + gpg_err_set_errno (EPERM); + } + if (!inp) + { + rc = gpg_error_from_syserror (); + log_error (_("can't open '%s': %s\n"), + fname? fname: "[stdin]", gpg_strerror (rc)); + goto leave; } - handle_progress (pfx, inp, fname); + handle_progress (pfx, inp, fname); - if( outfile ) { - if (is_secured_filename (outfile) ) { - outfile = NULL; - gpg_err_set_errno (EPERM); + if (outfile) + { + if (is_secured_filename (outfile)) + { + outfile = NULL; + gpg_err_set_errno (EPERM); } - else - out = iobuf_create (outfile, 0); - if( !out ) - { - rc = gpg_error_from_syserror (); - log_error(_("can't create '%s': %s\n"), outfile, strerror(errno) ); - goto leave; - } - else if( opt.verbose ) - log_info(_("writing to '%s'\n"), outfile ); - } - else if ((rc = open_outfile (-1, fname, 1, 0, &out))) - goto leave; + else + out = iobuf_create (outfile, 0); - iobuf_writestr(out, "-----BEGIN PGP SIGNED MESSAGE-----" LF ); + if (!out) + { + rc = gpg_error_from_syserror (); + log_error (_("can't create '%s': %s\n"), outfile, gpg_strerror (rc)); + goto leave; + } + else if (opt.verbose) + log_info (_("writing to '%s'\n"), outfile); + } + else if ((rc = open_outfile (-1, fname, 1, 0, &out))) { - const char *s; - int any = 0; - byte hashs_seen[256]; - - memset( hashs_seen, 0, sizeof hashs_seen ); - iobuf_writestr(out, "Hash: " ); - for( sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next ) { - int i = hash_for (sk_rover->pk); - - if( !hashs_seen[ i & 0xff ] ) { - s = gcry_md_algo_name ( i ); - if( s ) { - hashs_seen[ i & 0xff ] = 1; - if( any ) - iobuf_put(out, ',' ); - iobuf_writestr(out, s ); - any = 1; - } - } - } - log_assert(any); - iobuf_writestr(out, LF ); + goto leave; } - if( opt.not_dash_escaped ) - iobuf_writestr( out, - "NotDashEscaped: You need "GPG_NAME - " to verify this message" LF ); - iobuf_writestr(out, LF ); + iobuf_writestr (out, "-----BEGIN PGP SIGNED MESSAGE-----" LF); + + { + const char *s; + int any = 0; + byte hashs_seen[256]; - if ( gcry_md_open (&textmd, 0, 0) ) - BUG (); + memset (hashs_seen, 0, sizeof hashs_seen); + iobuf_writestr (out, "Hash: " ); for (sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next) - gcry_md_enable (textmd, hash_for(sk_rover->pk)); + { + int i = hash_for (sk_rover->pk); - if ( DBG_HASHING ) - gcry_md_debug ( textmd, "clearsign" ); + if (!hashs_seen[ i & 0xff ]) + { + s = gcry_md_algo_name (i); + if (s) + { + hashs_seen[ i & 0xff ] = 1; + if (any) + iobuf_put (out, ','); + iobuf_writestr (out, s); + any = 1; + } + } + } + log_assert (any); + iobuf_writestr (out, LF); + } + + if (opt.not_dash_escaped) + iobuf_writestr (out, + "NotDashEscaped: You need "GPG_NAME + " to verify this message" LF); + iobuf_writestr (out, LF ); + + if (gcry_md_open (&textmd, 0, 0)) + BUG (); + for (sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next) + gcry_md_enable (textmd, hash_for(sk_rover->pk)); - copy_clearsig_text (out, inp, textmd, !opt.not_dash_escaped, - opt.escape_from); - /* fixme: check for read errors */ + if (DBG_HASHING) + gcry_md_debug (textmd, "clearsign"); - /* now write the armor */ - afx->what = 2; - push_armor_filter (afx, out); + copy_clearsig_text (out, inp, textmd, !opt.not_dash_escaped, opt.escape_from); + /* fixme: check for read errors */ - /* Write the signatures. */ - rc = write_signature_packets (ctrl, sk_list, out, textmd, 0x01, 0, - duration, 'C', NULL); - if( rc ) - goto leave; + /* Now write the armor. */ + afx->what = 2; + push_armor_filter (afx, out); - leave: - if( rc ) - iobuf_cancel(out); - else - iobuf_close(out); - iobuf_close(inp); - gcry_md_close ( textmd ); - release_sk_list( sk_list ); - release_progress_context (pfx); - release_armor_context (afx); - return rc; + /* Write the signatures. */ + rc = write_signature_packets (ctrl, sk_list, out, textmd, 0x01, 0, + duration, 'C', NULL); + if (rc) + goto leave; + + leave: + if (rc) + iobuf_cancel (out); + else + iobuf_close (out); + iobuf_close (inp); + gcry_md_close (textmd); + release_sk_list (sk_list); + release_progress_context (pfx); + release_armor_context (afx); + return rc; } + /* * Sign and conventionally encrypt the given file. * FIXME: Far too much code is duplicated - revamp the whole file. @@ -1269,175 +1307,179 @@ clearsign_file (ctrl_t ctrl, int sign_symencrypt_file (ctrl_t ctrl, const char *fname, strlist_t locusr) { - armor_filter_context_t *afx; - progress_filter_context_t *pfx; - compress_filter_context_t zfx; - md_filter_context_t mfx; - text_filter_context_t tfx; - cipher_filter_context_t cfx; - IOBUF inp = NULL, out = NULL; - PACKET pkt; - STRING2KEY *s2k = NULL; - int rc = 0; - SK_LIST sk_list = NULL; - SK_LIST sk_rover = NULL; - int algo; - u32 duration=0; - int canceled; - - pfx = new_progress_context (); - afx = new_armor_context (); - memset( &zfx, 0, sizeof zfx); - memset( &mfx, 0, sizeof mfx); - memset( &tfx, 0, sizeof tfx); - memset( &cfx, 0, sizeof cfx); - init_packet( &pkt ); - - if (opt.ask_sig_expire && !opt.batch) - duration = ask_expire_interval (1, opt.def_sig_expire); - else - duration = parse_expire_string (opt.def_sig_expire); - - /* Note: In the old non-agent version the following call used to - unprotect the secret key. This is now done on demand by the agent. */ - rc = build_sk_list (ctrl, locusr, &sk_list, PUBKEY_USAGE_SIG); - if (rc) - goto leave; - - /* prepare iobufs */ - inp = iobuf_open(fname); - if (inp && is_secured_file (iobuf_get_fd (inp))) - { - iobuf_close (inp); - inp = NULL; - gpg_err_set_errno (EPERM); - } - if( !inp ) { - rc = gpg_error_from_syserror (); - log_error (_("can't open '%s': %s\n"), - fname? fname: "[stdin]", strerror(errno) ); - goto leave; + armor_filter_context_t *afx; + progress_filter_context_t *pfx; + compress_filter_context_t zfx; + md_filter_context_t mfx; + text_filter_context_t tfx; + cipher_filter_context_t cfx; + iobuf_t inp = NULL; + iobuf_t out = NULL; + PACKET pkt; + STRING2KEY *s2k = NULL; + int rc = 0; + SK_LIST sk_list = NULL; + SK_LIST sk_rover = NULL; + int algo; + u32 duration = 0; + int canceled; + + pfx = new_progress_context (); + afx = new_armor_context (); + memset (&zfx, 0, sizeof zfx); + memset (&mfx, 0, sizeof mfx); + memset (&tfx, 0, sizeof tfx); + memset (&cfx, 0, sizeof cfx); + init_packet (&pkt); + + if (opt.ask_sig_expire && !opt.batch) + duration = ask_expire_interval (1, opt.def_sig_expire); + else + duration = parse_expire_string (opt.def_sig_expire); + + /* Note: In the old non-agent version the following call used to + * unprotect the secret key. This is now done on demand by the agent. */ + rc = build_sk_list (ctrl, locusr, &sk_list, PUBKEY_USAGE_SIG); + if (rc) + goto leave; + + /* Prepare iobufs. */ + inp = iobuf_open (fname); + if (inp && is_secured_file (iobuf_get_fd (inp))) + { + iobuf_close (inp); + inp = NULL; + gpg_err_set_errno (EPERM); } - handle_progress (pfx, inp, fname); + if (!inp) + { + rc = gpg_error_from_syserror (); + log_error (_("can't open '%s': %s\n"), + fname? fname: "[stdin]", gpg_strerror (rc)); + goto leave; + } + handle_progress (pfx, inp, fname); - /* prepare key */ - s2k = xmalloc_clear( sizeof *s2k ); - s2k->mode = opt.s2k_mode; - s2k->hash_algo = S2K_DIGEST_ALGO; + /* Prepare key. */ + s2k = xmalloc_clear (sizeof *s2k); + s2k->mode = opt.s2k_mode; + s2k->hash_algo = S2K_DIGEST_ALGO; - algo = default_cipher_algo(); - cfx.dek = passphrase_to_dek (algo, s2k, 1, 1, NULL, &canceled); + algo = default_cipher_algo (); + cfx.dek = passphrase_to_dek (algo, s2k, 1, 1, NULL, &canceled); - if (!cfx.dek || !cfx.dek->keylen) { - rc = gpg_error (canceled?GPG_ERR_CANCELED:GPG_ERR_BAD_PASSPHRASE); - log_error(_("error creating passphrase: %s\n"), gpg_strerror (rc) ); - goto leave; + if (!cfx.dek || !cfx.dek->keylen) + { + rc = gpg_error (canceled?GPG_ERR_CANCELED:GPG_ERR_BAD_PASSPHRASE); + log_error (_("error creating passphrase: %s\n"), gpg_strerror (rc)); + goto leave; } - cfx.dek->use_aead = use_aead (NULL, cfx.dek->algo); - if (!cfx.dek->use_aead) - cfx.dek->use_mdc = !!use_mdc (NULL, cfx.dek->algo); - - if (!opt.quiet || !opt.batch) - log_info (_("%s.%s encryption will be used\n"), - openpgp_cipher_algo_name (algo), - cfx.dek->use_aead? openpgp_aead_algo_name (cfx.dek->use_aead) - /**/ : "CFB"); - - /* now create the outfile */ - rc = open_outfile (-1, fname, opt.armor? 1:0, 0, &out); - if (rc) - goto leave; - - /* prepare to calculate the MD over the input */ - if (opt.textmode) - iobuf_push_filter (inp, text_filter, &tfx); - if ( gcry_md_open (&mfx.md, 0, 0) ) - BUG (); - if ( DBG_HASHING ) - gcry_md_debug (mfx.md, "symc-sign"); + cfx.dek->use_aead = use_aead (NULL, cfx.dek->algo); + if (!cfx.dek->use_aead) + cfx.dek->use_mdc = !!use_mdc (NULL, cfx.dek->algo); + + if (!opt.quiet || !opt.batch) + log_info (_("%s.%s encryption will be used\n"), + openpgp_cipher_algo_name (algo), + cfx.dek->use_aead? openpgp_aead_algo_name (cfx.dek->use_aead) + /**/ : "CFB"); + + /* Now create the outfile. */ + rc = open_outfile (-1, fname, opt.armor? 1:0, 0, &out); + if (rc) + goto leave; + + /* Prepare to calculate the MD over the input. */ + if (opt.textmode) + iobuf_push_filter (inp, text_filter, &tfx); + if (gcry_md_open (&mfx.md, 0, 0)) + BUG (); + if (DBG_HASHING) + gcry_md_debug (mfx.md, "symc-sign"); - for (sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next) - gcry_md_enable (mfx.md, hash_for (sk_rover->pk)); + for (sk_rover = sk_list; sk_rover; sk_rover = sk_rover->next) + gcry_md_enable (mfx.md, hash_for (sk_rover->pk)); - iobuf_push_filter (inp, md_filter, &mfx); + iobuf_push_filter (inp, md_filter, &mfx); - /* Push armor output filter */ - if (opt.armor) - push_armor_filter (afx, out); + /* Push armor output filter */ + if (opt.armor) + push_armor_filter (afx, out); - /* Write the symmetric key packet */ - /*(current filters: armor)*/ + /* Write the symmetric key packet */ + /* (current filters: armor)*/ + { + PKT_symkey_enc *enc = xmalloc_clear( sizeof *enc ); + + enc->version = 4; + enc->cipher_algo = cfx.dek->algo; + enc->s2k = *s2k; + pkt.pkttype = PKT_SYMKEY_ENC; + pkt.pkt.symkey_enc = enc; + if ((rc = build_packet (out, &pkt))) + log_error ("build symkey packet failed: %s\n", gpg_strerror (rc)); + xfree (enc); + } + + /* Push the encryption filter */ + iobuf_push_filter (out, + cfx.dek->use_aead? cipher_filter_aead + /**/ : cipher_filter_cfb, + &cfx); + + /* Push the compress filter */ + if (default_compress_algo()) { - PKT_symkey_enc *enc = xmalloc_clear( sizeof *enc ); - enc->version = 4; - enc->cipher_algo = cfx.dek->algo; - enc->s2k = *s2k; - pkt.pkttype = PKT_SYMKEY_ENC; - pkt.pkt.symkey_enc = enc; - if( (rc = build_packet( out, &pkt )) ) - log_error("build symkey packet failed: %s\n", gpg_strerror (rc) ); - xfree(enc); + if (cfx.dek && (cfx.dek->use_mdc || cfx.dek->use_aead)) + zfx.new_ctb = 1; + push_compress_filter (out, &zfx,default_compress_algo() ); } - /* Push the encryption filter */ - iobuf_push_filter (out, - cfx.dek->use_aead? cipher_filter_aead - /**/ : cipher_filter_cfb, - &cfx); + /* Write the one-pass signature packets */ + /* (current filters: zip - encrypt - armor) */ + rc = write_onepass_sig_packets (sk_list, out, opt.textmode? 0x01:0x00); + if (rc) + goto leave; - /* Push the compress filter */ - if (default_compress_algo()) - { - if (cfx.dek && (cfx.dek->use_mdc || cfx.dek->use_aead)) - zfx.new_ctb = 1; - push_compress_filter (out, &zfx,default_compress_algo() ); - } + write_status_begin_signing (mfx.md); - /* Write the one-pass signature packets */ - /*(current filters: zip - encrypt - armor)*/ - rc = write_onepass_sig_packets (sk_list, out, - opt.textmode? 0x01:0x00); - if (rc) - goto leave; + /* Pipe data through all filters; i.e. write the signed stuff. */ + /* (current filters: zip - encrypt - armor) */ + rc = write_plaintext_packet (out, inp, fname, + opt.textmode ? (opt.mimemode?'m':'t'):'b'); + if (rc) + goto leave; - write_status_begin_signing (mfx.md); - - /* Pipe data through all filters; i.e. write the signed stuff */ - /*(current filters: zip - encrypt - armor)*/ - rc = write_plaintext_packet (out, inp, fname, - opt.textmode ? (opt.mimemode?'m':'t'):'b'); - if (rc) - goto leave; - - /* Write the signatures */ - /*(current filters: zip - encrypt - armor)*/ - rc = write_signature_packets (ctrl, sk_list, out, mfx.md, - opt.textmode? 0x01 : 0x00, - 0, duration, 'S', NULL); - if( rc ) - goto leave; + /* Write the signatures. */ + /* (current filters: zip - encrypt - armor) */ + rc = write_signature_packets (ctrl, sk_list, out, mfx.md, + opt.textmode? 0x01 : 0x00, + 0, duration, 'S', NULL); + if (rc) + goto leave; - leave: - if( rc ) - iobuf_cancel(out); - else { - iobuf_close(out); - write_status( STATUS_END_ENCRYPTION ); + leave: + if (rc) + iobuf_cancel (out); + else + { + iobuf_close (out); + write_status (STATUS_END_ENCRYPTION); } - iobuf_close(inp); - release_sk_list( sk_list ); - gcry_md_close( mfx.md ); - xfree(cfx.dek); - xfree(s2k); - release_progress_context (pfx); - release_armor_context (afx); - return rc; + iobuf_close (inp); + release_sk_list (sk_list); + gcry_md_close (mfx.md); + xfree (cfx.dek); + xfree (s2k); + release_progress_context (pfx); + release_armor_context (afx); + return rc; } -/**************** +/* * Create a v4 signature in *RET_SIG. * * PK is the primary key to sign (required for all sigs) @@ -1472,105 +1514,101 @@ make_keysig_packet (ctrl_t ctrl, int (*mksubpkt)(PKT_signature *, void *), void *opaque, const char *cache_nonce) { - PKT_signature *sig; - int rc=0; - int sigversion; - gcry_md_hd_t md; + PKT_signature *sig; + int rc = 0; + int sigversion; + gcry_md_hd_t md; - log_assert ((sigclass >= 0x10 && sigclass <= 0x13) || sigclass == 0x1F - || sigclass == 0x20 || sigclass == 0x18 || sigclass == 0x19 - || sigclass == 0x30 || sigclass == 0x28 ); + log_assert ((sigclass >= 0x10 && sigclass <= 0x13) || sigclass == 0x1F + || sigclass == 0x20 || sigclass == 0x18 || sigclass == 0x19 + || sigclass == 0x30 || sigclass == 0x28 ); - sigversion = 4; - if (sigversion < pksk->version) - sigversion = pksk->version; + sigversion = 4; + if (sigversion < pksk->version) + sigversion = pksk->version; - if( !digest_algo ) - { - /* Basically, this means use SHA1 always unless the user - specified something (use whatever they said), or it's DSA - (use the best match). They still can't pick an - inappropriate hash for DSA or the signature will fail. - Note that this still allows the caller of - make_keysig_packet to override the user setting if it - must. */ - - if(opt.cert_digest_algo) - digest_algo=opt.cert_digest_algo; - else if(pksk->pubkey_algo == PUBKEY_ALGO_DSA) - digest_algo = match_dsa_hash (gcry_mpi_get_nbits (pksk->pkey[1])/8); - else if (pksk->pubkey_algo == PUBKEY_ALGO_ECDSA - || pksk->pubkey_algo == PUBKEY_ALGO_EDDSA) - { - if (openpgp_oid_is_ed25519 (pksk->pkey[0])) - digest_algo = DIGEST_ALGO_SHA256; - else - digest_algo = match_dsa_hash - (ecdsa_qbits_from_Q (gcry_mpi_get_nbits (pksk->pkey[1]))/8); - } - else - digest_algo = DEFAULT_DIGEST_ALGO; - } + if (!digest_algo) + { + /* Basically, this means use SHA1 always unless the user + * specified something (use whatever they said), or it's DSA + * (use the best match). They still can't pick an inappropriate + * hash for DSA or the signature will fail. Note that this + * still allows the caller of make_keysig_packet to override the + * user setting if it must. */ + + if (opt.cert_digest_algo) + digest_algo = opt.cert_digest_algo; + else if (pksk->pubkey_algo == PUBKEY_ALGO_DSA) + digest_algo = match_dsa_hash (gcry_mpi_get_nbits (pksk->pkey[1])/8); + else if (pksk->pubkey_algo == PUBKEY_ALGO_ECDSA + || pksk->pubkey_algo == PUBKEY_ALGO_EDDSA) + { + if (openpgp_oid_is_ed25519 (pksk->pkey[0])) + digest_algo = DIGEST_ALGO_SHA256; + else + digest_algo = match_dsa_hash + (ecdsa_qbits_from_Q (gcry_mpi_get_nbits (pksk->pkey[1]))/8); + } + else + digest_algo = DEFAULT_DIGEST_ALGO; + } - if ( gcry_md_open (&md, digest_algo, 0 ) ) - BUG (); + if (gcry_md_open (&md, digest_algo, 0)) + BUG (); - /* Hash the public key certificate. */ - hash_public_key( md, pk ); + /* Hash the public key certificate. */ + hash_public_key (md, pk); - if( sigclass == 0x18 || sigclass == 0x19 || sigclass == 0x28 ) - { - /* hash the subkey binding/backsig/revocation */ - hash_public_key( md, subpk ); - } - else if( sigclass != 0x1F && sigclass != 0x20 ) - { - /* hash the user id */ - hash_uid (md, sigversion, uid); - } - /* and make the signature packet */ - sig = xmalloc_clear( sizeof *sig ); - sig->version = sigversion; - sig->flags.exportable=1; - sig->flags.revocable=1; - keyid_from_pk (pksk, sig->keyid); - sig->pubkey_algo = pksk->pubkey_algo; - sig->digest_algo = digest_algo; - if(timestamp) - sig->timestamp=timestamp; - else - sig->timestamp=make_timestamp(); - if(duration) - sig->expiredate=sig->timestamp+duration; - sig->sig_class = sigclass; - - build_sig_subpkt_from_sig (sig, pksk); - mk_notation_policy_etc (sig, pk, pksk); - - /* Crucial that the call to mksubpkt comes LAST before the calls - to finalize the sig as that makes it possible for the mksubpkt - function to get a reliable pointer to the subpacket area. */ - if (mksubpkt) - rc = (*mksubpkt)( sig, opaque ); - - if( !rc ) { - hash_sigversion_to_magic (md, sig); - gcry_md_final (md); - - rc = complete_sig (ctrl, sig, pksk, md, cache_nonce); + if (sigclass == 0x18 || sigclass == 0x19 || sigclass == 0x28) + { + /* Hash the subkey binding/backsig/revocation. */ + hash_public_key (md, subpk); + } + else if (sigclass != 0x1F && sigclass != 0x20) + { + /* Hash the user id. */ + hash_uid (md, sigversion, uid); + } + /* Make the signature packet. */ + sig = xmalloc_clear (sizeof *sig); + sig->version = sigversion; + sig->flags.exportable = 1; + sig->flags.revocable = 1; + keyid_from_pk (pksk, sig->keyid); + sig->pubkey_algo = pksk->pubkey_algo; + sig->digest_algo = digest_algo; + sig->timestamp = timestamp? timestamp : make_timestamp (); + if (duration) + sig->expiredate = sig->timestamp + duration; + sig->sig_class = sigclass; + + build_sig_subpkt_from_sig (sig, pksk); + mk_notation_policy_etc (sig, pk, pksk); + + /* Crucial that the call to mksubpkt comes LAST before the calls + * to finalize the sig as that makes it possible for the mksubpkt + * function to get a reliable pointer to the subpacket area. */ + if (mksubpkt) + rc = (*mksubpkt)(sig, opaque); + + if (!rc) + { + hash_sigversion_to_magic (md, sig); + gcry_md_final (md); + rc = complete_sig (ctrl, sig, pksk, md, cache_nonce); } - gcry_md_close (md); - if( rc ) - free_seckey_enc( sig ); - else - *ret_sig = sig; - return rc; + gcry_md_close (md); + if (rc) + free_seckey_enc (sig); + else + *ret_sig = sig; + return rc; } -/**************** +/* * Create a new signature packet based on an existing one. * Only user ID signatures are supported for now. * PK is the public key to work on. @@ -1589,82 +1627,82 @@ update_keysig_packet (ctrl_t ctrl, int (*mksubpkt)(PKT_signature *, void *), void *opaque) { - PKT_signature *sig; - gpg_error_t rc = 0; - int digest_algo; - gcry_md_hd_t md; - - if ((!orig_sig || !pk || !pksk) - || (orig_sig->sig_class >= 0x10 && orig_sig->sig_class <= 0x13 && !uid) - || (orig_sig->sig_class == 0x18 && !subpk)) - return GPG_ERR_GENERAL; - - if ( opt.cert_digest_algo ) - digest_algo = opt.cert_digest_algo; - else - digest_algo = orig_sig->digest_algo; - - if ( gcry_md_open (&md, digest_algo, 0 ) ) - BUG (); + PKT_signature *sig; + gpg_error_t rc = 0; + int digest_algo; + gcry_md_hd_t md; + + if ((!orig_sig || !pk || !pksk) + || (orig_sig->sig_class >= 0x10 && orig_sig->sig_class <= 0x13 && !uid) + || (orig_sig->sig_class == 0x18 && !subpk)) + return GPG_ERR_GENERAL; + + if (opt.cert_digest_algo) + digest_algo = opt.cert_digest_algo; + else + digest_algo = orig_sig->digest_algo; - /* Hash the public key certificate and the user id. */ - hash_public_key( md, pk ); + if (gcry_md_open (&md, digest_algo, 0)) + BUG (); - if( orig_sig->sig_class == 0x18 ) - hash_public_key( md, subpk ); - else - hash_uid (md, orig_sig->version, uid); + /* Hash the public key certificate and the user id. */ + hash_public_key (md, pk); - /* create a new signature packet */ - sig = copy_signature (NULL, orig_sig); + if (orig_sig->sig_class == 0x18) + hash_public_key (md, subpk); + else + hash_uid (md, orig_sig->version, uid); - sig->digest_algo=digest_algo; + /* Create a new signature packet. */ + sig = copy_signature (NULL, orig_sig); - /* We need to create a new timestamp so that new sig expiration - calculations are done correctly... */ - sig->timestamp=make_timestamp(); + sig->digest_algo = digest_algo; - /* ... but we won't make a timestamp earlier than the existing - one. */ - { - int tmout = 0; - while(sig->timestamp<=orig_sig->timestamp) - { - if (++tmout > 5 && !opt.ignore_time_conflict) - { - rc = gpg_error (GPG_ERR_TIME_CONFLICT); - goto leave; - } - gnupg_sleep (1); - sig->timestamp=make_timestamp(); - } - } + /* We need to create a new timestamp so that new sig expiration + * calculations are done correctly... */ + sig->timestamp = make_timestamp(); - /* Note that already expired sigs will remain expired (with a - duration of 1) since build-packet.c:build_sig_subpkt_from_sig - detects this case. */ + /* ... but we won't make a timestamp earlier than the existing + * one. */ + { + int tmout = 0; + while (sig->timestamp <= orig_sig->timestamp) + { + if (++tmout > 5 && !opt.ignore_time_conflict) + { + rc = gpg_error (GPG_ERR_TIME_CONFLICT); + goto leave; + } + gnupg_sleep (1); + sig->timestamp = make_timestamp(); + } + } - /* Put the updated timestamp into the sig. Note that this will - automagically lower any sig expiration dates to correctly - correspond to the differences in the timestamps (i.e. the - duration will shrink). */ - build_sig_subpkt_from_sig (sig, pksk); + /* Note that already expired sigs will remain expired (with a + * duration of 1) since build-packet.c:build_sig_subpkt_from_sig + * detects this case. */ - if (mksubpkt) - rc = (*mksubpkt)(sig, opaque); + /* Put the updated timestamp into the sig. Note that this will + * automagically lower any sig expiration dates to correctly + * correspond to the differences in the timestamps (i.e. the + * duration will shrink). */ + build_sig_subpkt_from_sig (sig, pksk); - if (!rc) { - hash_sigversion_to_magic (md, sig); - gcry_md_final (md); + if (mksubpkt) + rc = (*mksubpkt)(sig, opaque); - rc = complete_sig (ctrl, sig, pksk, md, NULL); + if (!rc) + { + hash_sigversion_to_magic (md, sig); + gcry_md_final (md); + rc = complete_sig (ctrl, sig, pksk, md, NULL); } leave: - gcry_md_close (md); - if( rc ) - free_seckey_enc (sig); - else - *ret_sig = sig; - return rc; + gcry_md_close (md); + if (rc) + free_seckey_enc (sig); + else + *ret_sig = sig; + return rc; } commit 256a280c51f9ea862e4bfb0bb530c2a96f9088f9 Author: Werner Koch Date: Mon Oct 22 20:13:08 2018 +0200 dirmngr: Prepare for updated WKD specs with ?l= param * dirmngr/server.c (proc_wkd_get): Tack the raw local address to the request. -- We append the raw non-canonicalized local address part to the hash. Servers who serve the requests from static files will ignore the parameters and a test with posteo shows that also services using a database ignore the parameter. The general idea is that service providers may use their own canonicalization rules. The problem is that we currently filter the returned key for the full mail address and thus we will never see a key if the service did a different canonicalization than we. So consider this to be an experiment. Signed-off-by: Werner Koch diff --git a/dirmngr/server.c b/dirmngr/server.c index 2519fd6..05a530b 100644 --- a/dirmngr/server.c +++ b/dirmngr/server.c @@ -957,19 +957,28 @@ proc_wkd_get (ctrl_t ctrl, assuan_context_t ctx, char *line) } else { - uri = strconcat ("https://", - domain, - portstr, - "/.well-known/openpgpkey/hu/", - encodedhash, - NULL); - no_log = 1; - if (uri) + char *escapedmbox; + + escapedmbox = http_escape_string (mbox, "%;?&="); + if (escapedmbox) { - err = dirmngr_status_printf (ctrl, "SOURCE", "https://%s%s", - domain, portstr); - if (err) - goto leave; + uri = strconcat ("https://", + domain, + portstr, + "/.well-known/openpgpkey/hu/", + encodedhash, + "?l=", + escapedmbox, + NULL); + xfree (escapedmbox); + no_log = 1; + if (uri) + { + err = dirmngr_status_printf (ctrl, "SOURCE", "https://%s%s", + domain, portstr); + if (err) + goto leave; + } } } if (!uri) ----------------------------------------------------------------------- Summary of changes: dirmngr/server.c | 33 +- g10/build-packet.c | 2 +- g10/parse-packet.c | 16 +- g10/sig-check.c | 29 +- g10/sign.c | 1659 +++++++++++++++++++++++++++------------------------- 5 files changed, 900 insertions(+), 839 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 20:22:37 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 20:22:37 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-237-gbafcf70 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via bafcf7095159493a656382997f8b0d0bb11a20e8 (commit) via 2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc (commit) via 7385e1babf6eef586c79ad23f8e541aaf608c4e5 (commit) via 378719f25fe00d46393541f4a4f79e04484c3000 (commit) via 793fd8d876777c24c4d5072301fa530333d6e1d9 (commit) from 64a1e86fc06d89c980a196c61d2b6d77d167565e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bafcf7095159493a656382997f8b0d0bb11a20e8 Author: Werner Koch Date: Wed Oct 24 20:22:17 2018 +0200 agent: Fix possible uninitalized use of CTX in simple_pwquery. * common/simple-pwquery.c (agent_open): Clear CTX even on early error. -- GnuPG-bug-id: 4223 Signed-off-by: Werner Koch diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index e7f4af3..b8ada42 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -246,6 +246,7 @@ agent_open (assuan_context_t *ctx) #ifdef SPWQ_USE_LOGGING log_error (_("no gpg-agent running in this session\n")); #endif + *ctx = NULL; return SPWQ_NO_AGENT; } commit 2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc Author: Werner Koch Date: Wed Oct 24 20:16:26 2018 +0200 agent: Fix possible release of unitialize var in a genkey error case. * agent/command.c (cmd_genkey): Initialize 'value'. -- GnuPG-bug-id: 4222 Signed-off-by: Werner Koch diff --git a/agent/command.c b/agent/command.c index 0871753..7fbf1de 100644 --- a/agent/command.c +++ b/agent/command.c @@ -887,7 +887,7 @@ cmd_genkey (assuan_context_t ctx, char *line) ctrl_t ctrl = assuan_get_pointer (ctx); int rc; int no_protection; - unsigned char *value; + unsigned char *value = NULL; size_t valuelen; unsigned char *newpasswd = NULL; membuf_t outbuf; commit 7385e1babf6eef586c79ad23f8e541aaf608c4e5 Author: Werner Koch Date: Wed Oct 24 20:11:33 2018 +0200 ssh: Fix possible infinite loop in case of an read error. * agent/command-ssh.c (ssh_handler_add_identity): Handle other errors than EOF. -- GnuPG-bug-id: 4221 Signed-off-by: Werner Koch diff --git a/agent/command-ssh.c b/agent/command-ssh.c index ff1f0a5..86fd092 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -3249,9 +3249,10 @@ ssh_handler_add_identity (ctrl_t ctrl, estream_t request, estream_t response) while (1) { err = stream_read_byte (request, &b); - if (gpg_err_code (err) == GPG_ERR_EOF) - { - err = 0; + if (err) + { + if (gpg_err_code (err) == GPG_ERR_EOF) + err = 0; break; } commit 378719f25fe00d46393541f4a4f79e04484c3000 Author: Werner Koch Date: Wed Oct 24 20:04:52 2018 +0200 tools: Fix FILE memory leak in gpg-connect-agent. * tools/gpg-connect-agent.c (do_open): dup the fileno and close the stream. GnuPG-bug-id: 4220 Signed-off-by: Werner Koch diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index 00482a3..7eb7ffa 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -983,7 +983,7 @@ do_open (char *line) name, mode, strerror (errno)); return; } - fd = fileno (fp); + fd = dup (fileno (fp)); if (fd >= 0 && fd < DIM (open_fd_table)) { open_fd_table[fd].inuse = 1; @@ -1030,8 +1030,10 @@ do_open (char *line) else { log_error ("can't put fd %d into table\n", fd); - close (fd); + if (fd != -1) + close (fd); /* Table was full. */ } + fclose (fp); } commit 793fd8d876777c24c4d5072301fa530333d6e1d9 Author: Werner Koch Date: Wed Oct 24 19:55:19 2018 +0200 sm: Use the correct string in an error message. * sm/gpgsm.c (main): Fix error message. -- GnuPG-bug-id: 4219 diff --git a/sm/gpgsm.c b/sm/gpgsm.c index b054787..072b30d 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -1666,7 +1666,7 @@ main ( int argc, char **argv) || cmd == aClearsign, opt.extra_digest_algo)) log_error (_("digest algorithm '%s' may not be used in %s mode\n"), - forced_digest_algo, + extra_digest_algo, gnupg_compliance_option_string (opt.compliance)); if (log_get_errorcount(0)) ----------------------------------------------------------------------- Summary of changes: agent/command-ssh.c | 7 ++++--- agent/command.c | 2 +- common/simple-pwquery.c | 1 + sm/gpgsm.c | 2 +- tools/gpg-connect-agent.c | 6 ++++-- 5 files changed, 11 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 20:32:01 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 24 Oct 2018 20:32:01 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-17-ge532534 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via e53253485cd7ceb7012505a629d2cd997167ccab (commit) via 62c75271173f83c5770576aae7b84f55a9ccbc16 (commit) via 147e59b7815daafb32b570a96f1d1925d0f37008 (commit) via f1561e5196e54f11b18050eeaeda50e786d188c2 (commit) via 1b9b0fc54b9bcd5eb1e63816bd3222d7ac7572a7 (commit) from 01baee2b0ef4f81ac6ffa55480e91168dd27b430 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e53253485cd7ceb7012505a629d2cd997167ccab Author: Werner Koch Date: Wed Oct 24 20:22:17 2018 +0200 agent: Fix possible uninitalized use of CTX in simple_pwquery. * common/simple-pwquery.c (agent_open): Clear CTX even on early error. -- GnuPG-bug-id: 4223 Signed-off-by: Werner Koch (cherry picked from commit bafcf7095159493a656382997f8b0d0bb11a20e8) diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index e7f4af3..b8ada42 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -246,6 +246,7 @@ agent_open (assuan_context_t *ctx) #ifdef SPWQ_USE_LOGGING log_error (_("no gpg-agent running in this session\n")); #endif + *ctx = NULL; return SPWQ_NO_AGENT; } commit 62c75271173f83c5770576aae7b84f55a9ccbc16 Author: Werner Koch Date: Wed Oct 24 20:16:26 2018 +0200 agent: Fix possible release of unitialize var in a genkey error case. * agent/command.c (cmd_genkey): Initialize 'value'. -- GnuPG-bug-id: 4222 Signed-off-by: Werner Koch (cherry picked from commit 2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc) diff --git a/agent/command.c b/agent/command.c index 20abb28..adb2c00 100644 --- a/agent/command.c +++ b/agent/command.c @@ -860,7 +860,7 @@ cmd_genkey (assuan_context_t ctx, char *line) ctrl_t ctrl = assuan_get_pointer (ctx); int rc; int no_protection; - unsigned char *value; + unsigned char *value = NULL; size_t valuelen; unsigned char *newpasswd = NULL; membuf_t outbuf; commit 147e59b7815daafb32b570a96f1d1925d0f37008 Author: Werner Koch Date: Wed Oct 24 20:11:33 2018 +0200 ssh: Fix possible infinite loop in case of an read error. * agent/command-ssh.c (ssh_handler_add_identity): Handle other errors than EOF. -- GnuPG-bug-id: 4221 Signed-off-by: Werner Koch (cherry picked from commit 7385e1babf6eef586c79ad23f8e541aaf608c4e5) diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 20dc3fe..9255830 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -3244,9 +3244,10 @@ ssh_handler_add_identity (ctrl_t ctrl, estream_t request, estream_t response) while (1) { err = stream_read_byte (request, &b); - if (gpg_err_code (err) == GPG_ERR_EOF) - { - err = 0; + if (err) + { + if (gpg_err_code (err) == GPG_ERR_EOF) + err = 0; break; } commit f1561e5196e54f11b18050eeaeda50e786d188c2 Author: Werner Koch Date: Wed Oct 24 20:04:52 2018 +0200 tools: Fix FILE memory leak in gpg-connect-agent. * tools/gpg-connect-agent.c (do_open): dup the fileno and close the stream. GnuPG-bug-id: 4220 Signed-off-by: Werner Koch (cherry picked from commit 378719f25fe00d46393541f4a4f79e04484c3000) diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index 00482a3..7eb7ffa 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -983,7 +983,7 @@ do_open (char *line) name, mode, strerror (errno)); return; } - fd = fileno (fp); + fd = dup (fileno (fp)); if (fd >= 0 && fd < DIM (open_fd_table)) { open_fd_table[fd].inuse = 1; @@ -1030,8 +1030,10 @@ do_open (char *line) else { log_error ("can't put fd %d into table\n", fd); - close (fd); + if (fd != -1) + close (fd); /* Table was full. */ } + fclose (fp); } commit 1b9b0fc54b9bcd5eb1e63816bd3222d7ac7572a7 Author: Werner Koch Date: Wed Oct 24 19:55:19 2018 +0200 sm: Use the correct string in an error message. * sm/gpgsm.c (main): Fix error message. -- GnuPG-bug-id: 4219 (cherry picked from commit 793fd8d876777c24c4d5072301fa530333d6e1d9) diff --git a/sm/gpgsm.c b/sm/gpgsm.c index da1783d..defc698 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -1660,7 +1660,7 @@ main ( int argc, char **argv) || cmd == aClearsign, opt.extra_digest_algo)) log_error (_("digest algorithm '%s' may not be used in %s mode\n"), - forced_digest_algo, + extra_digest_algo, gnupg_compliance_option_string (opt.compliance)); if (log_get_errorcount(0)) ----------------------------------------------------------------------- Summary of changes: agent/command-ssh.c | 7 ++++--- agent/command.c | 2 +- common/simple-pwquery.c | 1 + sm/gpgsm.c | 2 +- tools/gpg-connect-agent.c | 6 ++++-- 5 files changed, 11 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 20:40:30 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Wed, 24 Oct 2018 20:40:30 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-238-gef540d1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via ef540d1af0649ebf1add190d0ab095e957658b7e (commit) from bafcf7095159493a656382997f8b0d0bb11a20e8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ef540d1af0649ebf1add190d0ab095e957658b7e Author: Daniel Kahn Gillmor Date: Wed Oct 24 14:39:56 2018 -0400 doc: fix spelling mistakes Signed-off-by: Daniel Kahn Gillmor diff --git a/doc/DETAILS b/doc/DETAILS index eb6d7dd..74a63ef 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -59,7 +59,7 @@ described here. - uat :: User attribute (same as user id except for field 10). - sig :: Signature - rev :: Revocation signature - - rvs :: Recocation signature (standalone) [since 2.2.9] + - rvs :: Revocation signature (standalone) [since 2.2.9] - fpr :: Fingerprint (fingerprint is in field 10) - pkd :: Public key data [*] - grp :: Keygrip @@ -126,7 +126,7 @@ described here. *** Field 4 - Public key algorithm The values here are those from the OpenPGP specs or if they are - greather than 255 the algorithm ids as used by Libgcrypt. + greater than 255 the algorithm ids as used by Libgcrypt. *** Field 5 - KeyID @@ -544,7 +544,7 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB: *** DECRYPTION_KEY This line is emitted when a public key decryption succeeded in providing a session key. is the hexified fingerprint of the - actual key used for descryption. is the fingerprint of the + actual key used for decryption. is the fingerprint of the primary key. is the letter with the ownertrust; this is in general a 'u' which stands for ultimately trusted. *** DECRYPTION_INFO [] @@ -700,7 +700,7 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB: - 0 :: No specific reason given - 1 :: Not Found - - 2 :: Ambigious specification + - 2 :: Ambiguous specification - 3 :: Wrong key usage - 4 :: Key revoked - 5 :: Key expired @@ -1016,7 +1016,7 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB: - 2 :: bad PIN *** SC_OP_SUCCESS - A smart card operaion succeeded. This status is only printed for + A smart card operation succeeded. This status is only printed for certain operation and is mostly useful to check whether a PIN change really worked. @@ -1073,7 +1073,7 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB: Deleting a key failed. Reason codes are: - 1 :: No such key - 2 :: Must delete secret key first - - 3 :: Ambigious specification + - 3 :: Ambiguous specification - 4 :: Key is stored on a smartcard. *** PROGRESS [] diff --git a/doc/HACKING b/doc/HACKING index 17c5826..4781bf6 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -150,7 +150,7 @@ Note that such a comment will be removed if the git commit option if ( 42 == foo ) #+end_src this is harder to read and modern compilers are pretty good in - detecing accidential assignments. It is also suggested not to + detecing accidental assignments. It is also suggested not to compare to 0 or NULL but to test the value direct or with a '!'; this makes it easier to see that a boolean test is done. - We use our own printf style functions like =es_printf=, and @@ -342,7 +342,7 @@ Note that such a comment will be removed if the git commit option - g10/main.h :: Prototypes and some constants - g10/mainproc.c :: Message processing - g10/armor.c :: Ascii armor filter - - g10/mdfilter.c :: Filter to calculate hashs + - g10/mdfilter.c :: Filter to calculate hashes - g10/textfilter.c :: Filter to handle CR/LF and trailing white space - g10/cipher.c :: En-/Decryption filter - g10/misc.c :: Utility functions @@ -395,7 +395,7 @@ The *secure versions allocate memory in the secure memory. That is, swapping out of this memory is avoided and is gets overwritten on free. Use this for passphrases, session keys and other sensitive material. This memory set aside for secure memory is linited to a few -k. In general the function don't print a memeory message and +k. In general the function don't print a memory message and terminate the process if there is not enough memory available. The "try" versions of the functions return NULL instead. diff --git a/doc/faq.org b/doc/faq.org index ddbeafa..2f873e6 100644 --- a/doc/faq.org +++ b/doc/faq.org @@ -1096,7 +1096,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates As of 1.0.3, keys generated with gpg are created with preferences to TWOFISH (and AES since 1.0.4) and that also means that they have the capability to use the new MDC encryption method. This will go into - OpenPGP soon, and is also suppoted by PGP 7. This new method avoids + OpenPGP soon, and is also supported by PGP 7. This new method avoids a (not so new) attack on all email encryption systems. This in turn means that pre-1.0.3 gpg binaries have problems with diff --git a/doc/tools.texi b/doc/tools.texi index 7becf67..6256c05 100644 --- a/doc/tools.texi +++ b/doc/tools.texi @@ -1561,7 +1561,7 @@ string @code{true} or @code{yes}. The evaluation is done by passing /subst /let i 3 /while $i - /echo loop couter is $i + /echo loop counter is $i /let i $@{- $i 1@} /end @end smallexample @@ -1962,7 +1962,7 @@ Extract all files from an encrypted archive. @item --sign @itemx -s -Make a signed archive from the given files and directories. Thsi can +Make a signed archive from the given files and directories. This can be combined with option @option{--encrypt} to create a signed and then encrypted archive. @@ -2031,7 +2031,7 @@ linefeed to separate file names. @item --openpgp @opindex openpgp -This option has no effect becuase OpenPGP encryption and signing is +This option has no effect because OpenPGP encryption and signing is the default. @item --cms diff --git a/doc/wks.texi b/doc/wks.texi index 4508ae2..51b86ca 100644 --- a/doc/wks.texi +++ b/doc/wks.texi @@ -61,7 +61,7 @@ Service provider. This is usuallay done to upload a key into a Web Key Directory. With the @option{--supported} command the caller can test whether a -site supports the Web Key Service. The argument is an arbitray +site supports the Web Key Service. The argument is an arbitrary address in the to be tested domain. For example @file{foo@@example.net}. The command returns success if the Web Key Service is supported. The operation is silent; to get diagnostic @@ -206,7 +206,7 @@ mail is processed. Commonly this command is used with the option @option{--send} to directly send the crerated mails back. See below for an installation example. -The command @option{--cron} is used for regualr cleanup tasks. For +The command @option{--cron} is used for regular cleanup tasks. For example non-confirmed requested should be removed after their expire time. It is best to run this command once a day from a cronjob. diff --git a/doc/yat2m.c b/doc/yat2m.c index c7bec33..be0ef17 100644 --- a/doc/yat2m.c +++ b/doc/yat2m.c @@ -55,7 +55,7 @@ .B whateever you want @end ifset - alternativly a special comment may be used: + alternatively a special comment may be used: @c man:.B whatever you want @@ -704,7 +704,7 @@ write_th (FILE *fp) /* Process the texinfo command COMMAND (without the leading @) and - write output if needed to FP. REST is the remainer of the line + write output if needed to FP. REST is the remainder of the line which should either point to an opening brace or to a white space. The function returns the number of characters already processed from REST. LEN is the usable length of REST. TABLE_LEVEL is used to @@ -1197,7 +1197,7 @@ parse_file (const char *fname, FILE *fp, char **section_name, int in_pause) if (*p == '@' && !strncmp (p+1, "item", 4)) item_indent = p - line; /* Set a new indent level. */ else if (p - line < item_indent) - item_indent = 0; /* Switch off indention. */ + item_indent = 0; /* Switch off indentation. */ if (item_indent) { ----------------------------------------------------------------------- Summary of changes: doc/DETAILS | 12 ++++++------ doc/HACKING | 6 +++--- doc/faq.org | 2 +- doc/tools.texi | 6 +++--- doc/wks.texi | 4 ++-- doc/yat2m.c | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 24 21:56:53 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Wed, 24 Oct 2018 21:56:53 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-239-g54eb375 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 54eb375ff14e2a93cea70eab35719be4d25f51ca (commit) from ef540d1af0649ebf1add190d0ab095e957658b7e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 54eb375ff14e2a93cea70eab35719be4d25f51ca Author: Daniel Kahn Gillmor Date: Wed Oct 24 15:56:18 2018 -0400 all: fix spelling and typos Signed-off-by: Daniel Kahn Gillmor diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 86fd092..8a41505 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -2751,7 +2751,7 @@ data_hash (unsigned char *data, size_t data_n, allow the use of signature algorithms that implement the hashing internally (e.g. Ed25519). On success the created signature is stored in ssh format at R_SIG and it's size at R_SIGLEN; the caller - must use es_free to releaase this memory. */ + must use es_free to release this memory. */ static gpg_error_t data_sign (ctrl_t ctrl, ssh_key_type_spec_t *spec, const void *hash, size_t hashlen, diff --git a/agent/divert-scd.c b/agent/divert-scd.c index baa1cc3..b978154 100644 --- a/agent/divert-scd.c +++ b/agent/divert-scd.c @@ -195,7 +195,7 @@ has_percent0A_suffix (const char *string) string with the passphrase, the buffer may optionally be padded with arbitrary characters. - If DESC_TEXT is not NULL it can be used as further informtion shown + If DESC_TEXT is not NULL it can be used as further information shown atop of the INFO message. INFO gets displayed as part of a generic string. However if the diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c index 1fdc94d..911064c 100644 --- a/agent/gpg-agent.c +++ b/agent/gpg-agent.c @@ -851,7 +851,7 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread) case oLogFile: if (!reread) - return 0; /* not handeld */ + return 0; /* not handled */ if (!current_logfile || !pargs->r.ret_str || strcmp (current_logfile, pargs->r.ret_str)) { @@ -1768,7 +1768,7 @@ main (int argc, char **argv ) /* Unless we are running with a program given on the command * line we can assume that the inotify things works and thus - * we can avoid tye regular stat calls. */ + * we can avoid the regular stat calls. */ if (!argc) reliable_homedir_inotify = 1; } @@ -2108,7 +2108,7 @@ get_agent_scd_notify_event (void) GetCurrentProcess(), &h2, EVENT_MODIFY_STATE|SYNCHRONIZE, TRUE, 0)) { - log_error ("setting syncronize for scd notify event failed: %s\n", + log_error ("setting synchronize for scd notify event failed: %s\n", w32_strerror (-1) ); CloseHandle (h); } diff --git a/agent/learncard.c b/agent/learncard.c index abe1dd0..f3219ed 100644 --- a/agent/learncard.c +++ b/agent/learncard.c @@ -40,7 +40,7 @@ struct keypair_info_s char hexgrip[1]; /* The keygrip (i.e. a hash over the public key parameters) formatted as a hex string. Allocated somewhat large to also act as - memeory for the above ID field. */ + memory for the above ID field. */ }; typedef struct keypair_info_s *KEYPAIR_INFO; diff --git a/agent/protect.c b/agent/protect.c index 16ae715..c7bd30b 100644 --- a/agent/protect.c +++ b/agent/protect.c @@ -1109,7 +1109,7 @@ agent_unprotect (ctrl_t ctrl, if (!protect_info[infidx].algo) return gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM); - /* See wether we have a protected-at timestamp. */ + /* See whether we have a protected-at timestamp. */ protect_list = s; /* Save for later. */ if (protected_at) { diff --git a/common/argparse.c b/common/argparse.c index 331998b..db0b7e0 100644 --- a/common/argparse.c +++ b/common/argparse.c @@ -408,7 +408,7 @@ static void store_alias( ARGPARSE_ARGS *arg, char *name, char *value ) { /* TODO: replace this dummy function with a rea one - * and fix the probelms IRIX has with (ALIAS_DEV)arg.. + * and fix the problems IRIX has with (ALIAS_DEV)arg.. * used as lvalue */ (void)arg; @@ -439,7 +439,7 @@ ignore_invalid_option_p (ARGPARSE_ARGS *arg, const char *keyword) /* Add the keywords up to the next LF to the list of to be ignored options. After returning FP will either be at EOF or the next - character read wll be the first of a new line. The function + character read will be the first of a new line. The function returns 0 on success or true on malloc failure. */ static int ignore_invalid_option_add (ARGPARSE_ARGS *arg, FILE *fp) @@ -1280,7 +1280,7 @@ long_opt_strlen( ARGPARSE_OPTS *o ) * this option * - a description,ine which starts with a '@' and is followed by * any other characters is printed as is; this may be used for examples - * ans such. + * and such. * - A description which starts with a '|' outputs the string between this * bar and the next one as arguments of the long option. */ diff --git a/common/convert.c b/common/convert.c index 6d03adc..40fb4ee 100644 --- a/common/convert.c +++ b/common/convert.c @@ -177,7 +177,7 @@ bin2hexcolon (const void *buffer, size_t length, char *stringbuf) string or a white space character. The function makes sure that the resulting string in BUFFER is terminated by a Nul byte. Note that the returned string may include embedded Nul bytes; the extra - Nul byte at the end is used to make sure tha the result can always + Nul byte at the end is used to make sure that the result can always be used as a C-string. BUFSIZE is the available length of BUFFER; if the converted result diff --git a/common/dotlock.c b/common/dotlock.c index 5227bb6..1bc31d8 100644 --- a/common/dotlock.c +++ b/common/dotlock.c @@ -140,7 +140,7 @@ you pass (0) instead of (-1) the function does not wait in case the file is already locked but returns -1 and sets ERRNO to EACCES. Any other positive value for the second parameter is considered a - timeout valuie in milliseconds. + timeout value in milliseconds. To release the lock you call: diff --git a/common/iobuf.c b/common/iobuf.c index 8f52f7f..18a458e 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -68,8 +68,8 @@ /*-- End configurable part. --*/ -/* The size of the iobuffers. This can be chnages using the - * iobuf_set_buffer_size fucntion. */ +/* The size of the iobuffers. This can be changed using the + * iobuf_set_buffer_size function. */ static unsigned int iobuf_buffer_size = DEFAULT_IOBUF_BUFFER_SIZE; diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c index d800e7d..86885e0 100644 --- a/common/openpgp-oid.c +++ b/common/openpgp-oid.c @@ -184,7 +184,7 @@ openpgp_oid_from_str (const char *string, gcry_mpi_t *r_mpi) } -/* Return a malloced string represenation of the OID in the opaque MPI +/* Return a malloced string representation of the OID in the opaque MPI A. In case of an error NULL is returned and ERRNO is set. */ char * openpgp_oid_to_str (gcry_mpi_t a) @@ -221,7 +221,7 @@ openpgp_oid_to_str (gcry_mpi_t a) /* To calculate the length of the string we can safely assume an upper limit of 3 decimal characters per byte. Two extra bytes - account for the special first octect */ + account for the special first octet */ string = p = xtrymalloc (length*(1+3)+2+1); if (!string) return NULL; diff --git a/common/percent.c b/common/percent.c index eeb026f..7b81768 100644 --- a/common/percent.c +++ b/common/percent.c @@ -42,7 +42,7 @@ failure. Note that we also escape the quote character to work around a bug - in the mingw32 runtime which does not correcty handle command line + in the mingw32 runtime which does not correctly handle command line quoting. We correctly double the quote mark when calling a program (i.e. gpg-protect-tool), but the pre-main code does not notice the double quote as an escaped quote. We do this also on POSIX systems diff --git a/common/sexputil.c b/common/sexputil.c index f30790a..02e52d0 100644 --- a/common/sexputil.c +++ b/common/sexputil.c @@ -303,7 +303,7 @@ make_simple_sexp_from_hexstr (const char *line, size_t *nscanned) for (; n > 1; n -=2, s += 2) *p++ = xtoi_2 (s); *p++ = ')'; - *p = 0; /* (Not really neaded.) */ + *p = 0; /* (Not really needed.) */ return buf; } diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index b8ada42..7688c84 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -75,7 +75,7 @@ /* Name of the socket to be used. This is a kludge to keep on using - the existsing code despite that we only support a standard socket. */ + the existing code despite that we only support a standard socket. */ static char *default_gpg_agent_info; diff --git a/common/stringhelp.c b/common/stringhelp.c index 0abac8a..751e571 100644 --- a/common/stringhelp.c +++ b/common/stringhelp.c @@ -1400,7 +1400,7 @@ parse_version_number (const char *s, int *number) /* This function breaks up the complete string-representation of the - version number S, which is of the following struture: .[.]. The major, minor, and micro number components will be stored in *MAJOR, *MINOR and *MICRO. If MICRO is not given 0 is used instead. diff --git a/common/t-exechelp.c b/common/t-exechelp.c index cf967fc..3bf082b 100644 --- a/common/t-exechelp.c +++ b/common/t-exechelp.c @@ -131,7 +131,7 @@ test_close_all_fds (void) free (array); /* Now let's check the realloc we use. We do this and the next - tests only if we are allowed to open enought descriptors. */ + tests only if we are allowed to open enough descriptors. */ if (get_max_fds () > 32) { int except[] = { 20, 23, 24, -1 }; diff --git a/dirmngr/cdblib.c b/dirmngr/cdblib.c index 827399f..c401263 100644 --- a/dirmngr/cdblib.c +++ b/dirmngr/cdblib.c @@ -19,7 +19,7 @@ length, meaning that corresponding hash table is empty. Right after toc section, data section follows without any - alingment. It consists of series of records, each is a key length, + alignment. It consists of series of records, each is a key length, value (data) length, key and value. Again, key and value length are 4-byte unsigned integers. Each next record follows previous without any special alignment. @@ -52,7 +52,7 @@ beginning of a table). When hash value in question is found in hash table, look to key of corresponding record, comparing it with key in question. If them of the same length and equals to each - other, then record is found, overwise, repeat with next hash table + other, then record is found, otherwise, repeat with next hash table slot. Note that there may be several records with the same key. */ @@ -245,7 +245,7 @@ cdb_find(struct cdb *cdbp, const void *key, cdbi_t klen) pos = cdb_unpack(htp); /* htab position */ if (n > (cdbp->cdb_fsize >> 3) /* overflow of httodo ? */ || pos > cdbp->cdb_fsize /* htab start within file ? */ - || httodo > cdbp->cdb_fsize - pos) /* entrie htab within file ? */ + || httodo > cdbp->cdb_fsize - pos) /* htab entry within file ? */ { gpg_err_set_errno (EPROTO); return -1; diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c index fbe3bee..a2867be 100644 --- a/dirmngr/crlcache.c +++ b/dirmngr/crlcache.c @@ -1782,7 +1782,7 @@ crl_parse_insert (ctrl_t ctrl, ksba_crl_t crl, ksba_sexp_t keyid; /* We need to look for the issuer only after having read - all items. The issuer itselfs comes before the items + all items. The issuer itself comes before the items but the optional authorityKeyIdentifier comes after the items. */ err = ksba_crl_get_issuer (crl, &crlissuer); @@ -1907,7 +1907,7 @@ get_crl_number (ksba_crl_t crl) /* Return the authorityKeyIdentifier or NULL if it is not available. - The issuer name may consists of several parts - they are delimted by + The issuer name may consists of several parts - they are delimited by 0x01. */ static char * get_auth_key_id (ksba_crl_t crl, char **serialno) diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c index 1696be5..80fb134 100644 --- a/dirmngr/dirmngr.c +++ b/dirmngr/dirmngr.c @@ -338,7 +338,7 @@ static int active_connections; * thread to run background network tasks. */ static int network_activity_seen; -/* A list of filenames registred with --hkp-cacert. */ +/* A list of filenames registered with --hkp-cacert. */ static strlist_t hkp_cacert_filenames; @@ -411,7 +411,7 @@ my_strusage( int level ) /* Callback from libksba to hash a provided buffer. Our current implementation does only allow SHA-1 for hashing. This may be - extended by mapping the name, testing for algorithm availibility + extended by mapping the name, testing for algorithm availability and adjust the length checks accordingly. */ static gpg_error_t my_ksba_hash_buffer (void *arg, const char *oid, @@ -520,7 +520,7 @@ set_tor_mode (void) { if (dirmngr_use_tor ()) { - /* Enable Tor mode and when called again force a new curcuit + /* Enable Tor mode and when called again force a new circuit * (e.g. on SIGHUP). */ enable_dns_tormode (1); if (assuan_sock_set_flag (ASSUAN_INVALID_FD, "tor-mode", 1)) @@ -752,7 +752,7 @@ parse_rereadable_options (ARGPARSE_ARGS *pargs, int reread) } -/* This fucntion is called after option parsing to adjust some values +/* This function is called after option parsing to adjust some values * and call option setup functions. */ static void post_option_parsing (void) diff --git a/dirmngr/dirmngr_ldap.c b/dirmngr/dirmngr_ldap.c index 8452c3b..dd7e4bd 100644 --- a/dirmngr/dirmngr_ldap.c +++ b/dirmngr/dirmngr_ldap.c @@ -417,9 +417,9 @@ set_timeout (my_opt_t myopt) sec_attr.nLength = sizeof sec_attr; sec_attr.bInheritHandle = FALSE; - /* Create a manual resetable timer. */ + /* Create a manual resettable timer. */ timer = CreateWaitableTimer (NULL, TRUE, NULL); - /* Intially set the timer. */ + /* Initially set the timer. */ SetWaitableTimer (timer, &due_time, 0, NULL, NULL, 0); if (CreateThread (&sec_attr, 0, alarm_thread, timer, 0, &tid)) diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c index 09b17c0..f86ccb0 100644 --- a/dirmngr/dns-stuff.c +++ b/dirmngr/dns-stuff.c @@ -151,7 +151,7 @@ static char tor_socks_password[20]; #ifdef USE_LIBDNS -/* Libdns gobal data. */ +/* Libdns global data. */ struct libdns_s { struct dns_resolv_conf *resolv_conf; diff --git a/dirmngr/dns.c b/dirmngr/dns.c index 77f83f4..596e81f 100644 --- a/dirmngr/dns.c +++ b/dirmngr/dns.c @@ -1832,7 +1832,7 @@ static void dns_p_free(struct dns_packet *P) { } /* dns_p_free() */ -/* convience routine to free any existing packet before storing new packet */ +/* convenience routine to free any existing packet before storing new packet */ static struct dns_packet *dns_p_setptr(struct dns_packet **dst, struct dns_packet *src) { dns_p_free(*dst); @@ -7634,7 +7634,7 @@ retry: goto udp_connect_retry; } else if (error == ECONNREFUSED) /* Error for previous socket operation may - be reserverd asynchronously. */ + be reserverd(?) asynchronously. */ goto udp_connect_retry; if (error) diff --git a/dirmngr/http-ntbtls.c b/dirmngr/http-ntbtls.c index ed4cdd4..924b8b2 100644 --- a/dirmngr/http-ntbtls.c +++ b/dirmngr/http-ntbtls.c @@ -55,7 +55,7 @@ gnupg_http_tls_verify_cb (void *opaque, log_assert (ctrl && ctrl->magic == SERVER_CONTROL_MAGIC); log_assert (!ntbtls_check_context (tls)); - /* Get the peer's certs fron ntbtls. */ + /* Get the peer's certs from ntbtls. */ for (idx = 0; (cert = ntbtls_x509_get_peer_cert (tls, idx)); idx++) { diff --git a/dirmngr/ks-action.c b/dirmngr/ks-action.c index c1ecafb..3651ca7 100644 --- a/dirmngr/ks-action.c +++ b/dirmngr/ks-action.c @@ -88,7 +88,7 @@ ks_action_help (ctrl_t ctrl, const char *url) return err; } - /* Call all engines to give them a chance to print a help sting. */ + /* Call all engines to give them a chance to print a help string. */ err = ks_hkp_help (ctrl, parsed_uri); if (!err) err = ks_http_help (ctrl, parsed_uri); diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index 31fa772..790a8b1 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -1381,7 +1381,7 @@ handle_send_request_error (ctrl_t ctrl, gpg_error_t err, const char *request, int retry = 0; /* Fixme: Should we disable all hosts of a protocol family if a - * request for an address of that familiy returned ENETDOWN? */ + * request for an address of that family returned ENETDOWN? */ switch (gpg_err_code (err)) { diff --git a/dirmngr/ldap.c b/dirmngr/ldap.c index cb3c0b7..a04bb97 100644 --- a/dirmngr/ldap.c +++ b/dirmngr/ldap.c @@ -388,7 +388,7 @@ parse_one_pattern (const char *pattern) } /* Take the string STRING and escape it according to the URL rules. - Retun a newly allocated string. */ + Return a newly allocated string. */ static char * escape4url (const char *string) { diff --git a/dirmngr/misc.c b/dirmngr/misc.c index 1270b83..9ad60d5 100644 --- a/dirmngr/misc.c +++ b/dirmngr/misc.c @@ -637,7 +637,7 @@ armor_data (char **r_string, const void *data, size_t datalen) } -/* Copy all data from IN to OUT. OUT may be NULL to use this fucntion +/* Copy all data from IN to OUT. OUT may be NULL to use this function * as a dummy reader. */ gpg_error_t copy_stream (estream_t in, estream_t out) diff --git a/dirmngr/ocsp.c b/dirmngr/ocsp.c index 966eda3..79c252d 100644 --- a/dirmngr/ocsp.c +++ b/dirmngr/ocsp.c @@ -343,7 +343,7 @@ validate_responder_cert (ctrl_t ctrl, ksba_cert_t cert, Note, that in theory we could simply ask the client via an inquire to validate a certificate but this might involve - calling DirMngr again recursivly - we can't do that as of now + calling DirMngr again recursively - we can't do that as of now (neither DirMngr nor gpgsm have the ability for concurrent access to DirMngr. */ @@ -391,7 +391,7 @@ check_signature_core (ctrl_t ctrl, ksba_cert_t cert, gcry_sexp_t s_sig, } -/* Check the signature of an OCSP repsonse. OCSP is the context, +/* Check the signature of an OCSP response. OCSP is the context, S_SIG the signature value and MD the handle of the hash we used for the response. This function automagically finds the correct public key. If SIGNER_FPR_LIST is not NULL, the default OCSP reponder has been @@ -788,7 +788,7 @@ ocsp_isvalid (ctrl_t ctrl, ksba_cert_t cert, const char *cert_fpr, err = gpg_error (GPG_ERR_TIME_CONFLICT); } - /* Check that we are not beyound NEXT_UPDATE (plus some extra time). */ + /* Check that we are not beyond NEXT_UPDATE (plus some extra time). */ if (*next_update) { gnupg_copy_time (tmp_time, next_update); diff --git a/dirmngr/t-http.c b/dirmngr/t-http.c index 2fc0a46..8b32613 100644 --- a/dirmngr/t-http.c +++ b/dirmngr/t-http.c @@ -137,7 +137,7 @@ my_http_tls_verify_cb (void *opaque, (void)session; (void)http_flags; - /* Get the peer's certs fron ntbtls. */ + /* Get the peer's certs from ntbtls. */ for (idx = 0; (cert = ntbtls_x509_get_peer_cert (tls_context, idx)); idx++) { diff --git a/dirmngr/workqueue.c b/dirmngr/workqueue.c index 2cb8573..a47cdeb 100644 --- a/dirmngr/workqueue.c +++ b/dirmngr/workqueue.c @@ -116,7 +116,7 @@ workqueue_add_task (wqtask_t func, const char *args, unsigned int session_id, /* Run the task described by ITEM. ITEM must have been detached from - * the workqueue; its ownership is transferred to this fucntion. */ + * the workqueue; its ownership is transferred to this function. */ static void run_a_task (ctrl_t ctrl, wqitem_t item) { diff --git a/g10/armor.c b/g10/armor.c index cc80968..98b870a 100644 --- a/g10/armor.c +++ b/g10/armor.c @@ -1,4 +1,4 @@ -/* armor.c - Armor flter +/* armor.c - Armor filter * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, * 2007 Free Software Foundation, Inc. * diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c index 388da3d..8f83c08 100644 --- a/g10/call-dirmngr.c +++ b/g10/call-dirmngr.c @@ -1083,7 +1083,7 @@ ks_put_inq_cb (void *opaque, const char *line) /* Send a key to the configured server. {DATA,DATLEN} contains the key in OpenPGP binary transport format. If KEYBLOCK is not NULL it - has the internal representaion of that key; this is for example + has the internal representation of that key; this is for example used to convey meta data to LDAP keyservers. */ gpg_error_t gpg_dirmngr_ks_put (ctrl_t ctrl, void *data, size_t datalen, kbnode_t keyblock) diff --git a/g10/card-util.c b/g10/card-util.c index 111dfbf..234abcb 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -648,7 +648,7 @@ current_card_status (ctrl_t ctrl, estream_t fp, info.fpr3len? info.fpr3 : NULL); thefprlen = (info.fpr1len? info.fpr1len : info.fpr2len? info.fpr2len : info.fpr3len? info.fpr3len : 0); - /* If the fingerprint is all 0xff, the key has no asssociated + /* If the fingerprint is all 0xff, the key has no associated OpenPGP certificate. */ if ( thefpr && !fpr_is_ff (thefpr, thefprlen) && !get_pubkey_byfprint (ctrl, pk, &keyblock, thefpr, thefprlen)) diff --git a/g10/cpr.c b/g10/cpr.c index 4354426..ed68b3f 100644 --- a/g10/cpr.c +++ b/g10/cpr.c @@ -187,7 +187,7 @@ write_status_text (int no, const char *text) } -/* Write a status line with code NO followed by the outout of the +/* Write a status line with code NO followed by the output of the * printf style FORMAT. The caller needs to make sure that LFs and * CRs are not printed. */ void diff --git a/g10/decrypt-data.c b/g10/decrypt-data.c index a3151b5..3951fa7 100644 --- a/g10/decrypt-data.c +++ b/g10/decrypt-data.c @@ -42,7 +42,7 @@ static int decode_filter ( void *opaque, int control, IOBUF a, /* Our context object. */ struct decode_filter_context_s { - /* Recounter (max value is 2). We need it becuase we do not know + /* Recounter (max value is 2). We need it because we do not know * whether the iobuf or the outer control code frees this object * first. */ int refcount; diff --git a/g10/encrypt.c b/g10/encrypt.c index 04a9ab2..972d13c 100644 --- a/g10/encrypt.c +++ b/g10/encrypt.c @@ -732,7 +732,7 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename, /* In case 3DES has been selected, print a warning if any key does not have a preference for AES. This should help to - indentify why encrypting to several recipients falls back to + identify why encrypting to several recipients falls back to 3DES. */ if (opt.verbose && cfx.dek->algo == CIPHER_ALGO_3DES) warn_missing_aes_from_pklist (pk_list); @@ -1003,7 +1003,7 @@ encrypt_filter (void *opaque, int control, /* In case 3DES has been selected, print a warning if any key does not have a preference for AES. This - should help to indentify why encrypting to several + should help to identify why encrypting to several recipients falls back to 3DES. */ if (opt.verbose && efx->cfx.dek->algo == CIPHER_ALGO_3DES) diff --git a/g10/export.c b/g10/export.c index b140e28..9477b75 100644 --- a/g10/export.c +++ b/g10/export.c @@ -1179,7 +1179,7 @@ print_status_exported (PKT_public_key *pk) * passphrase-protected. Otherwise, store secret key material in the * clear. * - * CACHE_NONCE_ADDR is used to share nonce for multple key retrievals. + * CACHE_NONCE_ADDR is used to share nonce for multiple key retrievals. */ gpg_error_t receive_seckey_from_agent (ctrl_t ctrl, gcry_cipher_hd_t cipherhd, diff --git a/g10/getkey.c b/g10/getkey.c index ea2dee2..75ce9cb 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -60,7 +60,7 @@ struct getkey_ctx_s search or not. A search that is exact requires that a key or subkey meet all of the specified criteria. A search that is not exact allows selecting a different key or subkey from the - keyblock that matched the critera. Further, an exact search + keyblock that matched the criteria. Further, an exact search returns the key or subkey that matched whereas a non-exact search typically returns the primary key. See finish_lookup for details. */ @@ -3364,7 +3364,7 @@ merge_selfsigs (ctrl_t ctrl, kbnode_t keyblock) * * 1. No requested usage and no primary key requested * Examples for this case are that we have a keyID to be used - * for decrytion or verification. + * for decryption or verification. * 2. No usage but primary key requested * This is the case for all functions which work on an * entire keyblock, e.g. for editing or listing diff --git a/g10/gpg.c b/g10/gpg.c index f04a340..aeb9c6f 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -3891,7 +3891,7 @@ main (int argc, char **argv) keygen_set_std_prefs(pers_compress_list,PREFTYPE_ZIP)) log_error(_("invalid personal compress preferences\n")); - /* Check chunk size. Please fix also the man page if you chnage + /* Check chunk size. Please fix also the man page if you change * the default. The limits are given by the specs. */ if (!opt.chunk_size) opt.chunk_size = 27; /* Default to the suggested max of 128 MiB. */ @@ -4875,9 +4875,9 @@ main (int argc, char **argv) while( endless || count ) { byte *p; - /* Wee need a multiple of 3, so that in case of + /* We need a multiple of 3, so that in case of armored output we get a correct string. No - linefolding is done, as it is best to levae this to + linefolding is done, as it is best to leave this to other tools */ size_t n = !endless && count < 99? count : 99; diff --git a/g10/import.c b/g10/import.c index 1f334dc..6fdd53e 100644 --- a/g10/import.c +++ b/g10/import.c @@ -1812,7 +1812,7 @@ import_one (ctrl_t ctrl, } } - /* Delete invalid parts and without the drop otions bail out if + /* Delete invalid parts and without the drop option bail out if * there are no user ids. */ if (!delete_inv_parts (ctrl, keyblock, keyid, options) && !(options & IMPORT_DROP_UIDS) ) diff --git a/g10/key-clean.c b/g10/key-clean.c index f66a0db..d701a66 100644 --- a/g10/key-clean.c +++ b/g10/key-clean.c @@ -500,7 +500,7 @@ clean_one_subkey_dupsigs (ctrl_t ctrl, kbnode_t subkeynode) log_debug ("\tchecking subkey %08lX for dupsigs\n", (ulong) keyid_from_pk (pk, NULL)); - /* First check that the choosen flag has been set. Note that we + /* First check that the chosen flag has been set. Note that we * only look at plain signatures so to keep all revocation * signatures which may carry important information. */ for (node = subkeynode->next; @@ -519,7 +519,7 @@ clean_one_subkey_dupsigs (ctrl_t ctrl, kbnode_t subkeynode) } if (!any_choosen) - return 0; /* Ooops no choosen flag set - we can't decide. */ + return 0; /* Ooops no chosen flag set - we can't decide. */ for (node = subkeynode->next; node && !(node->pkt->pkttype == PKT_PUBLIC_SUBKEY diff --git a/g10/keygen.c b/g10/keygen.c index 8177040..145b871 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -450,7 +450,7 @@ keygen_set_std_prefs (const char *string,int personal) } /* In case we have no compress algo at all, declare that - we prefer no compresssion. */ + we prefer no compression. */ if (!any_compress) strcat(dummy_string,"Z0 "); diff --git a/g10/mainproc.c b/g10/mainproc.c index 6ec1589..5b7bc95 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -811,7 +811,7 @@ proc_plaintext( CTX c, PACKET *pkt ) int any, clearsig, rc; kbnode_t n; - /* This is a literal data packet. Bumb a counter for later checks. */ + /* This is a literal data packet. Bump a counter for later checks. */ literals_seen++; if (pt->namelen == 8 && !memcmp( pt->name, "_CONSOLE", 8)) diff --git a/g10/misc.c b/g10/misc.c index 89b21e2..f129e83 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -549,7 +549,7 @@ openpgp_cipher_blocklen (cipher_algo_t algo) /**************** * Wrapper around the libgcrypt function with additional checks on - * the OpenPGP contraints for the algo ID. + * the OpenPGP constraints for the algo ID. */ int openpgp_cipher_test_algo (cipher_algo_t algo) @@ -712,7 +712,7 @@ openpgp_pk_test_algo2 (pubkey_algo_t algo, unsigned int use) #endif case PUBKEY_ALGO_ELGAMAL: - /* Dont't allow type 20 keys unless in rfc2440 mode. */ + /* Don't allow type 20 keys unless in rfc2440 mode. */ if (RFC2440) ga = GCRY_PK_ELG; break; diff --git a/g10/parse-packet.c b/g10/parse-packet.c index 78413e4..c0f2ca1 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -2351,7 +2351,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen, { log_error ("packet(%d) too large\n", pkttype); if (list_mode) - es_fputs (":key packet: [too larget]\n", listfp); + es_fputs (":key packet: [too large]\n", listfp); err = gpg_error (GPG_ERR_INV_PACKET); goto leave; } @@ -3180,7 +3180,7 @@ parse_plaintext (IOBUF inp, int pkttype, unsigned long pktlen, pt->name[i] = c; } /* Fill up NAME so that a check with valgrind won't complain about - * reading from uninitalized memory. This case may be triggred by + * reading from uninitialized memory. This case may be triggred by * corrupted packets. */ for (; i < namelen; i++) pt->name[i] = 0; diff --git a/g10/seskey.c b/g10/seskey.c index 1549017..fb71ad5 100644 --- a/g10/seskey.c +++ b/g10/seskey.c @@ -95,7 +95,7 @@ encode_session_key (int openpgp_pk_algo, DEK *dek, unsigned int nbits) output be a multiple of 8 bytes. */ if (openpgp_pk_algo == PUBKEY_ALGO_ECDH) { - /* Pad to 8 byte granulatiry; the padding byte is the number of + /* Pad to 8 byte granularity; the padding byte is the number of * padded bytes. * * A DEK(k bytes) CSUM(2 bytes) 0x 0x 0x 0x ... 0x @@ -143,7 +143,7 @@ encode_session_key (int openpgp_pk_algo, DEK *dek, unsigned int nbits) * * 0 2 RND(i bytes) 0 A DEK(k bytes) CSUM(2 bytes) * - * (But how can we store the leading 0 - the external representaion + * (But how can we store the leading 0 - the external representation * of MPIs doesn't allow leading zeroes =:-) * * RND are (at least 1) non-zero random bytes. diff --git a/g10/sign.c b/g10/sign.c index 213fd01..df88813 100644 --- a/g10/sign.c +++ b/g10/sign.c @@ -53,7 +53,7 @@ static int recipient_digest_algo=0; /* - * Create notations and other stuff. It is assumed that the stings in + * Create notations and other stuff. It is assumed that the strings in * STRLIST are already checked to contain only printable data and have * a valid NAME=VALUE format. */ diff --git a/g10/tdbio.c b/g10/tdbio.c index 8f75306..b6c38bd 100644 --- a/g10/tdbio.c +++ b/g10/tdbio.c @@ -106,7 +106,7 @@ struct cmp_xdir_struct static char *db_name; /* The handle for locking the trustdb file and a counter to record how - * often this lock has been taken. That counter is required becuase + * often this lock has been taken. That counter is required because * dotlock does not implemen recursive locks. */ static dotlock_t lockhandle; static unsigned int is_locked; @@ -589,7 +589,7 @@ tdbio_update_version_record (ctrl_t ctrl) /* * Create and write the trustdb version record. - * This is called with the writelock activ. + * This is called with the writelock active. * Returns: 0 on success or an error code. */ static int @@ -1139,7 +1139,7 @@ upd_hashtable (ctrl_t ctrl, ulong table, byte *key, int keylen, ulong newrecnum) if (rec.r.hlst.next) { - /* read the next reord of the list. */ + /* read the next record of the list. */ rc = tdbio_read_record (rec.r.hlst.next, &rec, RECTYPE_HLST); if (rc) { diff --git a/g10/trustdb.c b/g10/trustdb.c index 8ef6db5..c46dc50 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -1506,7 +1506,7 @@ store_validation_status (ctrl_t ctrl, int depth, /* Returns a sanitized copy of the regexp (which might be "", but not NULL). */ #ifndef DISABLE_REGEX -/* Operator charactors except '.' and backslash. +/* Operator characters except '.' and backslash. See regex(7) on BSD. */ #define REGEXP_OPERATOR_CHARS "^[$()|*+?{" diff --git a/g10/verify.c b/g10/verify.c index caeb1a2..73ac4ba 100644 --- a/g10/verify.c +++ b/g10/verify.c @@ -69,7 +69,7 @@ verify_signatures (ctrl_t ctrl, int nfiles, char **files ) * we can do it is by reading one byte from stdin and then unget * it; the problem here is that we may be reading from the * terminal (which could be detected using isatty() but won't work - * when under contol of a pty using program (e.g. expect)) and + * when under control of a pty using program (e.g. expect)) and * might get us in trouble when stdin is used for another purpose * (--passphrase-fd 0). So we have to break with the behaviour * prior to gpg 1.0.4 by assuming that case 3 is a normal diff --git a/g13/call-syshelp.c b/g13/call-syshelp.c index b160ba3..a69573b 100644 --- a/g13/call-syshelp.c +++ b/g13/call-syshelp.c @@ -174,7 +174,7 @@ call_syshelp_release (ctrl_t ctrl) -/* Staus callback for call_syshelp_find_device. */ +/* Status callback for call_syshelp_find_device. */ static gpg_error_t finddevice_status_cb (void *opaque, const char *line) { diff --git a/g13/mountinfo.c b/g13/mountinfo.c index ed898b8..50cc153 100644 --- a/g13/mountinfo.c +++ b/g13/mountinfo.c @@ -117,7 +117,7 @@ mountinfo_del_mount (const char *container, const char *mountpoint, size_t idx; mtab_t m; - /* If a container or mountpint is givem search the RID via the + /* If a container or mountpint is given search the RID via the standard find function. */ if (container || mountpoint) { diff --git a/g13/runner.c b/g13/runner.c index 138269d..b08d990 100644 --- a/g13/runner.c +++ b/g13/runner.c @@ -278,7 +278,7 @@ runner_set_pid (runner_t runner, pid_t pid) } -/* Register the engine handler fucntions HANDLER and HANDLER_CLEANUP +/* Register the engine handler functions HANDLER and HANDLER_CLEANUP and its private HANDLER_DATA with RUNNER. */ void runner_set_handler (runner_t runner, diff --git a/kbx/keybox-blob.c b/kbx/keybox-blob.c index 6874212..8172535 100644 --- a/kbx/keybox-blob.c +++ b/kbx/keybox-blob.c @@ -616,7 +616,7 @@ create_blob_header (KEYBOXBLOB blob, int blobtype, int as_ephemeral) if (blobtype == KEYBOX_BLOBTYPE_X509) { /* We don't want to point to ASN.1 encoded UserIDs (DNs) but to - the utf-8 string represenation of them */ + the utf-8 string representation of them */ for (i=0; i < blob->nuids; i++ ) { if (blob->uids[i].name) diff --git a/kbx/keybox-errors.c b/kbx/keybox-errors.c index ce2b498..cb5a092 100644 --- a/kbx/keybox-errors.c +++ b/kbx/keybox-errors.c @@ -8,7 +8,7 @@ * keybox_strerror: * @err: Error code * - * This function returns a textual representaion of the given + * This function returns a textual representation of the given * errorcode. If this is an unknown value, a string with the value * is returned (Beware: it is hold in a static buffer). * diff --git a/kbx/keybox-search.c b/kbx/keybox-search.c index e309cce..0a050ff 100644 --- a/kbx/keybox-search.c +++ b/kbx/keybox-search.c @@ -1069,7 +1069,7 @@ keybox_search (KEYBOX_HANDLE hd, KEYBOX_SEARCH_DESC *desc, size_t ndesc, /* Return the last found keyblock. Returns 0 on success and stores a - * new iobuf at R_IOBUF. R_UID_NO and R_PK_NO are used to retun the + * new iobuf at R_IOBUF. R_UID_NO and R_PK_NO are used to return the * number of the key or user id which was matched the search criteria; * if not known they are set to 0. */ gpg_error_t diff --git a/scd/apdu.c b/scd/apdu.c index c0b1bbe..f3e2a12 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -2646,7 +2646,7 @@ send_apdu (int slot, unsigned char *apdu, size_t apdulen, } -/* Core APDU tranceiver function. Parameters are described at +/* Core APDU transceiver function. Parameters are described at apdu_send_le with the exception of PININFO which indicates pinpad related operations if not NULL. If EXTENDED_MODE is not 0 command chaining or extended length will be used according to these diff --git a/scd/app-dinsig.c b/scd/app-dinsig.c index bea2856..983bed6 100644 --- a/scd/app-dinsig.c +++ b/scd/app-dinsig.c @@ -415,7 +415,7 @@ do_sign (app_t app, const char *keyidstr, int hashalgo, && indatalen != (15+20) && indatalen != (19+32)) return gpg_error (GPG_ERR_INV_VALUE); - /* Check that the provided ID is vaid. This is not really needed + /* Check that the provided ID is valid. This is not really needed but we do it to enforce correct usage by the caller. */ if (strncmp (keyidstr, "DINSIG.", 7) ) return gpg_error (GPG_ERR_INV_ID); diff --git a/scd/app-geldkarte.c b/scd/app-geldkarte.c index 510beb5..85bcedc 100644 --- a/scd/app-geldkarte.c +++ b/scd/app-geldkarte.c @@ -254,7 +254,7 @@ copy_bcd (const unsigned char *string, size_t length) } -/* Convert the BCD number at STING of LENGTH into an integer and store +/* Convert the BCD number at STRING of LENGTH into an integer and store that at RESULT. Return 0 on success. */ static gpg_error_t bcd_to_int (const unsigned char *string, size_t length, int *result) diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 87804f5..63265e4 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -643,7 +643,7 @@ count_bits (const unsigned char *a, size_t len) Where FLAGS is a plain hexadecimal number representing flag values. The lsb is here the rightmost bit. Defined flags bits are: - Bit 0 = CHV1 and CHV2 are not syncronized + Bit 0 = CHV1 and CHV2 are not synchronized Bit 1 = CHV2 has been set to the default PIN of "123456" (this implies that bit 0 is also set). diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index 6b0833b..ff82ef3 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -1937,7 +1937,7 @@ bulk_out (ccid_driver_t handle, unsigned char *msg, size_t msglen, is the sequence number used to send the request and EXPECTED_TYPE the type of message we expect. Does checks on the ccid header. TIMEOUT is the timeout value in ms. NO_DEBUG may be set to - avoid debug messages in case of no error; this can be overriden + avoid debug messages in case of no error; this can be overridden with a glibal debug level of at least 3. Returns 0 on success. */ static int bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length, @@ -2956,7 +2956,7 @@ ccid_transceive_apdu_level (ccid_driver_t handle, bit 3 unused bit 2..0 Source Node Address (SAD) - If node adresses are not used, SAD and DAD should be set to 0 on + If node addresses are not used, SAD and DAD should be set to 0 on the first block sent to the card. If they are used they should have different values (0 for one is okay); that first block sets up the addresses of the nodes. @@ -3298,7 +3298,7 @@ ccid_transceive (ccid_driver_t handle, /* Wait time extension request. */ unsigned char bwi = tpdu[3]; - /* Check if it's unsual value which can't be expressed in ATR. */ + /* Check if it's unusual value which can't be expressed in ATR. */ if (bwi > 15) wait_more = 1; diff --git a/scd/iso7816.c b/scd/iso7816.c index 29208c2..01faca5 100644 --- a/scd/iso7816.c +++ b/scd/iso7816.c @@ -427,7 +427,7 @@ iso7816_put_data_odd (int slot, int extended_mode, int tag, /* Manage Security Environment. This is a weird operation and there is no easy abstraction for it. Furthermore, some card seem to have - a different interpreation of 7816-8 and thus we resort to let the + a different interpretation of 7816-8 and thus we resort to let the caller decide what to do. */ gpg_error_t iso7816_manage_security_env (int slot, int p1, int p2, @@ -445,7 +445,7 @@ iso7816_manage_security_env (int slot, int p1, int p2, /* Perform the security operation COMPUTE DIGITAL SIGANTURE. On - success 0 is returned and the data is availavle in a newly + success 0 is returned and the data is available in a newly allocated buffer stored at RESULT with its length stored at RESULTLEN. For LE see do_generate_keypair. */ gpg_error_t diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 8f8a026..507108d 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -1069,7 +1069,7 @@ handle_signal (int signo) /* Create a name for the socket. We check for valid characters as well as against a maximum allowed length for a unix domain socket is done. The function terminates the process in case of an error. - Retunrs: Pointer to an allcoated string with the absolute name of + Returns: Pointer to an allcoated string with the absolute name of the socket used. */ static char * create_socket_name (char *standard_name) diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c index 3a38bca..bff7dd6 100644 --- a/sm/call-dirmngr.c +++ b/sm/call-dirmngr.c @@ -474,7 +474,7 @@ isvalid_status_cb (void *opaque, const char *line) { parm->seen++; if (!*s || !unhexify_fpr (s, parm->fpr)) - parm->seen++; /* Bumb it to indicate an error. */ + parm->seen++; /* Bump it to indicate an error. */ } return 0; } diff --git a/sm/certchain.c b/sm/certchain.c index 4e18caf..708e937 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -669,7 +669,7 @@ find_up (ctrl_t ctrl, KEYDB_HANDLE kh, log_debug (" found via authid and sn+issuer\n"); /* In case of an error, try to get the certificate from the - dirmngr. That is done by trying to put that certifcate + dirmngr. That is done by trying to put that certificate into the ephemeral DB and let the code below do the actual retrieve. Thus there is no error checking. Skipped in find_next mode as usual. */ @@ -908,7 +908,7 @@ is_root_cert (ksba_cert_t cert, const char *issuerdn, const char *subjectdn) { if (gpg_err_code (err) == GPG_ERR_NO_DATA) return 1; /* Yes. Without a authorityKeyIdentifier this needs - to be the Root certifcate (our trust anchor). */ + to be the Root certificate (our trust anchor). */ log_error ("error getting authorityKeyIdentifier: %s\n", gpg_strerror (err)); return 0; /* Well, it is broken anyway. Return No. */ @@ -1103,7 +1103,7 @@ check_validity_period (ksba_isotime_t current_time, } /* This is a variant of check_validity_period used with the chain - model. The dextra contraint here is that notBefore and notAfter + model. The extra constraint here is that notBefore and notAfter must exists and if the additional argument CHECK_TIME is given this time is used to check the validity period of SUBJECT_CERT. */ static gpg_error_t @@ -1553,7 +1553,7 @@ do_validate_chain (ctrl_t ctrl, ksba_cert_t cert, ksba_isotime_t checktime_arg, if (rc) goto leave; - break; /* Okay: a self-signed certicate is an end-point. */ + break; /* Okay: a self-signed certificate is an end-point. */ } /* End is_root. */ diff --git a/sm/certlist.c b/sm/certlist.c index c9e275e..12a4925 100644 --- a/sm/certlist.c +++ b/sm/certlist.c @@ -395,7 +395,7 @@ gpgsm_add_to_certlist (ctrl_t ctrl, const char *name, int secret, Further we ignore them if they are due to an identical certificate (which may happen if a - certificate is accidential duplicated in the + certificate is accidentally duplicated in the keybox). */ if (!keydb_get_cert (kh, &cert2)) { @@ -533,7 +533,7 @@ gpgsm_find_cert (ctrl_t ctrl, } /* If we don't have the KEYID filter we need to check for - ambiguous search results. Note, that it is somehwat + ambiguous search results. Note, that it is somewhat reasonable to assume that a specification of a KEYID won't lead to ambiguous names. */ if (!rc && !keyid) diff --git a/sm/certreqgen-ui.c b/sm/certreqgen-ui.c index 4f8a1ac..f64baf3 100644 --- a/sm/certreqgen-ui.c +++ b/sm/certreqgen-ui.c @@ -86,7 +86,7 @@ store_mb_lines (membuf_t *mb, membuf_t *lines) } -/* Chech whether we have a key for the key with HEXGRIP. Returns NULL +/* Check whether we have a key for the key with HEXGRIP. Returns NULL if not or a string describing the type of the key (RSA, ELG, DSA, etc..). */ static const char * diff --git a/sm/gpgsm.c b/sm/gpgsm.c index 072b30d..2f9e5bf 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -1571,7 +1571,7 @@ main ( int argc, char **argv) set_debug (); - /* Although we always use gpgsm_exit, we better install a regualr + /* Although we always use gpgsm_exit, we better install a regular exit handler so that at least the secure memory gets wiped out. */ if (atexit (emergency_cleanup)) diff --git a/sm/keydb.c b/sm/keydb.c index d85679a..a6ea9f7 100644 --- a/sm/keydb.c +++ b/sm/keydb.c @@ -106,7 +106,7 @@ try_make_homedir (const char *fname) /* Handle the creation of a keybox if it does not yet exist. Take - into acount that other processes might have the keybox already + into account that other processes might have the keybox already locked. This lock check does not work if the directory itself is not yet available. If R_CREATED is not NULL it will be set to true if the function created a new keybox. */ diff --git a/sm/minip12.c b/sm/minip12.c index f066892..76ce073 100644 --- a/sm/minip12.c +++ b/sm/minip12.c @@ -853,7 +853,7 @@ parse_bag_encrypted_data (const unsigned char *buffer, size_t length, if (ti.class == ASNCONTEXT && ti.tag == 0 && ti.is_constructed && ti.ndef) { /* Mozilla exported certs now come with single byte chunks of - octect strings. (Mozilla Firefox 1.0.4). Arghh. */ + octet strings. (Mozilla Firefox 1.0.4). Arghh. */ where = "cram-rc2or3des-ciphertext"; cram_buffer = cram_octet_string ( p, &n, &consumed); if (!cram_buffer) @@ -1210,7 +1210,7 @@ parse_bag_data (const unsigned char *buffer, size_t length, int startoffset, if (ti.is_constructed && ti.ndef) { /* Mozilla exported certs now come with single byte chunks of - octect strings. (Mozilla Firefox 1.0.4). Arghh. */ + octet strings. (Mozilla Firefox 1.0.4). Arghh. */ where = "cram-data.outersegs"; cram_buffer = cram_octet_string ( p, &n, &consumed); if (!cram_buffer) @@ -1550,7 +1550,7 @@ p12_parse (const unsigned char *buffer, size_t length, const char *pw, if (ti.is_constructed && ti.ndef) { /* Mozilla exported certs now come with single byte chunks of - octect strings. (Mozilla Firefox 1.0.4). Arghh. */ + octet strings. (Mozilla Firefox 1.0.4). Arghh. */ where = "cram-bags"; cram_buffer = cram_octet_string ( p, &n, NULL); if (!cram_buffer) diff --git a/sm/qualified.c b/sm/qualified.c index 6a7b473..70d03ae 100644 --- a/sm/qualified.c +++ b/sm/qualified.c @@ -140,7 +140,7 @@ read_list (char *key, char *country, int *lnr) Returns: 0 if the certificate is included. GPG_ERR_NOT_FOUND if it is not in the list or any other error (e.g. if no list of qualified signatures is available. If COUNTRY has not been passed - as NULL a string witha maximum length of 2 will be copied into it; + as NULL a string with a maximum length of 2 will be copied into it; thus the caller needs to provide a buffer of length 3. */ gpg_error_t gpgsm_is_in_qualified_list (ctrl_t ctrl, ksba_cert_t cert, char *country) diff --git a/tests/asschk.c b/tests/asschk.c index 65828e5..c77fd7c 100644 --- a/tests/asschk.c +++ b/tests/asschk.c @@ -30,7 +30,7 @@ expanded once and non existing macros expand to the empty string. A macro is dereferenced by prefixing its name with a dollar sign; the end of the name is currently indicated by a white space, a - dollar sign or a slash. To use a dollor sign verbatim, double it. + dollar sign or a slash. To use a dollar sign verbatim, double it. A macro is assigned by prefixing a statement with the macro name and an equal sign. The value is assigned verbatim if it does not @@ -47,7 +47,7 @@ [ =] [] - If NAME is not specifed but the statement returns a value it is + If NAME is not specified but the statement returns a value it is assigned to the name "?" so that it can be referenced using "$?". The following commands are implemented: @@ -274,7 +274,7 @@ writen (int fd, const char *buffer, size_t length) type and store that in recv_type. The function terminates on a communication error. Returns a pointer into the inputline to the first byte of the arguments. The parsing is very strict to match - exaclty what we want to send. */ + exactly what we want to send. */ static char * read_assuan (int fd) { @@ -397,7 +397,7 @@ write_assuan (int fd, const char *line) /* Start the server with path PGMNAME and connect its stdout and strerr to a newly created pipes; the file descriptors are then - store in the gloabl variables SERVER_SEND_FD and + store in the global variables SERVER_SEND_FD and SERVER_RECV_FD. The initial handcheck is performed.*/ static void start_server (const char *pgmname) @@ -468,7 +468,7 @@ start_server (const char *pgmname) -/* Script intepreter. */ +/* Script interpreter. */ static void unset_var (const char *name) diff --git a/tools/gpg-check-pattern.c b/tools/gpg-check-pattern.c index 4db8f37..1f015e9 100644 --- a/tools/gpg-check-pattern.c +++ b/tools/gpg-check-pattern.c @@ -91,7 +91,7 @@ static struct enum { PAT_NULL, /* Indicates end of the array. */ PAT_STRING, /* The pattern is a simple string. */ - PAT_REGEX /* The pattern is an extended regualr expression. */ + PAT_REGEX /* The pattern is an extended regualar expression. */ }; diff --git a/tools/gpgconf.c b/tools/gpgconf.c index 59085d8..df3ae8c 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -823,7 +823,7 @@ main (int argc, char **argv) ; else if (rmdir (socketdir)) { - /* If the director is not empty we first try to delet + /* If the director is not empty we first try to delete * socket files. */ err = gpg_error_from_syserror (); if (gpg_err_code (err) == GPG_ERR_ENOTEMPTY diff --git a/tools/mime-parser.c b/tools/mime-parser.c index a151dc6..98f2710 100644 --- a/tools/mime-parser.c +++ b/tools/mime-parser.c @@ -50,7 +50,7 @@ struct mime_parser_context_s { void *cookie; /* Cookie passed to all callbacks. */ - /* The callback to announce the transation from header to body. */ + /* The callback to announce the transition from header to body. */ gpg_error_t (*t2body) (void *cookie, int level); /* The callback to announce a new part. */ diff --git a/tools/no-libgcrypt.c b/tools/no-libgcrypt.c index 8739968..3b57756 100644 --- a/tools/no-libgcrypt.c +++ b/tools/no-libgcrypt.c @@ -114,7 +114,7 @@ gcry_free (void *a) /* We need this dummy because exechelp.c uses gcry_control to - terminate the secure memeory. */ + terminate the secure memory. */ gcry_error_t gcry_control (enum gcry_ctl_cmds cmd, ...) { diff --git a/tools/rfc822parse.c b/tools/rfc822parse.c index 0a4e2bc..f1e95bd 100644 --- a/tools/rfc822parse.c +++ b/tools/rfc822parse.c @@ -96,7 +96,7 @@ struct rfc822parse_context void *callback_value; int callback_error; int in_body; - int in_preamble; /* Wether we are before the first boundary. */ + int in_preamble; /* Whether we are before the first boundary. */ part_t parts; /* The tree of parts. */ part_t current_part; /* Whom we are processing (points into parts). */ const char *boundary; /* Current boundary. */ @@ -176,7 +176,7 @@ my_stpcpy (char *a,const char *b) #endif -/* If a callback has been registerd, call it for the event of type +/* If a callback has been registered, call it for the event of type EVENT. */ static int do_callback (rfc822parse_t msg, rfc822parse_event_t event) @@ -643,7 +643,7 @@ rfc822parse_get_field (rfc822parse_t msg, const char *name, int which, /**************** * Enumerate all header. Caller has to provide the address of a pointer - * which has to be initialzed to NULL, the caller should then never change this + * which has to be initialized to NULL, the caller should then never change this * pointer until he has closed the enumeration by passing again the address * of the pointer but with msg set to NULL. * The function returns pointers to all the header lines or NULL when @@ -681,7 +681,7 @@ rfc822parse_enum_header_lines (rfc822parse_t msg, void **context) * >0 : Retrieve the n-th field * RPREV may be used to return the predecessor of the returned field; - * which may be NULL for the very first one. It has to be initialzed + * which may be NULL for the very first one. It has to be initialized * to either NULL in which case the search start at the first header line, * or it may point to a headerline, where the search should start */ @@ -1078,7 +1078,7 @@ is_parameter (TOKEN t) parse context is valid; NULL is returned in case that attr is not defined in the header, a missing value is reppresented by an empty string. - With LOWER_VALUE set to true, a matching field valuebe be + With LOWER_VALUE set to true, a matching field value will be lowercased. Note, that ATTR should be lowercase. diff --git a/tools/wks-util.c b/tools/wks-util.c index 3fd824c..862cd33 100644 --- a/tools/wks-util.c +++ b/tools/wks-util.c @@ -65,7 +65,7 @@ wks_set_status_fd (int fd) } -/* Write a status line with code NO followed by the outout of the +/* Write a status line with code NO followed by the output of the * printf style FORMAT. The caller needs to make sure that LFs and * CRs are not printed. */ void ----------------------------------------------------------------------- Summary of changes: agent/command-ssh.c | 2 +- agent/divert-scd.c | 2 +- agent/gpg-agent.c | 6 +++--- agent/learncard.c | 2 +- agent/protect.c | 2 +- common/argparse.c | 6 +++--- common/convert.c | 2 +- common/dotlock.c | 2 +- common/iobuf.c | 4 ++-- common/openpgp-oid.c | 4 ++-- common/percent.c | 2 +- common/sexputil.c | 2 +- common/simple-pwquery.c | 2 +- common/stringhelp.c | 2 +- common/t-exechelp.c | 2 +- dirmngr/cdblib.c | 6 +++--- dirmngr/crlcache.c | 4 ++-- dirmngr/dirmngr.c | 8 ++++---- dirmngr/dirmngr_ldap.c | 4 ++-- dirmngr/dns-stuff.c | 2 +- dirmngr/dns.c | 4 ++-- dirmngr/http-ntbtls.c | 2 +- dirmngr/ks-action.c | 2 +- dirmngr/ks-engine-hkp.c | 2 +- dirmngr/ldap.c | 2 +- dirmngr/misc.c | 2 +- dirmngr/ocsp.c | 6 +++--- dirmngr/t-http.c | 2 +- dirmngr/workqueue.c | 2 +- g10/armor.c | 2 +- g10/call-dirmngr.c | 2 +- g10/card-util.c | 2 +- g10/cpr.c | 2 +- g10/decrypt-data.c | 2 +- g10/encrypt.c | 4 ++-- g10/export.c | 2 +- g10/getkey.c | 4 ++-- g10/gpg.c | 6 +++--- g10/import.c | 2 +- g10/key-clean.c | 4 ++-- g10/keygen.c | 2 +- g10/mainproc.c | 2 +- g10/misc.c | 4 ++-- g10/parse-packet.c | 4 ++-- g10/seskey.c | 4 ++-- g10/sign.c | 2 +- g10/tdbio.c | 6 +++--- g10/trustdb.c | 2 +- g10/verify.c | 2 +- g13/call-syshelp.c | 2 +- g13/mountinfo.c | 2 +- g13/runner.c | 2 +- kbx/keybox-blob.c | 2 +- kbx/keybox-errors.c | 2 +- kbx/keybox-search.c | 2 +- scd/apdu.c | 2 +- scd/app-dinsig.c | 2 +- scd/app-geldkarte.c | 2 +- scd/app-openpgp.c | 2 +- scd/ccid-driver.c | 6 +++--- scd/iso7816.c | 4 ++-- scd/scdaemon.c | 2 +- sm/call-dirmngr.c | 2 +- sm/certchain.c | 8 ++++---- sm/certlist.c | 4 ++-- sm/certreqgen-ui.c | 2 +- sm/gpgsm.c | 2 +- sm/keydb.c | 2 +- sm/minip12.c | 6 +++--- sm/qualified.c | 2 +- tests/asschk.c | 10 +++++----- tools/gpg-check-pattern.c | 2 +- tools/gpgconf.c | 2 +- tools/mime-parser.c | 2 +- tools/no-libgcrypt.c | 2 +- tools/rfc822parse.c | 10 +++++----- tools/wks-util.c | 2 +- 77 files changed, 120 insertions(+), 120 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 02:45:34 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 02:45:34 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-37-gabc641f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via abc641f27cf712dec572b6629552b6a6f0b7af27 (commit) from 184c22bea37d2bee3885ef96c1a3664361b02912 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit abc641f27cf712dec572b6629552b6a6f0b7af27 Author: NIIBE Yutaka Date: Thu Oct 25 09:40:42 2018 +0900 build: Update gpg-error.m4 and gpgrt.m4. * src/gpg-error.m4: Bump version date. (min_gpg_error_version): Require >= 1.33, if not specified. (gpg_error_config_args): Remove bogus uses. * src/gpgrt.m4: Bump version date. (libgpgrt-prefix): Add support of --with-libgpgrt-prefix option. (gpgrt-config): Search/call gpgrt-config instead of gpg-error-config. (min_gpgrt_version): Require >= 1.33, if not specified. (gpgrt_config_args): Remove bogus uses. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 index 9f26fa4..0f46cd6 100644 --- a/src/gpg-error.m4 +++ b/src/gpg-error.m4 @@ -1,5 +1,5 @@ # gpg-error.m4 - autoconf macro to detect libgpg-error. -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-25 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -61,7 +61,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) - min_gpg_error_version=ifelse([$1], ,0.0,$1) + min_gpg_error_version=ifelse([$1], ,1.33,$1) AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no if test "$GPG_ERROR_CONFIG" != "no" \ @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,15 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ diff --git a/src/gpgrt.m4 b/src/gpgrt.m4 index 179f7ae..fab1eb4 100644 --- a/src/gpgrt.m4 +++ b/src/gpgrt.m4 @@ -1,5 +1,5 @@ # gpgrt.m4 - autoconf macro to detect libgpgrt -# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2017 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2017, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -10,16 +10,16 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # SPDX-License-Identifier: FSFULLR # -# Last-changed: 2014-10-02 -# Note: This is a duplicate of gpg-error.m4 with uses the future name -# of libgpg-error to prepare for a smooth migration in some distant -# time. +# Last-changed: 2018-10-25 +# Note: This is a kind of duplicate of gpg-error.m4 with uses the +# future name of libgpg-error to prepare for a smooth migration in +# some distant time. dnl AM_PATH_GPGRT([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl dnl Test for libgpgrt and define GPGRT_CFLAGS, GPGRT_LIBS, -dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are +dnl GPGRT_MT_CFLAGS, and GPGRT_MT_LIBS. The _MT_ variants are dnl used for programs requiring real multi thread support. dnl dnl If a prefix option is not used, the config script is first @@ -44,14 +44,20 @@ AC_DEFUN([AM_PATH_GPGRT], AC_ARG_WITH(gpg-error-prefix,, [gpgrt_config_prefix="$withval"]) + dnl Also accept libgpgrt-prefix + AC_ARG_WITH(libgpgrt-prefix, + AC_HELP_STRING([--with-libgpgrt-prefix=PFX], + [prefix where GPG Runtime is installed (optional)]), + [gpgrt_config_prefix="$withval"]) + if test x"${GPGRT_CONFIG}" = x ; then if test x"${gpgrt_config_prefix}" != x ; then - GPGRT_CONFIG="${gpgrt_config_prefix}/bin/gpg-error-config" + GPGRT_CONFIG="${gpgrt_config_prefix}/bin/gpgrt-config" else case "${SYSROOT}" in /*) - if test -x "${SYSROOT}/bin/gpg-error-config" ; then - GPGRT_CONFIG="${SYSROOT}/bin/gpg-error-config" + if test -x "${SYSROOT}/bin/gpgrt-config" ; then + GPGRT_CONFIG="${SYSROOT}/bin/gpgrt-config" fi ;; '') @@ -63,9 +69,9 @@ AC_DEFUN([AM_PATH_GPGRT], fi fi - AC_PATH_PROG(GPGRT_CONFIG, gpg-error-config, no) - min_gpgrt_version=ifelse([$1], ,0.0,$1) - AC_MSG_CHECKING(for GPG Error - version >= $min_gpgrt_version) + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + min_gpgrt_version=ifelse([$1], ,1.33,$1) + AC_MSG_CHECKING(for GPG Runtime - version >= $min_gpgrt_version) ok=no if test "$GPGRT_CONFIG" != "no" \ && test -f "$GPGRT_CONFIG" ; then @@ -73,7 +79,7 @@ AC_DEFUN([AM_PATH_GPGRT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpgrt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpgrt_config_version=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --version` + gpgrt_config_version=`CC=$CC $GPGRT_CONFIG --version` major=`echo $gpgrt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpgrt_config_version | \ @@ -89,15 +95,15 @@ AC_DEFUN([AM_PATH_GPGRT], fi fi if test $ok = yes; then - GPGRT_CFLAGS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --cflags` - GPGRT_LIBS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --libs` - GPGRT_MT_CFLAGS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --mtcflags 2>/dev/null` + GPGRT_CFLAGS=`CC=$CC $GPGRT_CONFIG --cflags` + GPGRT_LIBS=`CC=$CC $GPGRT_CONFIG --libs` + GPGRT_MT_CFLAGS=`CC=$CC $GPGRT_CONFIG --variable=mtcflags 2>/dev/null` GPGRT_MT_CFLAGS="$GPGRT_CFLAGS${GPGRT_CFLAGS:+ }$GPGRT_MT_CFLAGS" - GPGRT_MT_LIBS=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --mtlibs 2>/dev/null` + GPGRT_MT_LIBS=`CC=$CC $GPGRT_CONFIG --variable=mtlibs 2>/dev/null` GPGRT_MT_LIBS="$GPGRT_LIBS${GPGRT_LIBS:+ }$GPGRT_MT_LIBS" AC_MSG_RESULT([yes ($gpgrt_config_version)]) ifelse([$2], , :, [$2]) - gpgrt_config_host=`CC=$CC $GPGRT_CONFIG $gpgrt_config_args --variable=host 2>/dev/null || echo none` + gpgrt_config_host=`CC=$CC $GPGRT_CONFIG --variable=host 2>/dev/null || echo none` if test x"$gpgrt_config_host" != xnone ; then if test x"$gpgrt_config_host" != x"$host" ; then AC_MSG_WARN([[ @@ -105,10 +111,10 @@ AC_DEFUN([AM_PATH_GPGRT], *** The config script $GPGRT_CONFIG was *** built for $gpgrt_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-libgpg-error-prefix +*** You may want to use the configure option --with-libgpgrt-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) - gpg_config_script_warn="$gpg_config_script_warn libgpg-error" + gpg_config_script_warn="$gpg_config_script_warn libgpgrt" fi fi else ----------------------------------------------------------------------- Summary of changes: src/gpg-error.m4 | 18 +++++++++--------- src/gpgrt.m4 | 46 ++++++++++++++++++++++++++-------------------- 2 files changed, 35 insertions(+), 29 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 03:14:33 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 03:14:33 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-103-gb376dc2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via b376dc2abbb208b10bbc76998ff39adb2f301905 (commit) from 03bb25ee7ed6f1076bf788ab981ca68672880daa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b376dc2abbb208b10bbc76998ff39adb2f301905 Author: NIIBE Yutaka Date: Thu Oct 25 10:11:59 2018 +0900 build: Require libgpg-error >= 1.33. * configure.ac (NEED_GPG_ERROR_VERSION): Require 1.33. * m4/gpg-error.m4: Update from libgpg-error 1.33. * src/libgcrypt.m4: Bump version date. Use --variable option. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index cdce339..5cb4b37 100644 --- a/configure.ac +++ b/configure.ac @@ -72,7 +72,7 @@ LIBGCRYPT_CONFIG_API_VERSION=1 # If you change the required gpg-error version, please remove # unnecessary error code defines in src/gcrypt-int.h. -NEED_GPG_ERROR_VERSION=1.25 +NEED_GPG_ERROR_VERSION=1.33 AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/libgcrypt.vers]) diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 9f26fa4..0f46cd6 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -1,5 +1,5 @@ # gpg-error.m4 - autoconf macro to detect libgpg-error. -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-25 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -61,7 +61,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) - min_gpg_error_version=ifelse([$1], ,0.0,$1) + min_gpg_error_version=ifelse([$1], ,1.33,$1) AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no if test "$GPG_ERROR_CONFIG" != "no" \ @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,15 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 index df6469d..e1a158e 100644 --- a/src/libgcrypt.m4 +++ b/src/libgcrypt.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-24 +# Last-changed: 2018-10-25 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, @@ -105,7 +105,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then - tmp=`CC=$CC $LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`CC=$CC $LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then @@ -121,7 +121,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], LIBGCRYPT_CFLAGS=`CC=$CC $LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`CC=$CC $LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) - libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- m4/gpg-error.m4 | 18 +++++++++--------- src/libgcrypt.m4 | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 03:19:08 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 03:19:08 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-13-g27f4671 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 27f4671883e3241ac0fdee3935c8707c816686b6 (commit) from 25797256e1588db9f3171a050246008ac66c66b3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 27f4671883e3241ac0fdee3935c8707c816686b6 Author: NIIBE Yutaka Date: Thu Oct 25 10:16:52 2018 +0900 build: Require libgpg-error >= 1.33. * configure.ac (AM_PATH_GPG_ERROR): Require 1.33. * m4/gpg-error.m4: Update from libgpg-error 1.33. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 2dadcd9..0cb2896 100644 --- a/configure.ac +++ b/configure.ac @@ -356,7 +356,7 @@ AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes") # Checking for libgpg-error. -AM_PATH_GPG_ERROR(1.17,, AC_MSG_ERROR([libgpg-error was not found])) +AM_PATH_GPG_ERROR(1.33,, AC_MSG_ERROR([libgpg-error was not found])) # # Checks for library functions. diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 9f26fa4..0f46cd6 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -1,5 +1,5 @@ # gpg-error.m4 - autoconf macro to detect libgpg-error. -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-25 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -61,7 +61,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) - min_gpg_error_version=ifelse([$1], ,0.0,$1) + min_gpg_error_version=ifelse([$1], ,1.33,$1) AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no if test "$GPG_ERROR_CONFIG" != "no" \ @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,15 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- m4/gpg-error.m4 | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 03:28:26 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 03:28:26 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-24-g07cf4a9 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via 07cf4a9ab6f1a7b68aeda39ba03691e713254418 (commit) from 4754816d10a38ebe97acd2f3bfaa835055566696 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 07cf4a9ab6f1a7b68aeda39ba03691e713254418 Author: NIIBE Yutaka Date: Thu Oct 25 10:26:54 2018 +0900 build: Require libgpg-error >= 1.33. * configure.ac (NEED_GPG_ERROR_VERSION): Require >= 1.33. * m4/gpg-error.m4: Update from libgpg-error 1.33. * src/ksba.m4: Fix to support --with-libksba-prefix. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index cc084a7..097e1da 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,7 @@ LIBKSBA_LT_REVISION=6 KSBA_CONFIG_API_VERSION=1 -NEED_GPG_ERROR_VERSION=1.8 +NEED_GPG_ERROR_VERSION=1.33 AC_CONFIG_AUX_DIR([build-aux]) diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 9f26fa4..0f46cd6 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -1,5 +1,5 @@ # gpg-error.m4 - autoconf macro to detect libgpg-error. -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-25 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -61,7 +61,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) - min_gpg_error_version=ifelse([$1], ,0.0,$1) + min_gpg_error_version=ifelse([$1], ,1.33,$1) AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no if test "$GPG_ERROR_CONFIG" != "no" \ @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,15 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ diff --git a/src/ksba.m4 b/src/ksba.m4 index e7d2641..62dc17f 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -21,12 +21,22 @@ dnl this features allows to prevent build against newer versions of libksba dnl with a changed API. dnl AC_DEFUN([AM_PATH_KSBA], -[AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_PATH_GPG_ERROR]) - AC_ARG_WITH(ksba-prefix, - AC_HELP_STRING([--with-ksba-prefix=PFX], - [prefix where KSBA is installed (optional)]), +[ AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_PATH_GPG_ERROR]) + dnl --with-libksba-prefix=PFX is the preferred name for this option, + dnl since that is consistent with how our three siblings use the directory/ + dnl package name in --with-$dir_name-prefix=PFX. + AC_ARG_WITH(libksba-prefix, + AC_HELP_STRING([--with-libksba-prefix=PFX], + [prefix where KSBA is installed (optional)]), ksba_config_prefix="$withval", ksba_config_prefix="") + + dnl Accept --with-ksba-prefix and make it work the same as + dnl --with-libksba-prefix above, for backwards compatibility, + dnl but do not document this old, inconsistently-named option. + AC_ARG_WITH(ksba-prefix,, + ksba_config_prefix="$withval", ksba_config_prefix="") + if test x$ksba_config_prefix != x ; then if test x${KSBA_CONFIG+set} != xset ; then KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- m4/gpg-error.m4 | 18 +++++++++--------- src/ksba.m4 | 20 +++++++++++++++----- 3 files changed, 25 insertions(+), 15 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 03:47:16 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 03:47:16 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-10-g1233f32 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via 1233f3293f2076544f9924b268b2eca04e0ada39 (commit) from ace1fa90ec40e30cefa65a3cf8552960c9f5e761 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1233f3293f2076544f9924b268b2eca04e0ada39 Author: NIIBE Yutaka Date: Thu Oct 25 10:42:37 2018 +0900 build: Require libgpg-error >= 1.33. * configure.ac (NEED_GPG_ERROR_VERSION): Require >= 1.33. * m4/gpg-error.m4: Update from libgpg-error 1.33. * src/ntbtls.m4 (AM_PATH_GPG_ERROR): Required. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index af15467..f4e7aef 100644 --- a/configure.ac +++ b/configure.ac @@ -61,7 +61,7 @@ NTBTLS_CONFIG_API_VERSION=1 # Minimum versions for required libraries -NEED_GPG_ERROR_VERSION=1.17 +NEED_GPG_ERROR_VERSION=1.33 NEED_LIBGCRYPT_API=1 NEED_LIBGCRYPT_VERSION=1.6.0 diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 9f26fa4..0f46cd6 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -1,5 +1,5 @@ # gpg-error.m4 - autoconf macro to detect libgpg-error. -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-25 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -61,7 +61,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) - min_gpg_error_version=ifelse([$1], ,0.0,$1) + min_gpg_error_version=ifelse([$1], ,1.33,$1) AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no if test "$GPG_ERROR_CONFIG" != "no" \ @@ -70,7 +70,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --version` + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -86,15 +86,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtcflags 2>/dev/null` + GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ diff --git a/src/ntbtls.m4 b/src/ntbtls.m4 index a958dda..b6ef715 100644 --- a/src/ntbtls.m4 +++ b/src/ntbtls.m4 @@ -23,6 +23,7 @@ dnl with a changed API. dnl AC_DEFUN([AM_PATH_NTBTLS], [ AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(ntbtls-prefix, AC_HELP_STRING([--with-ntbtls-prefix=PFX], [prefix where NTBTLS is installed (optional)]), ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- m4/gpg-error.m4 | 18 +++++++++--------- src/ntbtls.m4 | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 09:16:44 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 25 Oct 2018 09:16:44 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-12-g326f0ab Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 326f0abbbaf1b1d59e0fc72730923b40cfa3bf09 (commit) from 2fbb76c2d31813399203882eca98866566363815 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 326f0abbbaf1b1d59e0fc72730923b40cfa3bf09 Author: Andre Heinecke Date: Thu Oct 25 09:15:18 2018 +0200 Use gpgrt_w32_iconv as fallback for mlang-charset * src/mlan-charset.cpp (ansi_charset_to_uf8): Use gpgrt as a fallback. -- We only use it as a fallback as the old code is known to work and we want to avoid regressions in case the charset names differ between gpgrt and getcharsetinfo. GnuPG-Bug-Id: T4156 diff --git a/src/mlang-charset.cpp b/src/mlang-charset.cpp index 1e9eea1..c4cd1fa 100644 --- a/src/mlang-charset.cpp +++ b/src/mlang-charset.cpp @@ -34,6 +34,50 @@ DEFINE_GUID (IID_IMultiLanguage, 0x275c23e1,0x3747,0x11d0,0x9f, #include "mlang-charset.h" +static char * +iconv_to_utf8 (const char *charset, const char *input, size_t inlen) +{ + if (!charset || !input) + { + STRANGEPOINT; + return nullptr; + } + + gpgrt_w32_iconv_t ctx = gpgrt_w32_iconv_open ("UTF-8", charset); + if (!ctx || ctx == (gpgrt_w32_iconv_t)-1) + { + log_debug ("%s:%s: Failed to open iconv ctx for '%s'", + SRCNAME, __func__, charset); + return nullptr; + } + + size_t len = 0; + + for (const unsigned char *s = (const unsigned char*) input; *s; s++) + { + len++; + if ((*s & 0x80)) + { + len += 5; /* We may need up to 6 bytes for the utf8 output. */ + } + } + + char *buffer = (char*) xmalloc (len + 1); + char *outptr = buffer; + size_t outbytes = len; + size_t ret = gpgrt_w32_iconv (ctx, (const char **)&input, &inlen, + &outptr, &outbytes); + gpgrt_w32_iconv_close (ctx); + if (ret == -1) + { + log_error ("%s:%s: Conversion failed for '%s'", + SRCNAME, __func__, charset); + xfree (buffer); + return nullptr; + } + return buffer; +} + char *ansi_charset_to_utf8 (const char *charset, const char *input, size_t inlen, int codepage) { @@ -95,8 +139,16 @@ char *ansi_charset_to_utf8 (const char *charset, const char *input, xfree (w_charset); if (err != S_OK) { - log_error ("%s:%s: Failed to find charset for: %s", + log_debug ("%s:%s: Failed to find charset for: %s fallback to iconv", SRCNAME, __func__, charset); + /* We only use this as a fallback as the old code was older and + known to work in most cases. */ + ret = iconv_to_utf8 (charset, input, inlen); + if (ret) + { + return ret; + } + return xstrdup (input); } enc = (mime_info.uiInternetEncoding == 0) ? mime_info.uiCodePage : ----------------------------------------------------------------------- Summary of changes: src/mlang-charset.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 09:24:40 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 09:24:40 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-240-g0240345 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 0240345728a84d8f235ce05889e83963e52742eb (commit) from 54eb375ff14e2a93cea70eab35719be4d25f51ca (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0240345728a84d8f235ce05889e83963e52742eb Author: NIIBE Yutaka Date: Thu Oct 25 16:20:20 2018 +0900 g10,scd: Improve UIF support. * g10/call-agent.c (learn_status_cb): Parse "bt" flag. * g10/call-agent.h: New member field "bt". * g10/card-util.c (uif): Limit its access only when it is supported. * scd/app-openpgp.c (do_setattr): Allow access to UIF objects only when there is a button. Signed-off-by: NIIBE Yutaka diff --git a/g10/call-agent.c b/g10/call-agent.c index 755f2e3..e9ea82e 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -609,6 +609,8 @@ learn_status_cb (void *opaque, const char *line) parm->extcap.ki = abool; else if (!strcmp (p, "aac")) parm->extcap.aac = abool; + else if (!strcmp (p, "bt")) + parm->extcap.bt = abool; else if (!strcmp (p, "kdf")) parm->extcap.kdf = abool; else if (!strcmp (p, "si")) diff --git a/g10/call-agent.h b/g10/call-agent.h index 59e4ff4..1055b5e 100644 --- a/g10/call-agent.h +++ b/g10/call-agent.h @@ -69,6 +69,7 @@ struct agent_card_info_s unsigned int ki:1; /* Key import available. */ unsigned int aac:1; /* Algorithm attributes are changeable. */ unsigned int kdf:1; /* KDF object to support PIN hashing available. */ + unsigned int bt:1; /* Button for confirmation available. */ } extcap; unsigned int status_indicator; }; diff --git a/g10/card-util.c b/g10/card-util.c index 234abcb..5205798 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -2114,10 +2114,31 @@ kdf_setup (const char *args) static void uif (int arg_number, const char *arg_rest) { + struct agent_card_info_s info; + int feature_available; gpg_error_t err; char name[100]; unsigned char data[2]; + memset (&info, 0, sizeof info); + + err = agent_scd_getattr ("EXTCAP", &info); + if (err) + { + log_error (_("error getting card info: %s\n"), gpg_strerror (err)); + return; + } + + feature_available = info.extcap.bt; + agent_release_card_info (&info); + + if (!feature_available) + { + log_error (_("This command is not supported by this card\n")); + tty_printf ("\n"); + return; + } + snprintf (name, sizeof name, "UIF-%d", arg_number); if ( !strcmp (arg_rest, "off") ) data[0] = 0x00; diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 63265e4..789b72f 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -2468,9 +2468,9 @@ do_setattr (app_t app, const char *name, { "SM-KEY-MAC", 0x00D2, 3, 0, 1 }, { "KEY-ATTR", 0, 0, 3, 1 }, { "AESKEY", 0x00D5, 3, 0, 1 }, - { "UIF-1", 0x00D6, 3, 0, 1 }, - { "UIF-2", 0x00D7, 3, 0, 1 }, - { "UIF-3", 0x00D8, 3, 0, 1 }, + { "UIF-1", 0x00D6, 3, 5, 1 }, + { "UIF-2", 0x00D7, 3, 5, 1 }, + { "UIF-3", 0x00D8, 3, 5, 1 }, { "KDF", 0x00F9, 3, 4, 1 }, { NULL, 0 } }; @@ -2483,6 +2483,9 @@ do_setattr (app_t app, const char *name, if (table[idx].need_v2 && !app->app_local->extcap.is_v2) return gpg_error (GPG_ERR_NOT_SUPPORTED); /* Not yet supported. */ + if (table[idx].special == 5 && app->app_local->extcap.has_button == 0) + return gpg_error (GPG_ERR_INV_OBJ); + if (table[idx].special == 3) return change_keyattr_from_string (app, pincb, pincb_arg, value, valuelen); ----------------------------------------------------------------------- Summary of changes: g10/call-agent.c | 2 ++ g10/call-agent.h | 1 + g10/card-util.c | 21 +++++++++++++++++++++ scd/app-openpgp.c | 9 ++++++--- 4 files changed, 30 insertions(+), 3 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 11:13:05 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 11:13:05 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-14-g1dd2430 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 1dd2430d8877ffda43bc46f0d5f23fea4801ecf6 (commit) from 27f4671883e3241ac0fdee3935c8707c816686b6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1dd2430d8877ffda43bc46f0d5f23fea4801ecf6 Author: NIIBE Yutaka Date: Thu Oct 25 18:11:26 2018 +0900 build: Use LIBASSUAN_CONFIG_LIBS (instead of LIB). * configure.ac (LIBASSUAN_CONFIG_LIBS): Rename from *_LIB. (LIBASSUAN_CONFIG_EXTRA_LIBS): Remove. * src/libassuan-config.in: Follow the change. * src/libassuan.pc.in: Likewise. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 0cb2896..15f6f18 100644 --- a/configure.ac +++ b/configure.ac @@ -290,18 +290,16 @@ fi # # Provide info for src/libassuan-config.in # -LIBASSUAN_CONFIG_LIB="-lassuan" +LIBASSUAN_CONFIG_LIBS="-lassuan" LIBASSUAN_CONFIG_CFLAGS="" LIBASSUAN_CONFIG_HOST="$host" -LIBASSUAN_CONFIG_EXTRA_LIBS= if test x"$NETLIBS" != x; then - LIBASSUAN_CONFIG_EXTRA_LIBS="$LIBASSUAN_CONFIG_EXTRA_LIBS $NETLIBS" + LIBASSUAN_CONFIG_LIBS="$LIBASSUAN_CONFIG_LIBS $NETLIBS" fi -AC_SUBST(LIBASSUAN_CONFIG_LIB) +AC_SUBST(LIBASSUAN_CONFIG_LIBS) AC_SUBST(LIBASSUAN_CONFIG_CFLAGS) AC_SUBST(LIBASSUAN_CONFIG_HOST) AC_SUBST(LIBASSUAN_CONFIG_API_VERSION) -AC_SUBST(LIBASSUAN_CONFIG_EXTRA_LIBS) # # Checks for header files. diff --git a/src/libassuan-config.in b/src/libassuan-config.in index 914c7ef..4659abc 100644 --- a/src/libassuan-config.in +++ b/src/libassuan-config.in @@ -15,8 +15,8 @@ gpg_error_cflags="@GPG_ERROR_CFLAGS@" gpg_error_libs="@GPG_ERROR_LIBS@" PGM=libassuan-config -lib="@LIBASSUAN_CONFIG_LIB@" -extralibs="@LIBASSUAN_CONFIG_EXTRA_LIBS@ $gpg_error_libs" +lib="@LIBASSUAN_CONFIG_LIBS@" +extralibs="$gpg_error_libs" cflags="@LIBASSUAN_CONFIG_CFLAGS@ $gpg_error_cflags" api_version="@LIBASSUAN_CONFIG_API_VERSION@" my_host="@LIBASSUAN_CONFIG_HOST@" diff --git a/src/libassuan.pc.in b/src/libassuan.pc.in index a5caac6..4e952d7 100644 --- a/src/libassuan.pc.in +++ b/src/libassuan.pc.in @@ -10,5 +10,5 @@ Description: IPC library for the GnuPG components Requires: gpg-error Version: @PACKAGE_VERSION@ Cflags: @LIBASSUAN_CONFIG_CFLAGS@ -Libs: @LIBASSUAN_CONFIG_LIBS@ @LIBASSUAN_CONFIG_EXTRA_LIBS@ +Libs: @LIBASSUAN_CONFIG_LIBS@ URL: https://www.gnupg.org/related_software/libassuan/index.html ----------------------------------------------------------------------- Summary of changes: configure.ac | 8 +++----- src/libassuan-config.in | 4 ++-- src/libassuan.pc.in | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 11:53:01 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 25 Oct 2018 11:53:01 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-13-gb4c45c3 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via b4c45c3a3ec98b900bcd785ea9261e33f5562e08 (commit) from 326f0abbbaf1b1d59e0fc72730923b40cfa3bf09 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b4c45c3a3ec98b900bcd785ea9261e33f5562e08 Author: Andre Heinecke Date: Thu Oct 25 11:50:58 2018 +0200 Read HKLM fallback from cross registry view * src/addin-options.cpp (open-gpgolconfig): Do not pass w64 again. * src/common.cpp (CROSS_ACCESS): New define. (_readRegStr): Helper for readRegStr. (readRegStr): More explicit fallbacks. -- This should be more robust to handle cases where either HKLM is set up as 32 bit registry key or as 64 bit registry key. diff --git a/src/addin-options.cpp b/src/addin-options.cpp index c228b17..137d880 100644 --- a/src/addin-options.cpp +++ b/src/addin-options.cpp @@ -188,10 +188,6 @@ open_gpgolconfig (LPVOID arg) args.push_back (std::string ("--lang")); args.push_back (std::string (gettext_localename ())); -#ifdef _WIN64 - args.push_back (std::string ("--w64")); -#endif - auto ctx = GpgME::Context::createForEngine (GpgME::SpawnEngine); if (!ctx) { diff --git a/src/common.cpp b/src/common.cpp index 72fa16f..2140f25 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -107,50 +107,38 @@ get_root_key(const char *root) return NULL; return root_key; } +#if defined(_WIN64) +#define CROSS_ACCESS KEY_WOW64_32KEY +#else +#define CROSS_ACCESS KEY_WOW64_64KEY +#endif -static std::string -readRegStr (const char *root, const char *dir, const char *name) +std::string +_readRegStr (HKEY root_key, const char *dir, + const char *name, bool alternate) { #ifndef _WIN32 - (void)root; (void)dir; (void)name; + (void) root_key; (void)alternate; (void)dir; (void)name; return std::string(); #else - - HKEY root_key, key_handle; + HKEY key_handle; DWORD n1, nbytes, type; std::string ret; - if (!(root_key = get_root_key(root))) { - return ret; - } + DWORD flags = KEY_READ; - if (RegOpenKeyExA(root_key, dir, 0, KEY_READ, &key_handle)) { - if (root) { - /* no need for a RegClose, so return direct */ - return ret; - } - /* Fallback to HKLM */ + if (alternate) { + flags |= CROSS_ACCESS; + } - if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { - return ret; - } + if (RegOpenKeyExA(root_key, dir, 0, flags, &key_handle)) { + return ret; } nbytes = 1; if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { - if (root) { - RegCloseKey (key_handle); - return ret; - } - /* Try to fallback to HKLM also vor a missing value. */ RegCloseKey (key_handle); - if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle)) { - return ret; - } - if (RegQueryValueExA(key_handle, name, 0, nullptr, nullptr, &nbytes)) { - RegCloseKey(key_handle); - return ret; - } + return ret; } n1 = nbytes+1; char result[n1]; @@ -182,6 +170,33 @@ readRegStr (const char *root, const char *dir, const char *name) } } return ret; + +#endif +} + +std::string +readRegStr (const char *root, const char *dir, const char *name) +{ +#ifndef _WIN32 + (void)root; (void)dir; (void)name; + return std::string(); +#else + HKEY root_key; + std::string ret; + if (!(root_key = get_root_key(root))) { + return ret; + } + ret = _readRegStr (root_key, dir, name, false); + + if (ret.empty()) { + // Try local machine as fallback. + ret = _readRegStr (HKEY_LOCAL_MACHINE, dir, name, false); + if (ret.empty()) { + // Try alternative registry view as fallback + ret = _readRegStr (HKEY_LOCAL_MACHINE, dir, name, true); + } + } + return ret; #endif } ----------------------------------------------------------------------- Summary of changes: src/addin-options.cpp | 4 --- src/common.cpp | 73 +++++++++++++++++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 33 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 12:28:11 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 25 Oct 2018 12:28:11 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-14-gbf4ab9a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via bf4ab9a6d16869aa6083b10b54a77fc9b8b95b41 (commit) from b4c45c3a3ec98b900bcd785ea9261e33f5562e08 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bf4ab9a6d16869aa6083b10b54a77fc9b8b95b41 Author: Andre Heinecke Date: Thu Oct 25 12:23:42 2018 +0200 Explicitly set real access key for reg too * src/common.cpp (REAL_ACCESS): Define. -- We have to make sure that we try both registry views. diff --git a/src/common.cpp b/src/common.cpp index 2140f25..dbc9187 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -109,8 +109,10 @@ get_root_key(const char *root) } #if defined(_WIN64) #define CROSS_ACCESS KEY_WOW64_32KEY +#define REAL_ACCESS KEY_WOW64_64KEY #else #define CROSS_ACCESS KEY_WOW64_64KEY +#define REAL_ACCESS KEY_WOW32_64KEY #endif std::string @@ -129,6 +131,8 @@ _readRegStr (HKEY root_key, const char *dir, if (alternate) { flags |= CROSS_ACCESS; + } else { + flags |= REAL_ACCESS } if (RegOpenKeyExA(root_key, dir, 0, flags, &key_handle)) { ----------------------------------------------------------------------- Summary of changes: src/common.cpp | 4 ++++ 1 file changed, 4 insertions(+) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 12:30:30 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 25 Oct 2018 12:30:30 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-15-g1bf9ef1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 1bf9ef1312911a92084515057d26878bbff5bbea (commit) from bf4ab9a6d16869aa6083b10b54a77fc9b8b95b41 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1bf9ef1312911a92084515057d26878bbff5bbea Author: Andre Heinecke Date: Thu Oct 25 12:29:56 2018 +0200 Revert "Explicitly set real access key for reg too" This reverts commit bf4ab9a6d16869aa6083b10b54a77fc9b8b95b41. diff --git a/src/common.cpp b/src/common.cpp index dbc9187..2140f25 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -109,10 +109,8 @@ get_root_key(const char *root) } #if defined(_WIN64) #define CROSS_ACCESS KEY_WOW64_32KEY -#define REAL_ACCESS KEY_WOW64_64KEY #else #define CROSS_ACCESS KEY_WOW64_64KEY -#define REAL_ACCESS KEY_WOW32_64KEY #endif std::string @@ -131,8 +129,6 @@ _readRegStr (HKEY root_key, const char *dir, if (alternate) { flags |= CROSS_ACCESS; - } else { - flags |= REAL_ACCESS } if (RegOpenKeyExA(root_key, dir, 0, flags, &key_handle)) { ----------------------------------------------------------------------- Summary of changes: src/common.cpp | 4 ---- 1 file changed, 4 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 13:05:08 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 25 Oct 2018 13:05:08 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-104-g3b27107 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 3b271079d52978e5507ef71476f169332d4fd2e5 (commit) from b376dc2abbb208b10bbc76998ff39adb2f301905 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3b271079d52978e5507ef71476f169332d4fd2e5 Author: Werner Koch Date: Thu Oct 25 13:04:21 2018 +0200 cipher: Add comments about future OIDs. -- diff --git a/cipher/ecc-curves.c b/cipher/ecc-curves.c index 75d7161..971afbe 100644 --- a/cipher/ecc-curves.c +++ b/cipher/ecc-curves.c @@ -41,8 +41,22 @@ static const struct const char *other; /* Other name. */ } curve_aliases[] = { - { "Curve25519", "1.3.6.1.4.1.3029.1.5.1" }, - { "Ed25519", "1.3.6.1.4.1.11591.15.1" }, + { "Curve25519", "1.3.6.1.4.1.3029.1.5.1" }, /* OpenPGP */ + + { "Ed25519", "1.3.6.1.4.1.11591.15.1" }, /* OpenPGP */ + +#if 0 + /* FIXME: We have a naming issue here. RFC-8032 says that its + * Ed25519 is the pureEdDSA, that is w.o. the SHA512 prehasing we + * use in OpenPGP. */ + { "Ed25519", "1.3.101.112" }, /* rfc8410 */ + + { "Ed448", "1.3.101.113" }, /* rfc8410 */ + + { "X22519", "1.3.101.110" }, /* rfc8410 */ + + { "X448", "1.3.101.111" }, /* rfc8410 */ +#endif { "NIST P-192", "1.2.840.10045.3.1.1" }, /* X9.62 OID */ { "NIST P-192", "prime192v1" }, /* X9.62 name. */ ----------------------------------------------------------------------- Summary of changes: cipher/ecc-curves.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 13:07:15 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 13:07:15 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-39-gffbff04 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via ffbff048bde636e3ec19f2912fa4034e70e18f44 (commit) via e06af32bdde0b4ce8c97193472961f31c5b55ddf (commit) from abc641f27cf712dec572b6629552b6a6f0b7af27 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ffbff048bde636e3ec19f2912fa4034e70e18f44 Author: NIIBE Yutaka Date: Thu Oct 25 20:02:37 2018 +0900 gpg-error-config: Keep old gpg-error-config implementation. * configure.ac: Generate gpgrt-config from gpgrt-config.in. * src/gpgrt-config.in: Rename from src/gpg-error-config-new.in. * src/Makefile.am (bin_SCRIPTS): Add gpgrt-config. (EXTRA_DIST): Add gpgrt-config.in removing gpg-error-config-new.in. (BUILT_SOURCES, CLEANFILES): Remove gpgrt-config. (gpg-error-config): Always copy from gpg-error-config-old. * src/gpg-error-config-test.sh: Follow the rename. -- The gpgrt-config script is new implementation supporting *.pc file, while gpg-error-config keeps old single shell script. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index b735fa6..81b72f0 100644 --- a/configure.ac +++ b/configure.ac @@ -672,7 +672,7 @@ AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd]) AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest]) AC_CONFIG_FILES([src/gpg-error.pc]) AC_CONFIG_FILES([src/gpg-error-config-old:src/gpg-error-config.in], [chmod +x src/gpg-error-config-old]) -AC_CONFIG_FILES([src/gpg-error-config-new], [chmod +x src/gpg-error-config-new]) +AC_CONFIG_FILES([src/gpgrt-config], [chmod +x src/gpgrt-config]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index d568d73..6df2d6c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -84,8 +84,7 @@ lock_obj_pub = \ lib_LTLIBRARIES = libgpg-error.la nodist_include_HEADERS = gpg-error.h gpgrt.h -bin_SCRIPTS = gpg-error-config -nodist_bin_SCRIPTS = gpgrt-config +bin_SCRIPTS = gpgrt-config gpg-error-config m4datadir = $(datadir)/aclocal m4data_DATA = gpg-error.m4 gpgrt.m4 @@ -99,18 +98,18 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 gpgrt.m4 \ gpg-error.vers gpg-error.def.in \ versioninfo.rc.in gpg-error.w32-manifest.in \ - gpg-error-config-new.in gpg-error-config-test.sh gpg-error.pc.in \ + gpgrt-config.in gpg-error-config-test.sh gpg-error.pc.in \ $(lock_obj_pub) BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \ code-to-errno.h code-from-errno.h \ err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h gpgrt.h \ - gpgrt-config gpg-error.def mkw32errmap.map.c + gpg-error.def mkw32errmap.map.c tmp_files = _mkerrcodes.h _gpg-error.def.h mkw32errmap.tab.h mkw32errmap.map.c CLEANFILES = code-to-errno.h code-from-errno.h \ - gpg-error.h gpgrt.h gpgrt-config \ + gpg-error.h gpgrt.h \ mkerrcodes$(EXEEXT_FOR_BUILD) mkerrcodes.h gpg-error.def mkw32errmap.tab.h \ mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \ gpg-extra/errno.h mkheader$(EXEEXT_FOR_BUILD) \ @@ -335,19 +334,15 @@ gpg-error.h: Makefile mkheader$(EXEEXT_FOR_BUILD) $(parts_of_gpg_error_h) \ gpgrt.h: gpg-error.h cp gpg-error.h gpgrt.h -gpgrt-config: gpg-error-config - cp gpg-error-config gpgrt-config - -gpg-error-config: gpg-error-config-new gpg-error-config-old +gpg-error-config: gpgrt-config gpg-error-config-old @echo $(ECHO_N) "Confirm gpg-error-config works... $(ECHO_C)" @if $(srcdir)/gpg-error-config-test.sh --old-new; then \ echo "good"; \ - cp gpg-error-config-new $@; \ else \ echo "no"; \ echo "*** Please report to with gpg-error-config-test.log"; \ - cp gpg-error-config-old $@; \ fi + cp gpg-error-config-old $@ install-data-local: if HAVE_W32CE_SYSTEM diff --git a/src/gpg-error-config-test.sh b/src/gpg-error-config-test.sh index 527e118..2d8b94b 100755 --- a/src/gpg-error-config-test.sh +++ b/src/gpg-error-config-test.sh @@ -22,7 +22,7 @@ failure () { echo "Test result: $*" echo "====================: $PKG_CONFIG_CMD" echo "$OUTPUT_OLD" - echo "====================: gpg-error-config-new" + echo "====================: gpgrt-config" echo "$OUTPUT_NEW" echo "====================" ) >> gpg-error-config-test.log @@ -32,54 +32,54 @@ failure () { rm -f gpg-error-config-test.log OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --libs)) -OUTPUT_NEW=$(./gpg-error-config-new --libs) +OUTPUT_NEW=$(./gpgrt-config --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --libs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags)) -OUTPUT_NEW=$(./gpg-error-config-new --cflags) +OUTPUT_NEW=$(./gpgrt-config --cflags) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags --libs)) -OUTPUT_NEW=$(./gpg-error-config-new --cflags --libs) +OUTPUT_NEW=$(./gpgrt-config --cflags --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags --libs if [ "$PKG_CONFIG_CMD" = ./gpg-error-config-old ]; then OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --version)) - OUTPUT_NEW=$(./gpg-error-config-new --version) + OUTPUT_NEW=$(./gpgrt-config --version) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --version OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --libs)) - OUTPUT_NEW=$(./gpg-error-config-new --mt --libs) + OUTPUT_NEW=$(./gpgrt-config --mt --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --libs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --cflags)) - OUTPUT_NEW=$(./gpg-error-config-new --mt --cflags) + OUTPUT_NEW=$(./gpgrt-config --mt --cflags) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --cflags OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags --libs)) - OUTPUT_NEW=$(./gpg-error-config-new --cflags --libs) + OUTPUT_NEW=$(./gpgrt-config --cflags --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags --libs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --cflags --libs)) - OUTPUT_NEW=$(./gpg-error-config-new --mt --cflags --libs) + OUTPUT_NEW=$(./gpgrt-config --mt --cflags --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --cflags --libs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=mtcflags)) - OUTPUT_NEW=$(./gpg-error-config-new --variable=mtcflags) + OUTPUT_NEW=$(./gpgrt-config --variable=mtcflags) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=mtcflags OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=mtlibs)) - OUTPUT_NEW=$(./gpg-error-config-new --variable=mtlibs) + OUTPUT_NEW=$(./gpgrt-config --variable=mtlibs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=mtlibs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=host)) - OUTPUT_NEW=$(./gpg-error-config-new --variable=host) + OUTPUT_NEW=$(./gpgrt-config --variable=host) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=host fi if [ -n "$test_failed" ]; then OUTPUT_OLD=$($PKG_CONFIG_CMD --version) - OUTPUT_NEW=$(./gpg-error-config-new --version) + OUTPUT_NEW=$(./gpgrt-config --version) failure --version exit 99 diff --git a/src/gpg-error-config-new.in b/src/gpgrt-config.in similarity index 100% rename from src/gpg-error-config-new.in rename to src/gpgrt-config.in commit e06af32bdde0b4ce8c97193472961f31c5b55ddf Author: NIIBE Yutaka Date: Thu Oct 25 19:32:17 2018 +0900 build: Set GPGRT_CONFIG in gpg-error.m4. * src/gpg-error.m4: Detect gpgrt-config to set GPGRT_CONFIG. -- Set GPGRT_CONFIG when there is no gpg-error-config or gpg-error-config reports version >= 1.33. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 index 0f46cd6..f89a4ee 100644 --- a/src/gpg-error.m4 +++ b/src/gpg-error.m4 @@ -62,15 +62,21 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no - if test "$GPG_ERROR_CONFIG" != "no" \ - && test -f "$GPG_ERROR_CONFIG" ; then + if test "$GPG_ERROR_CONFIG" = "no"; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + fi + else + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + fi + if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -84,7 +90,14 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi fi + if test -z "$GPGRT_CONFIG"; then + if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + fi + fi fi + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- src/Makefile.am | 17 ++++++---------- src/gpg-error-config-test.sh | 26 ++++++++++++------------ src/gpg-error.m4 | 21 +++++++++++++++---- src/{gpg-error-config-new.in => gpgrt-config.in} | 0 5 files changed, 37 insertions(+), 29 deletions(-) rename src/{gpg-error-config-new.in => gpgrt-config.in} (100%) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 13:34:01 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 13:34:01 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-15-gb7922ea Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via b7922ea7ae2c3d385a7b3b3a5f33987705cfdd2b (commit) from 1dd2430d8877ffda43bc46f0d5f23fea4801ecf6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b7922ea7ae2c3d385a7b3b3a5f33987705cfdd2b Author: NIIBE Yutaka Date: Thu Oct 25 20:31:08 2018 +0900 build: Relax requirements. * m4/gpg-error.m4: Update from libgpg-error 1.33. * src/libassuan.m4: Don't require AM_PATH_GPG_ERROR. Only when gpgrt-config is available and works well, use it. * configure.ac (AM_PATH_GPG_ERROR): No requirement any more. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 15f6f18..06923cf 100644 --- a/configure.ac +++ b/configure.ac @@ -354,7 +354,7 @@ AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes") # Checking for libgpg-error. -AM_PATH_GPG_ERROR(1.33,, AC_MSG_ERROR([libgpg-error was not found])) +AM_PATH_GPG_ERROR(1.17,, AC_MSG_ERROR([libgpg-error was not found])) # # Checks for library functions. diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 0f46cd6..f89a4ee 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -62,15 +62,21 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no - if test "$GPG_ERROR_CONFIG" != "no" \ - && test -f "$GPG_ERROR_CONFIG" ; then + if test "$GPG_ERROR_CONFIG" = "no"; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + fi + else + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + fi + if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -84,7 +90,14 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi fi + if test -z "$GPGRT_CONFIG"; then + if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + fi + fi fi + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` diff --git a/src/libassuan.m4 b/src/libassuan.m4 index ab1e855..85f79f3 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -16,7 +16,6 @@ dnl Returns ok set to yes or no. dnl AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], [ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(libassuan-prefix, AC_HELP_STRING([--with-libassuan-prefix=PFX], [prefix where LIBASSUAN is installed (optional)]), @@ -25,8 +24,16 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], if test x${LIBASSUAN_CONFIG+set} != xset ; then LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config fi + fi + + if test x"$GPGRT_CONFIG" != x -o "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG libassuan >/dev/null 2>&1; then + LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan" + else + LIBASSUAN_CONFIG=no + fi else - LIBASSUAN_CONFIG="$GPG_ERROR_CONFIG libassuan" + AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no) fi tmp=ifelse([$1], ,1:0.9.2,$1) @@ -40,8 +47,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version) ok=no - if test "$LIBASSUAN_CONFIG" != "no" \ - && test -f "${LIBASSUAN_CONFIG% *}" ; then + if test "$LIBASSUAN_CONFIG" != "no"; then req_major=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_libassuan_version | \ ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- m4/gpg-error.m4 | 21 +++++++++++++++++---- src/libassuan.m4 | 14 ++++++++++---- 3 files changed, 28 insertions(+), 9 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 13:44:13 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 25 Oct 2018 13:44:13 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-16-g0a3192a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 0a3192ae33f6b57312cb5bfec0e8fd491c923728 (commit) from b7922ea7ae2c3d385a7b3b3a5f33987705cfdd2b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0a3192ae33f6b57312cb5bfec0e8fd491c923728 Author: NIIBE Yutaka Date: Thu Oct 25 20:43:57 2018 +0900 build: Fix previous commit. Signed-off-by: NIIBE Yutaka diff --git a/src/libassuan.m4 b/src/libassuan.m4 index 85f79f3..798e458 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -26,7 +26,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], fi fi - if test x"$GPGRT_CONFIG" != x -o "$GPGRT_CONFIG" != "no"; then + if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if CC=$CC $GPGRT_CONFIG libassuan >/dev/null 2>&1; then LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan" else ----------------------------------------------------------------------- Summary of changes: src/libassuan.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 14:13:58 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 25 Oct 2018 14:13:58 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-24-g05a0e97 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 05a0e97f5c12c06082fbeab0fba6f86ddbfbe6b2 (commit) from 04791c896712857feaf9a472a48d7a4c4f287775 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 05a0e97f5c12c06082fbeab0fba6f86ddbfbe6b2 Author: Andre Heinecke Date: Thu Oct 25 14:09:37 2018 +0200 cpp: Add some convenience functions * lang/cpp/src/context.cpp (Context::create): New. * lang/cpp/src/context.h: Update accordingly. * lang/cpp/src/key.cpp, lang/cpp/src/key.h: (Key::isBad, Subkey::isBad, UserID::isBad) (UserID::Signature::isBad): Add shorthand for the isX checks. * NEWS: Mention it. -- I don't know how often I wrote: if (key.isNull() || key.isExpired() || key.isRevoked() ... And for the context it is good practice to use a unique ptr so the API should make it easy. diff --git a/NEWS b/NEWS index 09ac43e..69fe066 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,14 @@ Noteworthy changes in version 1.12.1 (unreleased) ------------------------------------------------- + * Interface changes relative to the 1.12.0 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + cpp: Context::create NEW. + cpp: Key::isBad NEW. + cpp: Subkey::isBad NEW. + cpp: UserID::isBad NEW. + cpp: UserID::Signature::isBad NEW. + Noteworthy changes in version 1.12.0 (2018-10-08) ------------------------------------------------- diff --git a/lang/cpp/src/context.cpp b/lang/cpp/src/context.cpp index 2892d8b..ce38db0 100644 --- a/lang/cpp/src/context.cpp +++ b/lang/cpp/src/context.cpp @@ -228,6 +228,11 @@ Context *Context::createForProtocol(Protocol proto) return new Context(ctx); } +std::unique_ptr Context::create(Protocol proto) +{ + return std::unique_ptr (createForProtocol(proto)); +} + std::unique_ptr Context::createForEngine(Engine eng, Error *error) { gpgme_ctx_t ctx = 0; diff --git a/lang/cpp/src/context.h b/lang/cpp/src/context.h index 6e27daa..d3700e0 100644 --- a/lang/cpp/src/context.h +++ b/lang/cpp/src/context.h @@ -68,6 +68,8 @@ public: // static Context *createForProtocol(Protocol proto); + /** Same as above but returning a unique ptr. */ + static std::unique_ptr create(Protocol proto); static std::unique_ptr createForEngine(Engine engine, Error *err = 0); virtual ~Context(); diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp index 8fc266f..0d27292 100644 --- a/lang/cpp/src/key.cpp +++ b/lang/cpp/src/key.cpp @@ -1033,6 +1033,26 @@ time_t Key::lastUpdate() const return static_cast(key ? key->last_update : 0); } +bool Key::isBad() const +{ + return isNull() || isRevoked() || isExpired() || isDisabled() || isInvalid(); +} + +bool Subkey::isBad() const +{ + return isNull() || isRevoked() || isExpired() || isDisabled() || isInvalid(); +} + +bool UserID::isBad() const +{ + return isNull() || isRevoked() || isInvalid(); +} + +bool UserID::Signature::isBad() const +{ + return isNull() || isExpired() || isInvalid(); +} + std::ostream &operator<<(std::ostream &os, const UserID &uid) { os << "GpgME::UserID("; diff --git a/lang/cpp/src/key.h b/lang/cpp/src/key.h index 76a0d4f..c4edba0 100644 --- a/lang/cpp/src/key.h +++ b/lang/cpp/src/key.h @@ -98,6 +98,10 @@ public: bool isDisabled() const; bool isInvalid() const; + /*! Shorthand for isNull || isRevoked || isExpired || + * isDisabled || isInvalid */ + bool isBad() const; + bool canEncrypt() const; /*! This function contains a workaround for old gpgme's: all secret @@ -250,6 +254,10 @@ public: bool isInvalid() const; bool isDisabled() const; + /*! Shorthand for isNull || isRevoked || isExpired || + * isDisabled || isInvalid */ + bool isBad() const; + bool canEncrypt() const; bool canSign() const; bool canCertify() const; @@ -366,6 +374,9 @@ public: bool isRevoked() const; bool isInvalid() const; + /*! Shorthand for isNull || isRevoked || isInvalid */ + bool isBad() const; + /** TOFU info for this userid. * @returns The TOFU stats or a null TofuInfo. */ @@ -454,6 +465,9 @@ public: bool isExpired() const; bool isExportable() const; + /*! Shorthand for isNull || isExpired || isInvalid */ + bool isBad() const; + const char *signerUserID() const; const char *signerName() const; const char *signerEmail() const; ----------------------------------------------------------------------- Summary of changes: NEWS | 8 ++++++++ lang/cpp/src/context.cpp | 5 +++++ lang/cpp/src/context.h | 2 ++ lang/cpp/src/key.cpp | 20 ++++++++++++++++++++ lang/cpp/src/key.h | 14 ++++++++++++++ 5 files changed, 49 insertions(+) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 14:14:04 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 25 Oct 2018 14:14:04 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-16-g12535d4 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via 12535d4e5d510e6c66578399a534c334d6337749 (commit) from 1bf9ef1312911a92084515057d26878bbff5bbea (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 12535d4e5d510e6c66578399a534c334d6337749 Author: Andre Heinecke Date: Thu Oct 25 14:03:36 2018 +0200 Populate keycache on startup * src/gpgoladdin.cpp (GpgolAddin::OnStartupComplete): Populate keycache. * src/keycache.cpp (KeyCache::populate, do_populate) (do_populate_protocol): New. (KeyCache::getUltimateKeys): New. * src/mail.cpp (level_4_check): Use getUltimateKeys from cache. * src/parsecontroller.cpp, src/parsecontroller.h (get_ultimate_keys): Removed. -- This moves the ultimate keys cache into the keycache where it belongs and should fix problems not finding signing keys when sign always is set. It should also speed up the first verify operation as keylistings are no longer required. GnuPG-Bug-Id: T4218 diff --git a/src/gpgoladdin.cpp b/src/gpgoladdin.cpp index aca9943..be3bdac 100644 --- a/src/gpgoladdin.cpp +++ b/src/gpgoladdin.cpp @@ -49,6 +49,7 @@ #include "cpphelp.h" #include "dispcache.h" #include "categorymanager.h" +#include "keycache.h" #include #include @@ -524,6 +525,8 @@ GpgolAddin::OnStartupComplete (SAFEARRAY** custom) CloseHandle (CreateThread (NULL, 0, init_gpgme_config, nullptr, 0, NULL)); + + KeyCache::instance ()->populate (); return S_OK; } diff --git a/src/keycache.cpp b/src/keycache.cpp index e1bb17f..1371930 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -215,6 +215,65 @@ do_import (LPVOID arg) TRETURN 0; } +static void +do_populate_protocol (GpgME::Protocol proto, bool secret) +{ + log_debug ("%s:%s: Starting keylisting for proto %s", + SRCNAME, __func__, to_cstr (proto)); + auto ctx = GpgME::Context::create (proto); + if (!ctx) + { + /* Maybe PGP broken and not S/MIME */ + log_error ("%s:%s: broken installation no ctx.", + SRCNAME, __func__); + TRETURN; + } + + ctx->setKeyListMode (GpgME::KeyListMode::Local); + GpgME::Error err; + + if ((err = ctx->startKeyListing ((const char*)nullptr, secret))) + { + log_error ("%s:%s: Failed to start keylisting err: %i: %s", + SRCNAME, __func__, err.code (), err.asString()); + TRETURN; + } + + while (!err) + { + const auto key = ctx->nextKey(err); + if (err || key.isNull()) + { + TRACEPOINT; + break; + } + KeyCache::instance()->onUpdateJobDone (key.primaryFingerprint(), + key); + + } + TRETURN; +} + +static DWORD WINAPI +do_populate (LPVOID) +{ + TSTART; + + log_debug ("%s:%s: Populating keycache", + SRCNAME, __func__); + do_populate_protocol (GpgME::OpenPGP, false); + do_populate_protocol (GpgME::OpenPGP, true); + if (opt.enable_smime) + { + do_populate_protocol (GpgME::CMS, false); + do_populate_protocol (GpgME::CMS, true); + } + log_debug ("%s:%s: Keycache populated", + SRCNAME, __func__); + + TRETURN 0; +} + class KeyCache::Private { @@ -262,7 +321,8 @@ public: TRETURN; } - void setPgpKeySecret(const std::string &mbox, const GpgME::Key &key) + void setPgpKeySecret(const std::string &mbox, const GpgME::Key &key, + bool insert = true) { TSTART; gpgol_lock (&keycache_lock); @@ -276,12 +336,16 @@ public: { it->second = key; } - insertOrUpdateInFprMap (key); + if (insert) + { + insertOrUpdateInFprMap (key); + } gpgol_unlock (&keycache_lock); TRETURN; } - void setSmimeKeySecret(const std::string &mbox, const GpgME::Key &key) + void setSmimeKeySecret(const std::string &mbox, const GpgME::Key &key, + bool insert = true) { TSTART; gpgol_lock (&keycache_lock); @@ -295,7 +359,10 @@ public: { it->second = key; } - insertOrUpdateInFprMap (key); + if (insert) + { + insertOrUpdateInFprMap (key); + } gpgol_unlock (&keycache_lock); TRETURN; } @@ -546,8 +613,6 @@ public: auto it = m_fpr_map.find (primaryFpr); - log_debug ("%s:%s \"%s\" updated.", - SRCNAME, __func__, anonstr (primaryFpr)); if (it == m_fpr_map.end ()) { m_fpr_map.insert (std::make_pair (primaryFpr, key)); @@ -556,6 +621,51 @@ public: TRETURN; } + for (const auto &uid: key.userIDs()) + { + if (key.isBad() || uid.isBad()) + { + continue; + } + /* Update ultimate keys map */ + if (uid.validity() == GpgME::UserID::Validity::Ultimate && + uid.id()) + { + const char *fpr = key.primaryFingerprint(); + if (!fpr) + { + STRANGEPOINT; + continue; + } + TRACEPOINT; + m_ultimate_keys.erase (std::remove_if (m_ultimate_keys.begin(), + m_ultimate_keys.end(), + [fpr] (const GpgME::Key &ult) + { + return ult.primaryFingerprint() && !strcmp (fpr, ult.primaryFingerprint()); + }), m_ultimate_keys.end()); + TRACEPOINT; + m_ultimate_keys.push_back (key); + } + + /* Update skey maps */ + if (key.hasSecret ()) + { + if (key.protocol () == GpgME::OpenPGP) + { + setPgpKeySecret (uid.addrSpec(), key, false); + } + else if (key.protocol () == GpgME::CMS) + { + setSmimeKeySecret (uid.addrSpec(), key, false); + } + else + { + STRANGEPOINT; + } + } + } + if (it->second.hasSecret () && !key.hasSecret()) { log_debug ("%s:%s Lost secret info on update. Merging.", @@ -715,8 +825,6 @@ public: if (it == m_update_jobs.end()) { - log_debug ("%s:%s Update for \"%s\" already finished.", - SRCNAME, __func__, anonstr (fpr)); gpgol_unlock (&update_lock); TRETURN; } @@ -793,6 +901,18 @@ public: TRETURN; } + void populate () + { + TSTART; + gpgrt_lock_lock (&keycache_lock); + m_ultimate_keys.clear (); + gpgrt_lock_unlock (&keycache_lock); + CloseHandle (CreateThread (nullptr, 0, do_populate, + nullptr, 0, + nullptr)); + TRETURN; + } + std::unordered_map m_pgp_key_map; std::unordered_map m_smime_key_map; std::unordered_map m_pgp_skey_map; @@ -801,6 +921,7 @@ public: std::unordered_map m_sub_fpr_map; std::unordered_map > m_addr_book_overrides; + std::vector m_ultimate_keys; std::set m_update_jobs; std::set m_import_jobs; }; @@ -1277,3 +1398,18 @@ KeyCache::getOverrides (const std::string &mbox) { return d->getPGPOverrides (mbox.c_str ()); } + +void +KeyCache::populate () +{ + return d->populate (); +} + +std::vector +KeyCache::getUltimateKeys () +{ + gpgrt_lock_lock (&fpr_map_lock); + const auto ret = d->m_ultimate_keys; + gpgrt_lock_unlock (&fpr_map_lock); + return ret; +} diff --git a/src/keycache.h b/src/keycache.h index cc5ab77..0a90575 100644 --- a/src/keycache.h +++ b/src/keycache.h @@ -124,6 +124,11 @@ public: /* Get optional overrides for an address. */ std::vector getOverrides (const std::string &mbox); + /* Populate the fingerprint and secret key maps */ + void populate (); + + /* Get a vector of ultimately trusted keys. */ + std::vector getUltimateKeys (); // Internal for thread void setSmimeKey(const std::string &mbox, const GpgME::Key &key); diff --git a/src/mail.cpp b/src/mail.cpp index 134ea9d..9305057 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -2497,7 +2497,7 @@ level_4_check (const UserID &uid) } if (uid.validity () == UserID::Validity::Full) { - const auto ultimate_keys = ParseController::get_ultimate_keys (); + const auto ultimate_keys = KeyCache::instance()->getUltimateKeys (); for (const auto sig: uid.signatures ()) { const char *sigID = sig.signerKeyID (); diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp index 7dfade8..826b597 100644 --- a/src/parsecontroller.cpp +++ b/src/parsecontroller.cpp @@ -493,25 +493,12 @@ ParseController::parse() bool has_valid_encrypted_checksum = false; /* Ensure that the Keys for the signatures are available and if it has a valid encrypted checksum. */ - bool ultimate_keys_queried = false; for (const auto sig: m_verify_result.signatures()) { TRACEPOINT; has_valid_encrypted_checksum = is_valid_chksum (sig); KeyCache::instance ()->update (sig.fingerprint (), protocol); - - if (!ultimate_keys_queried && - (sig.validity() == Signature::Validity::Full || - sig.validity() == Signature::Validity::Ultimate)) - { - /* Ensure that we have the keys with ultimate - trust cached for the ui. */ - - // TODO this is something for the keycache - get_ultimate_keys (); - ultimate_keys_queried = true; - } TRACEPOINT; } @@ -628,76 +615,3 @@ ParseController::get_attachments() const TRETURN std::vector >(); } } - -GPGRT_LOCK_DEFINE(keylist_lock); -/* static */ -std::vector -ParseController::get_ultimate_keys() -{ - TSTART; - static bool s_keys_listed; - static std::vector s_ultimate_keys; - gpgol_lock (&keylist_lock); - if (s_keys_listed) - { - gpgol_unlock (&keylist_lock); - TRETURN s_ultimate_keys; - } - log_debug ("%s:%s: Starting keylisting.", - SRCNAME, __func__); - auto ctx = std::unique_ptr (Context::createForProtocol (OpenPGP)); - if (!ctx) - { - /* Maybe PGP broken and not S/MIME */ - log_error ("%s:%s: broken installation no ctx.", - SRCNAME, __func__); - gpgol_unlock (&keylist_lock); - TRETURN s_ultimate_keys; - } - ctx->setKeyListMode (KeyListMode::Local); - Error err; - TRACEPOINT; - if ((err = ctx->startKeyListing ())) - { - log_error ("%s:%s: Failed to start keylisting err: %i: %s", - SRCNAME, __func__, err.code (), err.asString()); - gpgol_unlock (&keylist_lock); - TRETURN s_ultimate_keys; - } - TRACEPOINT; - while (!err) - { - const auto key = ctx->nextKey(err); - if (err || key.isNull()) - { - TRACEPOINT; - break; - } - if (key.isInvalid ()) - { - log_debug ("%s:%s: skipping invalid key.", - SRCNAME, __func__); - continue; - } - for (const auto uid: key.userIDs()) - { - if (uid.validity() == UserID::Validity::Ultimate && - uid.id()) - { - s_ultimate_keys.push_back (key); - log_debug ("%s:%s: Adding ultimate uid.", - SRCNAME, __func__); - log_data ("%s:%s: Added uid %s.", - SRCNAME, __func__, uid.id()); - break; - } - } - } - TRACEPOINT; - log_debug ("%s:%s: keylisting done.", - SRCNAME, __func__); - - s_keys_listed = true; - gpgol_unlock (&keylist_lock); - TRETURN s_ultimate_keys; -} diff --git a/src/parsecontroller.h b/src/parsecontroller.h index 863b94c..44465b8 100644 --- a/src/parsecontroller.h +++ b/src/parsecontroller.h @@ -62,13 +62,6 @@ public: ~ParseController(); - /* Get a list of ultimately keys where at least one - userid has ultimate trust. This list - will be initialized only once when the first signature - is validity full or ultimate is encountered. */ - static std::vector get_ultimate_keys(); - - /** Main entry point. After execution getters will become valid. */ void parse(); ----------------------------------------------------------------------- Summary of changes: src/gpgoladdin.cpp | 3 + src/keycache.cpp | 152 +++++++++++++++++++++++++++++++++++++++++++++--- src/keycache.h | 5 ++ src/mail.cpp | 2 +- src/parsecontroller.cpp | 86 --------------------------- src/parsecontroller.h | 7 --- 6 files changed, 153 insertions(+), 102 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 17:35:11 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 25 Oct 2018 17:35:11 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-241-g2b57a81 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 2b57a8159cdc3b212a4efc68787b40cafcd91ebe (commit) from 0240345728a84d8f235ce05889e83963e52742eb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2b57a8159cdc3b212a4efc68787b40cafcd91ebe Author: Werner Koch Date: Thu Oct 25 17:21:52 2018 +0200 dirmngr: Fix out of scope use of a var in the keyserver LDAP code. * dirmngr/ks-engine-ldap.c (extract_attributes): Don't use a variabale out of scope and cleanup the entire pgpKeySize block. -- GnuPG-bug-id: 4229 Signed-off-by: Werner Koch diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c index f50ba50..d94bd5e 100644 --- a/dirmngr/ks-engine-ldap.c +++ b/dirmngr/ks-engine-ldap.c @@ -1694,26 +1694,16 @@ extract_attributes (LDAPMod ***modlist, char *line) if (is_pub || is_sub) { - char *size = fields[2]; - int val = atoi (size); - size = NULL; + char padded[6]; + int val; - if (val > 0) - { - /* We zero pad this on the left to make PGP happy. */ - char padded[6]; - if (val < 99999 && val > 0) - { - snprintf (padded, sizeof padded, "%05u", val); - size = padded; - } - } - - if (size) - { - if (is_pub || is_sub) - modlist_add (modlist, "pgpKeySize", size); - } + val = atoi (fields[2]); + if (val < 99999 && val > 0) + { + /* We zero pad this on the left to make PGP happy. */ + snprintf (padded, sizeof padded, "%05u", val); + modlist_add (modlist, "pgpKeySize", padded); + } } if (is_pub) @@ -1736,10 +1726,7 @@ extract_attributes (LDAPMod ***modlist, char *line) } if (algo) - { - if (is_pub) - modlist_add (modlist, "pgpKeyType", algo); - } + modlist_add (modlist, "pgpKeyType", algo); } if (is_pub || is_sub || is_sig) ----------------------------------------------------------------------- Summary of changes: dirmngr/ks-engine-ldap.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 17:38:06 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 25 Oct 2018 17:38:06 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-18-g26ebb15 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via 26ebb15bec897a105b248680c1ddf1806592b1eb (commit) from e53253485cd7ceb7012505a629d2cd997167ccab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 26ebb15bec897a105b248680c1ddf1806592b1eb Author: Werner Koch Date: Thu Oct 25 17:21:52 2018 +0200 dirmngr: Fix out of scope use of a var in the keyserver LDAP code. * dirmngr/ks-engine-ldap.c (extract_attributes): Don't use a variabale out of scope and cleanup the entire pgpKeySize block. -- GnuPG-bug-id: 4229 Signed-off-by: Werner Koch (cherry picked from commit 2b57a8159cdc3b212a4efc68787b40cafcd91ebe) diff --git a/dirmngr/ks-engine-ldap.c b/dirmngr/ks-engine-ldap.c index f50ba50..d94bd5e 100644 --- a/dirmngr/ks-engine-ldap.c +++ b/dirmngr/ks-engine-ldap.c @@ -1694,26 +1694,16 @@ extract_attributes (LDAPMod ***modlist, char *line) if (is_pub || is_sub) { - char *size = fields[2]; - int val = atoi (size); - size = NULL; + char padded[6]; + int val; - if (val > 0) - { - /* We zero pad this on the left to make PGP happy. */ - char padded[6]; - if (val < 99999 && val > 0) - { - snprintf (padded, sizeof padded, "%05u", val); - size = padded; - } - } - - if (size) - { - if (is_pub || is_sub) - modlist_add (modlist, "pgpKeySize", size); - } + val = atoi (fields[2]); + if (val < 99999 && val > 0) + { + /* We zero pad this on the left to make PGP happy. */ + snprintf (padded, sizeof padded, "%05u", val); + modlist_add (modlist, "pgpKeySize", padded); + } } if (is_pub) @@ -1736,10 +1726,7 @@ extract_attributes (LDAPMod ***modlist, char *line) } if (algo) - { - if (is_pub) - modlist_add (modlist, "pgpKeyType", algo); - } + modlist_add (modlist, "pgpKeyType", algo); } if (is_pub || is_sub || is_sig) ----------------------------------------------------------------------- Summary of changes: dirmngr/ks-engine-ldap.c | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 18:26:42 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 25 Oct 2018 18:26:42 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-242-g11e9b70 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 11e9b704b5054708b0b307013fde053701c39df4 (commit) from 2b57a8159cdc3b212a4efc68787b40cafcd91ebe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 11e9b704b5054708b0b307013fde053701c39df4 Author: Werner Koch Date: Thu Oct 25 18:26:34 2018 +0200 speedo: Sign the windows installer with a timestamp. -- diff --git a/build-aux/speedo.mk b/build-aux/speedo.mk index d9b4a75..1a96e3b 100644 --- a/build-aux/speedo.mk +++ b/build-aux/speedo.mk @@ -157,8 +157,9 @@ INST_NAME=gnupg-w32 # Use this to override the installaion directory for native builds. INSTALL_PREFIX=none -# The Authenticode key used to sign the Windows installer +# The Authenticode key and cert chain used to sign the Windows installer AUTHENTICODE_KEY=${HOME}/.gnupg/g10code-authenticode-key.p12 +AUTHENTICODE_CERTS=${HOME}/.gnupg/g10code-authenticode-certs.pem # Directory names. @@ -1266,8 +1267,11 @@ sign-installer: echo "speedo: * Signing installer" ;\ echo "speedo: * Key: $(AUTHENTICODE_KEY)";\ echo "speedo: */" ;\ - osslsigncode sign -pkcs12 $(AUTHENTICODE_KEY) -askpass \ - -h sha256 -in "PLAY/inst/$$exefile" -out "../../$$exefile" ;\ + osslsigncode sign -certs $(AUTHENTICODE_CERTS)\ + -pkcs12 $(AUTHENTICODE_KEY) -askpass \ + -ts "http://timestamp.globalsign.com/scripts/timstamp.dll" \ + -h sha256 -n GnuPG -i https://gnupg.org \ + -in "PLAY/inst/$$exefile" -out "../../$$exefile" ;\ exefile="../../$$exefile" ;\ $(call MKSWDB_commands,$${exefile},$${reldate}); \ echo "speedo: /*" ;\ ----------------------------------------------------------------------- Summary of changes: build-aux/speedo.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 18:27:08 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 25 Oct 2018 18:27:08 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-19-g04604e6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via 04604e6cb9999a1f29fcb6acfe2223981fd2cf4b (commit) from 26ebb15bec897a105b248680c1ddf1806592b1eb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 04604e6cb9999a1f29fcb6acfe2223981fd2cf4b Author: Werner Koch Date: Thu Oct 25 18:27:04 2018 +0200 speedo: Sign the windows installer with a timestamp. -- diff --git a/build-aux/speedo.mk b/build-aux/speedo.mk index 320d440..bfbce05 100644 --- a/build-aux/speedo.mk +++ b/build-aux/speedo.mk @@ -157,8 +157,9 @@ INST_NAME=gnupg-w32 # Use this to override the installaion directory for native builds. INSTALL_PREFIX=none -# The Authenticode key used to sign the Windows installer +# The Authenticode key and cert chain used to sign the Windows installer AUTHENTICODE_KEY=${HOME}/.gnupg/g10code-authenticode-key.p12 +AUTHENTICODE_CERTS=${HOME}/.gnupg/g10code-authenticode-certs.pem # Directory names. @@ -1266,8 +1267,11 @@ sign-installer: echo "speedo: * Signing installer" ;\ echo "speedo: * Key: $(AUTHENTICODE_KEY)";\ echo "speedo: */" ;\ - osslsigncode sign -pkcs12 $(AUTHENTICODE_KEY) -askpass \ - -h sha256 -in "PLAY/inst/$$exefile" -out "../../$$exefile" ;\ + osslsigncode sign -certs $(AUTHENTICODE_CERTS)\ + -pkcs12 $(AUTHENTICODE_KEY) -askpass \ + -ts "http://timestamp.globalsign.com/scripts/timstamp.dll" \ + -h sha256 -n GnuPG -i https://gnupg.org \ + -in "PLAY/inst/$$exefile" -out "../../$$exefile" ;\ exefile="../../$$exefile" ;\ $(call MKSWDB_commands,$${exefile},$${reldate}); \ echo "speedo: /*" ;\ ----------------------------------------------------------------------- Summary of changes: build-aux/speedo.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Oct 25 22:53:42 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Thu, 25 Oct 2018 22:53:42 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-244-ga7c5d65 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via a7c5d65eb50355274c1b5b047c02c653f518900a (commit) via b39ece7d35401302879062d9d4bec25b1249ae7e (commit) from 11e9b704b5054708b0b307013fde053701c39df4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a7c5d65eb50355274c1b5b047c02c653f518900a Author: Daniel Kahn Gillmor Date: Thu Oct 25 16:52:58 2018 -0400 all: fix more spelling errors diff --git a/Makefile.am b/Makefile.am index 680fe1b..b59e9e3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -189,7 +189,7 @@ release: $(MAKE) -f $(RELEASE_NAME)/build-aux/speedo.mk w32-release ;\ echo "/* Build finished at $$(date -uIseconds) */" ;\ echo "/*" ;\ - echo " * Please run the final step interactivly:" ;\ + echo " * Please run the final step interactively:" ;\ echo " * make sign-release" ;\ echo " */" ;\ ) 2>&1 | tee "$(RELEASE_NAME).buildlog" diff --git a/NEWS b/NEWS index 27f78b1..245cc70 100644 --- a/NEWS +++ b/NEWS @@ -98,7 +98,7 @@ Noteworthy changes in version 2.3.0 (unreleased) * dirmngr: Fallback to CRL if no default OCSP responder is configured. * dirmngr: Implement CRL fetching via https. Here a redirection to - http is explictly allowed. + http is explicitly allowed. * dirmngr: Make LDAP searching and CRL fetching work under Windows. This stopped working with 2.1. [#3937] @@ -959,7 +959,7 @@ Noteworthy changes in version 2.1.11 (2016-01-26) * gpg: Emit PROGRESS status lines during key generation. - * gpg: Don't check for ambigious or non-matching key specification in + * gpg: Don't check for ambiguous or non-matching key specification in the config file or given to --encrypt-to. This feature will return in 2.3.x. @@ -986,7 +986,7 @@ Noteworthy changes in version 2.1.11 (2016-01-26) * dirmmgr: All configured keyservers are now searched. * dirmngr: Install CA certificate for hkps.pool.sks-keyservers.net. - Use this certiticate even if --hkp-cacert is not used. + Use this certificate even if --hkp-cacert is not used. * gpgtar: Add actual encryption code. gpgtar does now fully replace gpg-zip. @@ -1020,7 +1020,7 @@ Noteworthy changes in version 2.1.10 (2015-12-04) * gpg: New option --only-sign-text-ids to exclude photo IDs from key signing. - * gpg: Check for ambigious or non-matching key specification in the + * gpg: Check for ambiguous or non-matching key specification in the config file or given to --encrypt-to. * gpg: Show the used card reader with --card-status. @@ -1310,7 +1310,7 @@ Noteworthy changes in version 2.1.1 (2014-12-16) * gpg: Fixed regression in --refresh-keys. - * gpg: Fixed regresion in %g and %p codes for --sig-notation. + * gpg: Fixed regression in %g and %p codes for --sig-notation. * gpg: Fixed best matching hash algo detection for ECDSA and EdDSA. @@ -1390,7 +1390,7 @@ Noteworthy changes in version 2.1.0 (2014-11-06) * gpg: Default keyring is now created with a .kbx suffix. - * gpg: Add a shortcut to the key capabilies menu (e.g. "=e" sets the + * gpg: Add a shortcut to the key capabilities menu (e.g. "=e" sets the encryption capabilities). * gpg: Fixed obsolete options parsing. @@ -1582,7 +1582,7 @@ Noteworthy changes in version 2.1.0 (2014-11-06) * scdaemon: Does not anymore block after changing a card (regression fix). - * tools: gpg-connect-agent does now proberly display the help output + * tools: gpg-connect-agent does now properly display the help output for "SCD HELP" commands. @@ -1707,7 +1707,7 @@ Noteworthy changes in version 2.0.13 (2009-09-04) * Add hack to the internal CCID driver to allow the use of some Omnikey based card readers with 2048 bit keys. - * GPG now repeatly asks the user to insert the requested OpenPGP + * GPG now repeatedly asks the user to insert the requested OpenPGP card. This can be disabled with --limit-card-insert-tries=1. * Minor bug fixes. @@ -1833,7 +1833,7 @@ Noteworthy changes in version 2.0.9 (2008-03-26) * Extended the PKITS framework. - * Fixed a bug in the ambigious name detection. + * Fixed a bug in the ambiguous name detection. * Fixed possible memory corruption while importing OpenPGP keys (bug introduced with 2.0.8). [CVE-2008-1530] @@ -2383,7 +2383,7 @@ Noteworthy changes in version 1.9.2 (2003-11-17) command but from the menu provided by the new --card-edit command. * PINs are now properly cached and there are only 2 PINs visible. - The 3rd PIN (CHV2) is internally syncronized with the regular PIN. + The 3rd PIN (CHV2) is internally synchronized with the regular PIN. * All kind of other internal stuff. @@ -3087,7 +3087,7 @@ Noteworthy changes in version 1.0.1 (1999-12-16) * Fixed some minor bugs and the problem with conventional encrypted packets which did use the gpg v3 partial length headers. - * Add Indonesian and Portugese translations. + * Add Indonesian and Portuguese translations. * Fixed a bug with symmetric-only encryption using the non-default 3DES. The option --emulate-3des-s2k-bug may be used to decrypt documents @@ -3190,7 +3190,7 @@ Noteworthy changes in version 0.9.8 (1999-06-26) * New option --with-key-data to list the public key parameters. New option -N to insert notations and a --set-policy-url. - A couple of other options to allow reseting of options. + A couple of other options to allow resetting of options. * Better support for HPUX. @@ -3669,7 +3669,7 @@ Noteworthy changes in version 0.2.19 (1998-05-29) Noteworthy changes in version 0.2.18 (1998-05-15) ------------------------------------ - * Splitted cipher/random.c, add new option "--disable-dev-random" + * Split cipher/random.c, add new option "--disable-dev-random" to configure to support the development of a random source for other systems. Prepared sourcefiles rand-unix.c, rand-w32.c and rand-dummy.c (which is used to allow compilation on systems diff --git a/agent/keyformat.txt b/agent/keyformat.txt index 2e48b34..c7426db 100644 --- a/agent/keyformat.txt +++ b/agent/keyformat.txt @@ -234,7 +234,7 @@ The currently defined protection modes are: (csum n) (protection PROTTYPE PROTALGO IV S2KMODE S2KHASH S2KSALT S2KCOUNT))) - Note that the public key paramaters in SKEY are duplicated and + Note that the public key parameters in SKEY are duplicated and should be identical to their copies in the standard parameter elements. Here is an example of an entire protected private key using this format: @@ -359,8 +359,8 @@ KEY_1 to KEY_N are unique identifiers for the shared secret, for example an URI. In case this information should be kept confidential as well, they may not appear in the unprotected part; however they are mandatory in the encrypted_octet_string. The list of keywords is -optional. The oder of the "key" lists and the order of the "value" -lists mut match, that is the first "key"-list is associated with the +optional. The order of the "key" lists and the order of the "value" +lists must match, that is the first "key"-list is associated with the first "value" list in the encrypted_octet_string. The protection mode etc. is identical to the protection mode as diff --git a/build-aux/speedo.mk b/build-aux/speedo.mk index 1a96e3b..5ec5823 100644 --- a/build-aux/speedo.mk +++ b/build-aux/speedo.mk @@ -971,7 +971,7 @@ else endif @touch $(stampdir)/stamp-$(1)-01-configure -# Note that unpack has no 64 bit version becuase it is just the source. +# Note that unpack has no 64 bit version because it is just the source. # Fixme: We should use templates to create the standard and w64 # version of these rules. $(stampdir)/stamp-w64-$(1)-01-configure: $(stampdir)/stamp-$(1)-00-unpack @@ -1143,7 +1143,7 @@ all-speedo: $(stampdir)/stamp-final report-speedo: $(addprefix report-,$(speedo_build_list)) -# Just to check if we catched all stamps. +# Just to check if we caught all stamps. clean-stamps: $(RM) -fR $(stampdir) @@ -1287,7 +1287,7 @@ endif # -# Check availibility of standard tools +# Check availability of standard tools # check-tools: diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex index 5a17f97..9e11848 100644 --- a/build-aux/texinfo.tex +++ b/build-aux/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2007-05-03.09} +\def\texinfoversion{2018-10-25.16} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -4598,7 +4598,7 @@ end \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. -% To achive this, remember the "biggest" unnum. sec. we are currently in: +% To achieve this, remember the "biggest" unnum. sec. we are currently in: \chardef\unmlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: diff --git a/common/mkerrors b/common/mkerrors index 138d3c1..2a6960a 100755 --- a/common/mkerrors +++ b/common/mkerrors @@ -30,7 +30,7 @@ cat < * How to mark a CA certificate as trusted. @@ -57,7 +57,7 @@ or In general you should first import the root certificates and then down to the end user certificate. You may put all into one file and gpgsm -will do the right thing in this case independend of the order. +will do the right thing in this case independent of the order. While verifying a signature, all included certificates are automagically imported. @@ -82,7 +82,7 @@ you get an output like: uid:::::::::CN=Werner Koch,OU=test,O=g10 Code,C=de:: uid::::::::::: -This should be familar to advanced gpg-users; see doc/DETAILS in gpg +This should be familiar to advanced gpg-users; see doc/DETAILS in gpg 1.3 (CVS HEAD) for a description of the records. The value in the "grp" tagged record is the so called keygrip and you should find a file ~/.gnupg/private-keys-v1.d/C92DB9CFD588ADE846BE3AC4E7A2E1B11A4A2ADB.key diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi index 76be528..f5910a8 100644 --- a/doc/dirmngr.texi +++ b/doc/dirmngr.texi @@ -1096,7 +1096,7 @@ as a binary blob. @c In the end the same fucntionality is used, albeit hidden by a couple @c of indirection and argument and result code mangling. It furthere @c ingetrages OCSP checking depending on options are the way it is - at c called. GPGSM still uses this command but might eventuall switch over + at c called. GPGSM still uses this command but might eventually switch over @c to CHECKCRL and CHECKOCSP so that ISVALID can be retired. @c @c diff --git a/doc/gpg.texi b/doc/gpg.texi index ba1df4b..dedb8cc 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -624,9 +624,9 @@ fingerprint (preferred) or their keyid. @end table - at c ******************************************* - at c ******* KEY MANGEMENT COMMANDS ********** - at c ******************************************* + at c ******************************************** + at c ******* KEY MANAGEMENT COMMANDS ********** + at c ******************************************** @node OpenPGP Key Management @subsection How to manage your keys @@ -2623,7 +2623,7 @@ These options are obsolete and have no effect since GnuPG 2.1. @item --force-aead @opindex force-aead Force the use of AEAD encryption over MDC encryption. AEAD is a -modern and faster way to do authenticated encrytion than the old MDC +modern and faster way to do authenticated encryption than the old MDC method. See also options @option{--aead-algo} and @option{--chunk-size}. @@ -2779,7 +2779,7 @@ This option is obsolete; it is handled as an alias for @option{--pgp7} @item --pgp7 @opindex pgp7 -Set up all options to be as PGP 7 compliant as possible. This allowd +Set up all options to be as PGP 7 compliant as possible. This allowed the ciphers IDEA, 3DES, CAST5,AES128, AES192, AES256, and TWOFISH., the hashes MD5, SHA1 and RIPEMD160, and the compression algorithms none and ZIP. This option implies @option{--escape-from-lines} and @@ -3051,7 +3051,7 @@ same thing. @opindex aead-algo Specify that the AEAD algorithm @var{name} is to be used. This is useful for symmetric encryption where no key preference are available -to select the AEAD algorithm. Runing @command{@gpgname} with option +to select the AEAD algorithm. Running @command{@gpgname} with option @option{--version} shows the available AEAD algorithms. In general, you do not want to use this option as it allows you to violate the OpenPGP standard. The option @option{--personal-aead-preferences} is diff --git a/g10/import.c b/g10/import.c index 6fdd53e..23258a0 100644 --- a/g10/import.c +++ b/g10/import.c @@ -3073,7 +3073,7 @@ chk_self_sigs (ctrl_t ctrl, kbnode_t keyblock, u32 *keyid, int *non_self) kbnode_t bsnode = NULL; /* Subkey binding signature node. */ u32 bsdate = 0; /* Timestamp of that node. */ kbnode_t rsnode = NULL; /* Subkey recocation signature node. */ - u32 rsdate = 0; /* Timestamp of tha node. */ + u32 rsdate = 0; /* Timestamp of that node. */ PKT_signature *sig; int rc; kbnode_t n; diff --git a/kbx/mkerrors b/kbx/mkerrors index 629485a..c0bca10 100755 --- a/kbx/mkerrors +++ b/kbx/mkerrors @@ -29,7 +29,7 @@ cat < 0)) { /* Note that we don't need a case for the root certificate - because its own consitency has already been checked. */ + because its own consistency has already been checked. */ do_list(opt.ignore_expiration?0:1, listmode, listfp, depth == 0 ? _("signature not created during lifetime of certificate") : diff --git a/tools/gpg-check-pattern.c b/tools/gpg-check-pattern.c index 1f015e9..dee5d5d 100644 --- a/tools/gpg-check-pattern.c +++ b/tools/gpg-check-pattern.c @@ -91,7 +91,7 @@ static struct enum { PAT_NULL, /* Indicates end of the array. */ PAT_STRING, /* The pattern is a simple string. */ - PAT_REGEX /* The pattern is an extended regualar expression. */ + PAT_REGEX /* The pattern is an extended regular expression. */ }; commit b39ece7d35401302879062d9d4bec25b1249ae7e Author: Daniel Kahn Gillmor Date: Thu Oct 25 09:46:23 2018 -0400 headers: fix spelling Signed-off-by: Daniel Kahn Gillmor diff --git a/common/audit.h b/common/audit.h index 4ef2645..05f3953 100644 --- a/common/audit.h +++ b/common/audit.h @@ -185,7 +185,7 @@ typedef enum if no real recipient has been given. */ AUDIT_SESSION_KEY, /* string */ - /* Mark the creation or availibility of the session key. The + /* Mark the creation or availability of the session key. The parameter is the algorithm ID. */ AUDIT_ENCRYPTED_TO, /* cert, err */ diff --git a/common/sexp-parse.h b/common/sexp-parse.h index 4f77f14..0403d65 100644 --- a/common/sexp-parse.h +++ b/common/sexp-parse.h @@ -105,7 +105,7 @@ smatch (unsigned char const **buf, size_t buflen, const char *token) } /* Format VALUE for use as the length indicatior of an S-expression. - The caller needs to provide a buffer HELP_BUFFER wth a length of + The caller needs to provide a buffer HELP_BUFFER with a length of HELP_BUFLEN. The return value is a pointer into HELP_BUFFER with the formatted length string. The colon and a trailing nul are appended. HELP_BUFLEN must be at least 3 - a more useful value is diff --git a/dirmngr/cdb.h b/dirmngr/cdb.h index 0c0d270..5d46f69 100644 --- a/dirmngr/cdb.h +++ b/dirmngr/cdb.h @@ -85,7 +85,7 @@ int cdb_make_put(struct cdb_make *cdbmp, const void *key, cdbi_t klen, const void *val, cdbi_t vlen, int flag); -#define CDB_PUT_ADD 0 /* add unconditionnaly, like cdb_make_add() */ +#define CDB_PUT_ADD 0 /* add unconditionally, like cdb_make_add() */ #define CDB_PUT_REPLACE 1 /* replace: do not place to index OLD record */ #define CDB_PUT_INSERT 2 /* add only if not already exists */ #define CDB_PUT_WARN 3 /* add unconditionally but ret. 1 if exists */ diff --git a/g10/key-clean.h b/g10/key-clean.h index a0fb769..c4f1649 100644 --- a/g10/key-clean.h +++ b/g10/key-clean.h @@ -23,7 +23,7 @@ #include "gpg.h" -/* No explict cleaning. */ +/* No explicit cleaning. */ #define KEY_CLEAN_NONE 0 /* Remove only invalid subkeys (ie. missing key-bindings) */ #define KEY_CLEAN_INVALID 1 diff --git a/g10/packet.h b/g10/packet.h index 6e1438b..d088bf4 100644 --- a/g10/packet.h +++ b/g10/packet.h @@ -244,7 +244,7 @@ typedef struct const byte *trust_regexp; struct revocation_key *revkey; int numrevkeys; - int help_counter; /* Used internally bu some fucntions. */ + int help_counter; /* Used internally bu some functions. */ pka_info_t *pka_info; /* Malloced PKA data or NULL if not available. See also flags.pka_tried. */ char *signers_uid; /* Malloced value of the SIGNERS_UID diff --git a/sm/gpgsm.h b/sm/gpgsm.h index d3fbde5..7a5e491 100644 --- a/sm/gpgsm.h +++ b/sm/gpgsm.h @@ -76,7 +76,7 @@ struct const char *protect_tool_program; char *outfile; /* name of output file */ - int with_key_data;/* include raw key in the column delimted output */ + int with_key_data;/* include raw key in the column delimited output */ int fingerprint; /* list fingerprints in all key listings */ diff --git a/tools/gpgtar.h b/tools/gpgtar.h index 8cbe80b..28d3d88 100644 --- a/tools/gpgtar.h +++ b/tools/gpgtar.h @@ -88,7 +88,7 @@ typedef enum } typeflag_t; -/* The internal represenation of a TAR header. */ +/* The internal representation of a TAR header. */ struct tar_header_s; typedef struct tar_header_s *tar_header_t; struct tar_header_s ----------------------------------------------------------------------- Summary of changes: Makefile.am | 2 +- NEWS | 26 +++++++++++++------------- agent/keyformat.txt | 6 +++--- build-aux/speedo.mk | 6 +++--- build-aux/texinfo.tex | 4 ++-- common/audit.h | 2 +- common/mkerrors | 2 +- common/mkerrtok | 2 +- common/sexp-parse.h | 2 +- configure.ac | 2 +- dirmngr/cdb.h | 2 +- doc/Notes | 6 +++--- doc/dirmngr.texi | 2 +- doc/gpg.texi | 12 ++++++------ g10/import.c | 2 +- g10/key-clean.h | 2 +- g10/packet.h | 2 +- kbx/mkerrors | 2 +- m4/gpg-error.m4 | 2 +- m4/ksba.m4 | 2 +- m4/libgcrypt.m4 | 2 +- m4/ntbtls.m4 | 2 +- sm/certchain.c | 2 +- sm/gpgsm.h | 2 +- tools/gpg-check-pattern.c | 2 +- tools/gpgtar.h | 2 +- 26 files changed, 50 insertions(+), 50 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 01:46:23 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 01:46:23 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-25-ga32a50c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via a32a50c7726ee7c6ac320d99b9ab42f073960cc9 (commit) from 07cf4a9ab6f1a7b68aeda39ba03691e713254418 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a32a50c7726ee7c6ac320d99b9ab42f073960cc9 Author: NIIBE Yutaka Date: Fri Oct 26 08:42:19 2018 +0900 build: Relax build requirements. * m4/gpg-error.m4: Update from libgpg-error 1.33. * src/ksba.m4: Don't require AM_PATH_GPG_ERROR. Use GPGRT_CONFIG when it is confirmed that it is available and working well. * configure.ac (AM_PATH_GPG_ERROR): No requirement for newer version (It was because of new gpgrt-config which supports *.pc files). Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 097e1da..e21f7d0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # configure.ac - for libksba # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -# 2010, 2011, 2012 g10 Code GmbH +# 2010, 2011, 2012, 2018 g10 Code GmbH # # This file is part of KSBA # @@ -58,7 +58,7 @@ LIBKSBA_LT_REVISION=6 KSBA_CONFIG_API_VERSION=1 -NEED_GPG_ERROR_VERSION=1.33 +NEED_GPG_ERROR_VERSION=1.8 AC_CONFIG_AUX_DIR([build-aux]) diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 0f46cd6..f89a4ee 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -62,15 +62,21 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no - if test "$GPG_ERROR_CONFIG" != "no" \ - && test -f "$GPG_ERROR_CONFIG" ; then + if test "$GPG_ERROR_CONFIG" = "no"; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + fi + else + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + fi + if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -84,7 +90,14 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi fi + if test -z "$GPGRT_CONFIG"; then + if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + fi + fi fi + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` diff --git a/src/ksba.m4 b/src/ksba.m4 index 62dc17f..43fb1f2 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -1,5 +1,5 @@ # ksba.m4 - autoconf macro to detect ksba -# Copyright (C) 2002 g10 Code GmbH +# Copyright (C) 2002, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -22,7 +22,6 @@ dnl with a changed API. dnl AC_DEFUN([AM_PATH_KSBA], [ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_PATH_GPG_ERROR]) dnl --with-libksba-prefix=PFX is the preferred name for this option, dnl since that is consistent with how our three siblings use the directory/ dnl package name in --with-$dir_name-prefix=PFX. @@ -41,8 +40,15 @@ AC_DEFUN([AM_PATH_KSBA], if test x${KSBA_CONFIG+set} != xset ; then KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config fi + fi + if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG libksba >/dev/null 2>&1; then + LIBKSBA_CONFIG="$GPGRT_CONFIG libksba" + else + LIBKSBA_CONFIG=no + fi else - KSBA_CONFIG="$GPG_ERROR_CONFIG ksba" + AC_PATH_TOOL(LIBKSBA_CONFIG, ksba-config, no) fi tmp=ifelse([$1], ,1:1.0.0,$1) ----------------------------------------------------------------------- Summary of changes: configure.ac | 4 ++-- m4/gpg-error.m4 | 21 +++++++++++++++++---- src/ksba.m4 | 12 +++++++++--- 3 files changed, 28 insertions(+), 9 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 02:12:19 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 02:12:19 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-105-g8e5641e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 8e5641ed65f86783542d5caccdeeee42eeb9457c (commit) from 3b271079d52978e5507ef71476f169332d4fd2e5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8e5641ed65f86783542d5caccdeeee42eeb9457c Author: NIIBE Yutaka Date: Fri Oct 26 09:09:51 2018 +0900 build: Relax build requirements. * m4/gpg-error.m4: Update from libgpg-error 1.33. * src/libgcrypt.m4: Don't require AM_PATH_GPG_ERROR. Use GPGRT_CONFIG instead of libgcrypt-config when it is confirmed that it is available and working well. * configure.ac (AM_PATH_GPG_ERROR): No requirement for newer version (It was because of new gpgrt-config which supports *.pc files). Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 5cb4b37..cdce339 100644 --- a/configure.ac +++ b/configure.ac @@ -72,7 +72,7 @@ LIBGCRYPT_CONFIG_API_VERSION=1 # If you change the required gpg-error version, please remove # unnecessary error code defines in src/gcrypt-int.h. -NEED_GPG_ERROR_VERSION=1.33 +NEED_GPG_ERROR_VERSION=1.25 AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/libgcrypt.vers]) diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 0f46cd6..f89a4ee 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -62,15 +62,21 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no - if test "$GPG_ERROR_CONFIG" != "no" \ - && test -f "$GPG_ERROR_CONFIG" ; then + if test "$GPG_ERROR_CONFIG" = "no"; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + fi + else + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + fi + if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -84,7 +90,14 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi fi + if test -z "$GPGRT_CONFIG"; then + if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + fi + fi fi + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 index e1a158e..ccbc377 100644 --- a/src/libgcrypt.m4 +++ b/src/libgcrypt.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-25 +# Last-changed: 2018-10-26 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, @@ -29,7 +29,6 @@ dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(libgcrypt-prefix, AC_HELP_STRING([--with-libgcrypt-prefix=PFX], [prefix where LIBGCRYPT is installed (optional)]), @@ -45,16 +44,26 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi ;; '') - LIBGCRYPT_CONFIG="$GPG_ERROR_CONFIG libgcrypt" ;; *) - LIBGCRYPT_CONFIG="$GPG_ERROR_CONFIG libgcrypt" AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi fi + if test x"${LIBGCRYPT_CONFIG}" = x ; then + if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG libgcrypt >/dev/null 2>&1; then + LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" + libgcrypt_config_by_gpgrt=yes + fi + fi + fi + if test -z "$libgcrypt_config_by_gpgrt"; then + AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) + fi + tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- m4/gpg-error.m4 | 21 +++++++++++++++++---- src/libgcrypt.m4 | 17 +++++++++++++---- 3 files changed, 31 insertions(+), 9 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 02:19:59 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 02:19:59 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-17-gbb9a89b Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via bb9a89bf5defa793ae9c1939d9476f6dfd46d448 (commit) from 0a3192ae33f6b57312cb5bfec0e8fd491c923728 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bb9a89bf5defa793ae9c1939d9476f6dfd46d448 Author: NIIBE Yutaka Date: Fri Oct 26 09:17:49 2018 +0900 build: Improve libassuan.m4. * src/libassuan.m4: Don't try gpgrt-config when LIBASSUAN_CONFIG set. Fall back to detecting libassuan-config, when gpgrt-config doesn't work well. Signed-off-by: NIIBE Yutaka diff --git a/src/libassuan.m4 b/src/libassuan.m4 index 798e458..a39ed76 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -26,13 +26,13 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], fi fi - if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + use_gpgrt_config="" + if test x"${LIBASSUAN_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if CC=$CC $GPGRT_CONFIG libassuan >/dev/null 2>&1; then LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan" - else - LIBASSUAN_CONFIG=no + use_gpgrt_config=yes fi - else + if test -z "$use_gpgrt_config"; then AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no) fi ----------------------------------------------------------------------- Summary of changes: src/libassuan.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 02:23:33 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 02:23:33 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-18-g24f80c4 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 24f80c49fde0fa4e9a7c2818c8a922cc5a4abacc (commit) from bb9a89bf5defa793ae9c1939d9476f6dfd46d448 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 24f80c49fde0fa4e9a7c2818c8a922cc5a4abacc Author: NIIBE Yutaka Date: Fri Oct 26 09:23:16 2018 +0900 build: Fix previous commit. Signed-off-by: NIIBE Yutaka diff --git a/src/libassuan.m4 b/src/libassuan.m4 index a39ed76..e1ebbd1 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -32,6 +32,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan" use_gpgrt_config=yes fi + fi if test -z "$use_gpgrt_config"; then AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no) fi ----------------------------------------------------------------------- Summary of changes: src/libassuan.m4 | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 02:24:50 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 02:24:50 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-26-gf0116c0 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via f0116c07d0d89fc7114dedeb3fc638ab9dae2254 (commit) from a32a50c7726ee7c6ac320d99b9ab42f073960cc9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f0116c07d0d89fc7114dedeb3fc638ab9dae2254 Author: NIIBE Yutaka Date: Fri Oct 26 09:23:44 2018 +0900 build: Improve ksba.m4. * src/ksba.m4: Don't try gpgrt-config when LIBKSBA_CONFIG set. Fall back to detecting ksba-config, when gpgrt-config doesn't work well. Signed-off-by: NIIBE Yutaka diff --git a/src/ksba.m4 b/src/ksba.m4 index 43fb1f2..d02954a 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -41,13 +41,15 @@ AC_DEFUN([AM_PATH_KSBA], KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config fi fi - if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + + use_gpgrt_config="" + if test x"$KSBA_CONFIG" != x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if CC=$CC $GPGRT_CONFIG libksba >/dev/null 2>&1; then LIBKSBA_CONFIG="$GPGRT_CONFIG libksba" - else - LIBKSBA_CONFIG=no + use_gpgrt_config=yes fi - else + fi + if test -z "$use_gpgrt_config"; then AC_PATH_TOOL(LIBKSBA_CONFIG, ksba-config, no) fi ----------------------------------------------------------------------- Summary of changes: src/ksba.m4 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 02:40:18 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 02:40:18 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-106-g630ece1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 630ece1b7e0a94442bca91d8e96d9b1d4cd3ec66 (commit) from 8e5641ed65f86783542d5caccdeeee42eeb9457c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 630ece1b7e0a94442bca91d8e96d9b1d4cd3ec66 Author: NIIBE Yutaka Date: Fri Oct 26 09:38:47 2018 +0900 build: Fix libgcrypt.m4. * src/libgcrypt.m4: Use AC_PATH_PROG to detect libgcrypt-config. -- Last commit using AC_PATH_TOOL was wrong. Signed-off-by: NIIBE Yutaka diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 index ccbc377..e674293 100644 --- a/src/libgcrypt.m4 +++ b/src/libgcrypt.m4 @@ -52,16 +52,15 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi - if test x"${LIBGCRYPT_CONFIG}" = x ; then - if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG libgcrypt >/dev/null 2>&1; then - LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" - libgcrypt_config_by_gpgrt=yes - fi + use_gpgrt_config="" + if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG libgcrypt >/dev/null 2>&1; then + LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" + use_gpgrt_config=yes fi fi - if test -z "$libgcrypt_config_by_gpgrt"; then - AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) fi tmp=ifelse([$1], ,1:1.2.0,$1) ----------------------------------------------------------------------- Summary of changes: src/libgcrypt.m4 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 02:41:26 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 02:41:26 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-27-g910c148 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via 910c148825d50798689998ed760b658f2aeeee64 (commit) from f0116c07d0d89fc7114dedeb3fc638ab9dae2254 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 910c148825d50798689998ed760b658f2aeeee64 Author: NIIBE Yutaka Date: Fri Oct 26 09:40:43 2018 +0900 build: Fix ksba.m4. * src/ksba.m4: Use AC_PATH_PROG to detect ksba-config. Signed-off-by: NIIBE Yutaka diff --git a/src/ksba.m4 b/src/ksba.m4 index d02954a..1333979 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -50,7 +50,7 @@ AC_DEFUN([AM_PATH_KSBA], fi fi if test -z "$use_gpgrt_config"; then - AC_PATH_TOOL(LIBKSBA_CONFIG, ksba-config, no) + AC_PATH_PROG(LIBKSBA_CONFIG, ksba-config, no) fi tmp=ifelse([$1], ,1:1.0.0,$1) ----------------------------------------------------------------------- Summary of changes: src/ksba.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 02:42:46 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 02:42:46 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-19-g0a2a322 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 0a2a322cb470479cf1f9c8653ba0f943eb30ce0d (commit) from 24f80c49fde0fa4e9a7c2818c8a922cc5a4abacc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0a2a322cb470479cf1f9c8653ba0f943eb30ce0d Author: NIIBE Yutaka Date: Fri Oct 26 09:42:07 2018 +0900 build: Fix libassuan.m4. * src/libassuan.m4: Use AC_PATH_PROG to detect libassuan-config. Signed-off-by: NIIBE Yutaka diff --git a/src/libassuan.m4 b/src/libassuan.m4 index e1ebbd1..c9af77b 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -34,7 +34,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], fi fi if test -z "$use_gpgrt_config"; then - AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no) + AC_PATH_PROG(LIBASSUAN_CONFIG, libassuan-config, no) fi tmp=ifelse([$1], ,1:0.9.2,$1) ----------------------------------------------------------------------- Summary of changes: src/libassuan.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 02:50:47 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 02:50:47 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-11-g64bc82e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via 64bc82e24961cde6bae6615154bc3b2d6ce1a274 (commit) from 1233f3293f2076544f9924b268b2eca04e0ada39 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 64bc82e24961cde6bae6615154bc3b2d6ce1a274 Author: NIIBE Yutaka Date: Fri Oct 26 09:46:07 2018 +0900 build: Relax build requirements. * m4/gpg-error.m4: Update. * m4/ksba.m4: Update. * m4/libgcrypt.m4: Update. * configure.ac (NEED_GPG_ERROR_VERSION): Don't require newer. * src/ntbtls.m4: Don't require AM_PATH_GPG_ERROR. Use GPGRT_CONFIG when it is confirmed that it is available and working well. Fall back to detecting NTBTLS_CONFIG, if not. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index f4e7aef..af15467 100644 --- a/configure.ac +++ b/configure.ac @@ -61,7 +61,7 @@ NTBTLS_CONFIG_API_VERSION=1 # Minimum versions for required libraries -NEED_GPG_ERROR_VERSION=1.33 +NEED_GPG_ERROR_VERSION=1.17 NEED_LIBGCRYPT_API=1 NEED_LIBGCRYPT_VERSION=1.6.0 diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 0f46cd6..f89a4ee 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -62,15 +62,21 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) ok=no - if test "$GPG_ERROR_CONFIG" != "no" \ - && test -f "$GPG_ERROR_CONFIG" ; then + if test "$GPG_ERROR_CONFIG" = "no"; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + fi + else + gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + fi + if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -84,7 +90,14 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi fi + if test -z "$GPGRT_CONFIG"; then + if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + fi + fi fi + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` diff --git a/m4/ksba.m4 b/m4/ksba.m4 index e7d2641..1333979 100644 --- a/m4/ksba.m4 +++ b/m4/ksba.m4 @@ -1,5 +1,5 @@ # ksba.m4 - autoconf macro to detect ksba -# Copyright (C) 2002 g10 Code GmbH +# Copyright (C) 2002, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -21,18 +21,36 @@ dnl this features allows to prevent build against newer versions of libksba dnl with a changed API. dnl AC_DEFUN([AM_PATH_KSBA], -[AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_PATH_GPG_ERROR]) - AC_ARG_WITH(ksba-prefix, - AC_HELP_STRING([--with-ksba-prefix=PFX], - [prefix where KSBA is installed (optional)]), +[ AC_REQUIRE([AC_CANONICAL_HOST]) + dnl --with-libksba-prefix=PFX is the preferred name for this option, + dnl since that is consistent with how our three siblings use the directory/ + dnl package name in --with-$dir_name-prefix=PFX. + AC_ARG_WITH(libksba-prefix, + AC_HELP_STRING([--with-libksba-prefix=PFX], + [prefix where KSBA is installed (optional)]), ksba_config_prefix="$withval", ksba_config_prefix="") + + dnl Accept --with-ksba-prefix and make it work the same as + dnl --with-libksba-prefix above, for backwards compatibility, + dnl but do not document this old, inconsistently-named option. + AC_ARG_WITH(ksba-prefix,, + ksba_config_prefix="$withval", ksba_config_prefix="") + if test x$ksba_config_prefix != x ; then if test x${KSBA_CONFIG+set} != xset ; then KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config fi - else - KSBA_CONFIG="$GPG_ERROR_CONFIG ksba" + fi + + use_gpgrt_config="" + if test x"$KSBA_CONFIG" != x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG libksba >/dev/null 2>&1; then + LIBKSBA_CONFIG="$GPGRT_CONFIG libksba" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(LIBKSBA_CONFIG, ksba-config, no) fi tmp=ifelse([$1], ,1:1.0.0,$1) diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4 index df6469d..e674293 100644 --- a/m4/libgcrypt.m4 +++ b/m4/libgcrypt.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-24 +# Last-changed: 2018-10-26 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, @@ -29,7 +29,6 @@ dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(libgcrypt-prefix, AC_HELP_STRING([--with-libgcrypt-prefix=PFX], [prefix where LIBGCRYPT is installed (optional)]), @@ -45,16 +44,25 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi ;; '') - LIBGCRYPT_CONFIG="$GPG_ERROR_CONFIG libgcrypt" ;; *) - LIBGCRYPT_CONFIG="$GPG_ERROR_CONFIG libgcrypt" AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi fi + use_gpgrt_config="" + if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG libgcrypt >/dev/null 2>&1; then + LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) + fi + tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -105,7 +113,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then - tmp=`CC=$CC $LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`CC=$CC $LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then @@ -121,7 +129,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], LIBGCRYPT_CFLAGS=`CC=$CC $LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`CC=$CC $LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) - libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ diff --git a/src/ntbtls.m4 b/src/ntbtls.m4 index b6ef715..67d314a 100644 --- a/src/ntbtls.m4 +++ b/src/ntbtls.m4 @@ -23,7 +23,6 @@ dnl with a changed API. dnl AC_DEFUN([AM_PATH_NTBTLS], [ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_PATH_GPG_ERROR]) AC_ARG_WITH(ntbtls-prefix, AC_HELP_STRING([--with-ntbtls-prefix=PFX], [prefix where NTBTLS is installed (optional)]), @@ -39,16 +38,25 @@ AC_DEFUN([AM_PATH_NTBTLS], fi ;; '') - NTBTLS_CONFIG="$GPG_ERROR_CONFIG ntbtls" ;; *) - NTBTLS_CONFIG="$GPG_ERROR_CONFIG ntbtls" AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi fi + use_gpgrt_config="" + if test x"${NTBTLS_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG ntbtls >/dev/null 2>&1; then + NTBTLS_CONFIG="$GPGRT_CONFIG ntbtls" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(NTBTLS_CONFIG, ntbtls-config, no) + fi + tmp=ifelse([$1], ,1:1.0.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_ntbtls_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` ----------------------------------------------------------------------- Summary of changes: configure.ac | 2 +- m4/gpg-error.m4 | 21 +++++++++++++++++---- m4/ksba.m4 | 34 ++++++++++++++++++++++++++-------- m4/libgcrypt.m4 | 20 ++++++++++++++------ src/ntbtls.m4 | 14 +++++++++++--- 5 files changed, 69 insertions(+), 22 deletions(-) hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 03:18:54 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 03:18:54 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-40-g1096ff7 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 1096ff770b3d5cc58f423b129cc5d83731398dd9 (commit) from ffbff048bde636e3ec19f2912fa4034e70e18f44 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1096ff770b3d5cc58f423b129cc5d83731398dd9 Author: NIIBE Yutaka Date: Fri Oct 26 10:17:30 2018 +0900 gpg-error.m4: Better backward compatibility support. * src/gpg-error.m4: Don't assume newer implementation of gpg-error-config. Use old way when it found old. Signed-off-by: NIIBE Yutaka diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 index f89a4ee..70dc501 100644 --- a/src/gpg-error.m4 +++ b/src/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-25 +# Last-changed: 2018-10-26 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -63,10 +63,13 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) ok=no + + use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` fi else @@ -94,6 +97,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes fi fi fi @@ -101,18 +105,27 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` - GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` - GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + if test -z "$use_gpgrt_config"; then + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + else + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + else + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $GPG_ERROR_CONFIG was +*** The config script "$GPG_ERROR_CONFIG" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgpg-error-prefix ----------------------------------------------------------------------- Summary of changes: src/gpg-error.m4 | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 03:36:59 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 03:36:59 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-107-ga755bd0 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via a755bd0ea09af2ae5a66e3f5aeb8707673c687cf (commit) from 630ece1b7e0a94442bca91d8e96d9b1d4cd3ec66 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a755bd0ea09af2ae5a66e3f5aeb8707673c687cf Author: NIIBE Yutaka Date: Fri Oct 26 10:35:51 2018 +0900 libgcrypt.m4: Better compatibility support. * src/gpg-error.m4: Update. * src/libgcrypt.m4: Don't assume libgcrypt-config is newer. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index f89a4ee..70dc501 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-25 +# Last-changed: 2018-10-26 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -63,10 +63,13 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) ok=no + + use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` fi else @@ -94,6 +97,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes fi fi fi @@ -101,18 +105,27 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` - GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` - GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + if test -z "$use_gpgrt_config"; then + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + else + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + else + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $GPG_ERROR_CONFIG was +*** The config script "$GPG_ERROR_CONFIG" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgpg-error-prefix diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 index e674293..5c3f6e1 100644 --- a/src/libgcrypt.m4 +++ b/src/libgcrypt.m4 @@ -81,7 +81,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --modversion` + if test -z "$use_gpgrt_config"; then + libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --version` + else + libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --modversion` + fi major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ @@ -113,7 +117,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then - tmp=`CC=$CC $LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`CC=$CC $LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`CC=$CC $LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then @@ -129,7 +137,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], LIBGCRYPT_CFLAGS=`CC=$CC $LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`CC=$CC $LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) - libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + else + libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 27 ++++++++++++++++++++------- src/libgcrypt.m4 | 18 +++++++++++++++--- 2 files changed, 35 insertions(+), 10 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 03:41:28 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 03:41:28 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-20-g882cbaf Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 882cbafa9444060524ff132d403a76d61f4273a6 (commit) from 0a2a322cb470479cf1f9c8653ba0f943eb30ce0d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 882cbafa9444060524ff132d403a76d61f4273a6 Author: NIIBE Yutaka Date: Fri Oct 26 10:40:40 2018 +0900 libassuan.m4: Better backward compatibility support. * m4/gpg-error.m4: Update. * src/libassuan.m4: Don't assume libassuan-config is newer. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index f89a4ee..70dc501 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-25 +# Last-changed: 2018-10-26 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -63,10 +63,13 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) ok=no + + use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` fi else @@ -94,6 +97,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes fi fi fi @@ -101,18 +105,27 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` - GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` - GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + if test -z "$use_gpgrt_config"; then + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + else + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + else + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $GPG_ERROR_CONFIG was +*** The config script "$GPG_ERROR_CONFIG" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgpg-error-prefix diff --git a/src/libassuan.m4 b/src/libassuan.m4 index c9af77b..57adbfc 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -56,7 +56,11 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], req_micro=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libassuan_config_version=`CC=$CC $LIBASSUAN_CONFIG --modversion` + if test -z "$use_gpgrt_config"; then + libassuan_config_version=`CC=$CC $LIBASSUAN_CONFIG --version` + else + libassuan_config_version=`CC=$CC $LIBASSUAN_CONFIG --modversion` + fi major=`echo $libassuan_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libassuan_config_version | \ @@ -89,7 +93,11 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], if test $ok = yes; then if test "$req_libassuan_api" -gt 0 ; then - tmp=`CC=$CC $LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`CC=$CC $LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`CC=$CC $LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBASSUAN API version]) if test "$req_libassuan_api" -eq "$tmp" ; then @@ -104,7 +112,11 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], if test $ok = yes; then if test x"$host" != x ; then - libassuan_config_host=`CC=$CC $LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libassuan_config_host=`CC=$CC $LIBASSUAN_CONFIG --host 2>/dev/null || echo none` + else + libassuan_config_host=`CC=$CC $LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libassuan_config_host" != xnone ; then if test x"$libassuan_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 27 ++++++++++++++++++++------- src/libassuan.m4 | 18 +++++++++++++++--- 2 files changed, 35 insertions(+), 10 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 03:48:31 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 03:48:31 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-28-gd3fdae7 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via d3fdae7a299a0514b90dbb7f45a0d08ee5d93078 (commit) from 910c148825d50798689998ed760b658f2aeeee64 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d3fdae7a299a0514b90dbb7f45a0d08ee5d93078 Author: NIIBE Yutaka Date: Fri Oct 26 10:46:39 2018 +0900 ksba.m4: Better backward compatibility. * m4/gpg-error.m4: Update. * src/ksba.m4: Don't assume ksba-config is newer. Fix KSBA_CONFIG which used LIBKSBA_CONFIG wrongly. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index f89a4ee..70dc501 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-25 +# Last-changed: 2018-10-26 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -63,10 +63,13 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) ok=no + + use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` fi else @@ -94,6 +97,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes fi fi fi @@ -101,18 +105,27 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` - GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` - GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + if test -z "$use_gpgrt_config"; then + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + else + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + else + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $GPG_ERROR_CONFIG was +*** The config script "$GPG_ERROR_CONFIG" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgpg-error-prefix diff --git a/src/ksba.m4 b/src/ksba.m4 index 1333979..c61ca55 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -45,12 +45,12 @@ AC_DEFUN([AM_PATH_KSBA], use_gpgrt_config="" if test x"$KSBA_CONFIG" != x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if CC=$CC $GPGRT_CONFIG libksba >/dev/null 2>&1; then - LIBKSBA_CONFIG="$GPGRT_CONFIG libksba" + KSBA_CONFIG="$GPGRT_CONFIG libksba" use_gpgrt_config=yes fi fi if test -z "$use_gpgrt_config"; then - AC_PATH_PROG(LIBKSBA_CONFIG, ksba-config, no) + AC_PATH_PROG(KSBA_CONFIG, ksba-config, no) fi tmp=ifelse([$1], ,1:1.0.0,$1) @@ -71,7 +71,11 @@ AC_DEFUN([AM_PATH_KSBA], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ksba_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion` + if test -z "$use_gpgrt_config"; then + ksba_config_version=`CC=$CC $KSBA_CONFIG --version` + else + ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion` + fi major=`echo $ksba_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ksba_config_version | \ @@ -103,7 +107,11 @@ AC_DEFUN([AM_PATH_KSBA], # Even if we have a recent libksba, we should check that the # API is compatible. if test "$req_ksba_api" -gt 0 ; then - tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`CC=$CC $KSBA_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([KSBA API version]) if test "$req_ksba_api" -eq "$tmp" ; then @@ -119,7 +127,11 @@ AC_DEFUN([AM_PATH_KSBA], KSBA_CFLAGS=`CC=$CC $KSBA_CONFIG --cflags` KSBA_LIBS=`CC=$CC $KSBA_CONFIG --libs` ifelse([$2], , :, [$2]) - libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libksba_config_host=`CC=$CC $KSBA_CONFIG --host 2>/dev/null || echo none` + else + libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libksba_config_host" != xnone ; then if test x"$libksba_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 27 ++++++++++++++++++++------- src/ksba.m4 | 22 +++++++++++++++++----- 2 files changed, 37 insertions(+), 12 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 03:52:07 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 03:52:07 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-12-gcf45bc9 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via cf45bc9db3d63283169026bf6e8300712991fc01 (commit) from 64bc82e24961cde6bae6615154bc3b2d6ce1a274 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cf45bc9db3d63283169026bf6e8300712991fc01 Author: NIIBE Yutaka Date: Fri Oct 26 10:51:20 2018 +0900 ntbtls.m4: Better backward compatibility support. * m4/gpg-error.m4: Update. * src/ntbtls.m4: Don't assume ntbtls-config is newer. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index f89a4ee..70dc501 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-25 +# Last-changed: 2018-10-26 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -63,10 +63,13 @@ AC_DEFUN([AM_PATH_GPG_ERROR], AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) min_gpg_error_version=ifelse([$1], ,1.33,$1) ok=no + + use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` fi else @@ -94,6 +97,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes fi fi fi @@ -101,18 +105,27 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test $ok = yes; then GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` - GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` - GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + if test -z "$use_gpgrt_config"; then + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + else + GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + else + gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $GPG_ERROR_CONFIG was +*** The config script "$GPG_ERROR_CONFIG" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgpg-error-prefix diff --git a/src/ntbtls.m4 b/src/ntbtls.m4 index 67d314a..665ae00 100644 --- a/src/ntbtls.m4 +++ b/src/ntbtls.m4 @@ -75,7 +75,11 @@ AC_DEFUN([AM_PATH_NTBTLS], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ntbtls_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ntbtls_config_version=`CC=$CC $NTBTLS_CONFIG --modversion` + if test -z "$use_gpgrt_config"; then + ntbtls_config_version=`CC=$CC $NTBTLS_CONFIG --version` + else + ntbtls_config_version=`CC=$CC $NTBTLS_CONFIG --modversion` + fi major=`echo $ntbtls_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ntbtls_config_version | \ @@ -107,7 +111,11 @@ AC_DEFUN([AM_PATH_NTBTLS], # If we have a recent ntbtls, we should also check that the # API is compatible if test "$req_ntbtls_api" -gt 0 ; then - tmp=`CC=$CC $NTBTLS_CONFIG --variable=api_version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`CC=$CC $NTBTLS_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`CC=$CC $NTBTLS_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([NTBTLS API version]) if test "$req_ntbtls_api" -eq "$tmp" ; then @@ -123,7 +131,11 @@ AC_DEFUN([AM_PATH_NTBTLS], NTBTLS_CFLAGS=`CC=$CC $NTBTLS_CONFIG --cflags` NTBTLS_LIBS=`CC=$CC $NTBTLS_CONFIG --libs` ifelse([$2], , :, [$2]) - ntbtls_config_host=`CC=$CC $NTBTLS_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + ntbtls_config_host=`CC=$CC $NTBTLS_CONFIG --host 2>/dev/null || echo none` + else + ntbtls_config_host=`CC=$CC $NTBTLS_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$ntbtls_config_host" != xnone ; then if test x"$ntbtls_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 27 ++++++++++++++++++++------- src/ntbtls.m4 | 18 +++++++++++++++--- 2 files changed, 35 insertions(+), 10 deletions(-) hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 03:54:00 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 03:54:00 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-13-g07568d0 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via 07568d097f3e9662a5e49297d27324cbcd2407a4 (commit) from cf45bc9db3d63283169026bf6e8300712991fc01 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 07568d097f3e9662a5e49297d27324cbcd2407a4 Author: NIIBE Yutaka Date: Fri Oct 26 10:53:11 2018 +0900 build: Update ksba.m4 and libgcrypt.m4. * m4/ksba.m4: Update. * m4/libgcrypt.m4: Update. Signed-off-by: NIIBE Yutaka diff --git a/m4/ksba.m4 b/m4/ksba.m4 index 1333979..c61ca55 100644 --- a/m4/ksba.m4 +++ b/m4/ksba.m4 @@ -45,12 +45,12 @@ AC_DEFUN([AM_PATH_KSBA], use_gpgrt_config="" if test x"$KSBA_CONFIG" != x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if CC=$CC $GPGRT_CONFIG libksba >/dev/null 2>&1; then - LIBKSBA_CONFIG="$GPGRT_CONFIG libksba" + KSBA_CONFIG="$GPGRT_CONFIG libksba" use_gpgrt_config=yes fi fi if test -z "$use_gpgrt_config"; then - AC_PATH_PROG(LIBKSBA_CONFIG, ksba-config, no) + AC_PATH_PROG(KSBA_CONFIG, ksba-config, no) fi tmp=ifelse([$1], ,1:1.0.0,$1) @@ -71,7 +71,11 @@ AC_DEFUN([AM_PATH_KSBA], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ksba_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion` + if test -z "$use_gpgrt_config"; then + ksba_config_version=`CC=$CC $KSBA_CONFIG --version` + else + ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion` + fi major=`echo $ksba_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ksba_config_version | \ @@ -103,7 +107,11 @@ AC_DEFUN([AM_PATH_KSBA], # Even if we have a recent libksba, we should check that the # API is compatible. if test "$req_ksba_api" -gt 0 ; then - tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`CC=$CC $KSBA_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([KSBA API version]) if test "$req_ksba_api" -eq "$tmp" ; then @@ -119,7 +127,11 @@ AC_DEFUN([AM_PATH_KSBA], KSBA_CFLAGS=`CC=$CC $KSBA_CONFIG --cflags` KSBA_LIBS=`CC=$CC $KSBA_CONFIG --libs` ifelse([$2], , :, [$2]) - libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libksba_config_host=`CC=$CC $KSBA_CONFIG --host 2>/dev/null || echo none` + else + libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libksba_config_host" != xnone ; then if test x"$libksba_config_host" != x"$host" ; then AC_MSG_WARN([[ diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4 index e674293..5c3f6e1 100644 --- a/m4/libgcrypt.m4 +++ b/m4/libgcrypt.m4 @@ -81,7 +81,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --modversion` + if test -z "$use_gpgrt_config"; then + libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --version` + else + libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --modversion` + fi major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ @@ -113,7 +117,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then - tmp=`CC=$CC $LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`CC=$CC $LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`CC=$CC $LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then @@ -129,7 +137,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], LIBGCRYPT_CFLAGS=`CC=$CC $LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`CC=$CC $LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) - libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + else + libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: m4/ksba.m4 | 22 +++++++++++++++++----- m4/libgcrypt.m4 | 18 +++++++++++++++--- 2 files changed, 32 insertions(+), 8 deletions(-) hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 05:42:40 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 05:42:40 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-245-g4249e9a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 4249e9a2bf028f007d1ddaac730f636e5c6da20f (commit) from a7c5d65eb50355274c1b5b047c02c653f518900a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4249e9a2bf028f007d1ddaac730f636e5c6da20f Author: NIIBE Yutaka Date: Fri Oct 26 12:38:43 2018 +0900 kbx: Increase size of field for fingerprint. * kbx/keybox-search-desc.h (fpr): Increase the size. -- In the function keydb_search_fpr in g10/keydb.c, it is copied using MAX_FINGERPRINT_LEN. So, more size is required. Fixes-commit: ecbbafb88d920e713439b6b1b8e1b41a6f8d0e38 Signed-off-by: NIIBE Yutaka diff --git a/kbx/keybox-search-desc.h b/kbx/keybox-search-desc.h index 6298994..c75bfa4 100644 --- a/kbx/keybox-search-desc.h +++ b/kbx/keybox-search-desc.h @@ -69,7 +69,7 @@ struct keydb_search_desc int snlen; /* -1 := sn is a hex string */ union { const char *name; - unsigned char fpr[24]; + unsigned char fpr[32]; u32 kid[2]; /* Note that this is in native endianness. */ unsigned char grip[20]; } u; ----------------------------------------------------------------------- Summary of changes: kbx/keybox-search-desc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 06:20:37 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 06:20:37 +0200 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-29-g825a4a9 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via 825a4a9e93655b136dd2eee685e0e67aca912a01 (commit) from d3fdae7a299a0514b90dbb7f45a0d08ee5d93078 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 825a4a9e93655b136dd2eee685e0e67aca912a01 Author: NIIBE Yutaka Date: Fri Oct 26 13:19:51 2018 +0900 ksba.m4: Fix calling by gpgrt-config. * src/ksba.m4: Fix condition and use "ksba" for *.pc. Signed-off-by: NIIBE Yutaka diff --git a/src/ksba.m4 b/src/ksba.m4 index c61ca55..22f8cf9 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -43,9 +43,9 @@ AC_DEFUN([AM_PATH_KSBA], fi use_gpgrt_config="" - if test x"$KSBA_CONFIG" != x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG libksba >/dev/null 2>&1; then - KSBA_CONFIG="$GPGRT_CONFIG libksba" + if test x"$KSBA_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG ksba >/dev/null 2>&1; then + KSBA_CONFIG="$GPGRT_CONFIG ksba" use_gpgrt_config=yes fi fi ----------------------------------------------------------------------- Summary of changes: src/ksba.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 06:24:56 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 06:24:56 +0200 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-14-g3bd7643 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via 3bd7643ceb11630d4e483ff60016d794c73faea9 (commit) from 07568d097f3e9662a5e49297d27324cbcd2407a4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3bd7643ceb11630d4e483ff60016d794c73faea9 Author: NIIBE Yutaka Date: Fri Oct 26 13:24:42 2018 +0900 Update ksba.m4 again. Signed-off-by: NIIBE Yutaka diff --git a/m4/ksba.m4 b/m4/ksba.m4 index c61ca55..22f8cf9 100644 --- a/m4/ksba.m4 +++ b/m4/ksba.m4 @@ -43,9 +43,9 @@ AC_DEFUN([AM_PATH_KSBA], fi use_gpgrt_config="" - if test x"$KSBA_CONFIG" != x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG libksba >/dev/null 2>&1; then - KSBA_CONFIG="$GPGRT_CONFIG libksba" + if test x"$KSBA_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if CC=$CC $GPGRT_CONFIG ksba >/dev/null 2>&1; then + KSBA_CONFIG="$GPGRT_CONFIG ksba" use_gpgrt_config=yes fi fi ----------------------------------------------------------------------- Summary of changes: m4/ksba.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 08:18:02 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 26 Oct 2018 08:18:02 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-41-gaec676c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via aec676c9ca2da4feb2970f6ce036179afe778b25 (commit) from 1096ff770b3d5cc58f423b129cc5d83731398dd9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit aec676c9ca2da4feb2970f6ce036179afe778b25 Author: NIIBE Yutaka Date: Fri Oct 26 15:14:56 2018 +0900 gpgrt-config: Clean up the implementation. * src/gpgrt-config.in: Fix copyright notice. (--exists): Support new option of pkg-config. (--mt): Relax usage. (--api-version): Support old option. (default_module): New. (usage): Only show pkg-config compatible options. Signed-off-by: NIIBE Yutaka diff --git a/src/gpgrt-config.in b/src/gpgrt-config.in index d0b9a32..9df01b7 100644 --- a/src/gpgrt-config.in +++ b/src/gpgrt-config.in @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -198,7 +198,9 @@ find_file_in_path () { read_config_file () { if ! find_file_in_path $1.pc $2; then - echo "Can't find $1.pc" 1>&2 + if [ -z "$want_exists" ]; then + echo "Can't find $1.pc" 1>&2 + fi exit 1 fi read_config_from_stdin $RESULT < $RESULT @@ -461,24 +463,22 @@ sysroot () { #### end of functions for this script myname=${0##*/} -# Just for a while for testing -myname=${myname%-new} -############################## if [ $myname = gpgrt-config ]; then - myname="gpg-error-config" + default_module="gpg-error" +else + default_module=${myname%-config} fi usage() { cat <&2 fi -if [ "$1" != "--mt" ]; then - mt=no -else - # In future, use --variable=mtcflags or --variable=mtlibs - mt=yes - shift -fi module_list="" want_var="" want_attr="" want_cflags="" want_libs="" +want_exists="" cflags="" libs="" @@ -509,6 +503,8 @@ mtlibs="" delimiter=" " output="" +mt="no" + VAR_list=VAR_pc_sysrootdir if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then VAR_pc_sysrootdir="/" @@ -518,6 +514,7 @@ fi while test $# -gt 0; do case $1 in + #### pkg-config incompatible options: begin --prefix) # In future, use --variable=prefix instead. want_var=prefix @@ -532,11 +529,27 @@ while test $# -gt 0; do delimiter=" " ;; + --api-version) + # In future, use --variable=api_version instead. + want_var=api_version + ;; + --host) + # In future, use --variable=host instead. + want_var=host + ;; + --mt) + # In future, use --variable=mtcflags or --variable=mtlibs. + mt=yes + ;; + #### pkg-config incompatible options: end --modversion) want_attr=Version delimiter=" " ;; + --exists) + want_exists=yes + ;; --cflags) want_cflags=yes ;; @@ -546,10 +559,6 @@ while test $# -gt 0; do --variable=*) want_var=${1#*=} ;; - --host) - # In future, use --variable=host instead. - want_var=host - ;; --help) usage 0 ;; @@ -567,9 +576,9 @@ done if [ -z "$module_list" ]; then - module_list=${myname%-config} + module_list=$default_module elif expr match "$module_list" "=\|!=\|<\|>\|<=\|>=" >/dev/null; then - module_list="${myname%-config} $module_list" + module_list="$default_module $module_list" fi all_required_config_files $module_list @@ -612,4 +621,8 @@ if [ -z "$want_var" -a -z "$want_attr" ]; then fi fi -echo "$output" +if [ -z "$want_exists" ]; then + echo "$output" +fi + +exit 0 ----------------------------------------------------------------------- Summary of changes: src/gpgrt-config.in | 63 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 25 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 13:23:47 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 26 Oct 2018 13:23:47 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-109-g319f55e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 319f55e6e5793c59f1ba4cfe481b562bca42194d (commit) via 2e2e68ad4874a4678cfbe452b70ae987e0402eca (commit) from a755bd0ea09af2ae5a66e3f5aeb8707673c687cf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 319f55e6e5793c59f1ba4cfe481b562bca42194d Author: Werner Koch Date: Fri Oct 26 13:22:16 2018 +0200 random: Make sure to re-open /dev/random after a fork * random/rndlinux.c (_gcry_rndlinux_gather_random): Detect fork and re-open devices. -- This mitigates about ill-behaving software which has closed the standard fds but later dups them to /dev/null. GnuPG-bug-id: 3491 Signed-off-by: Werner Koch diff --git a/random/rndlinux.c b/random/rndlinux.c index 1bb7c76..f70bc21 100644 --- a/random/rndlinux.c +++ b/random/rndlinux.c @@ -104,9 +104,10 @@ open_device (const char *name, int retry) /* Note that the caller needs to make sure that this function is only - called by one thread at a time. The function returns 0 on success - or true on failure (in which case the caller will signal a fatal - error). */ + * called by one thread at a time. The function returns 0 on success + * or true on failure (in which case the caller will signal a fatal + * error). This function should be entered only by one thread at a + * time. */ int _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, enum random_origins), @@ -117,6 +118,11 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, static int fd_random = -1; static int only_urandom = -1; static unsigned char ever_opened; + static volatile pid_t my_pid; /* The volatile is there to make sure + * the compiler does not optimize the + * code away in case the getpid + * function is badly attributed. */ + volatile pid_t apid; int fd; int n; byte buffer[768]; @@ -130,13 +136,13 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, * use only urandom. */ if (only_urandom == -1) { + my_pid = getpid (); if ((_gcry_random_read_conf () & RANDOM_CONF_ONLY_URANDOM)) only_urandom = 1; else only_urandom = 0; } - if (!add) { /* Special mode to close the descriptors. */ @@ -153,6 +159,25 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, return 0; } + /* Detect a fork and close the devices so that we don't use the old + * file descriptors. Note that open_device will be called in retry + * mode if the devices was opened by the parent process. */ + apid = getpid (); + if (my_pid != apid) + { + if (fd_random != -1) + { + close (fd_random); + fd_random = -1; + } + if (fd_urandom != -1) + { + close (fd_urandom); + fd_urandom = -1; + } + my_pid = apid; + } + /* First read from a hardware source. However let it account only for up to 50% (or 25% for RDRAND) of the requested bytes. */ commit 2e2e68ad4874a4678cfbe452b70ae987e0402eca Author: Werner Koch Date: Fri Oct 26 12:57:30 2018 +0200 primes: Avoid leaking bits of the prime test to pageable memory. * cipher/primegen.c (gen_prime): Allocate MODS in secure memory. -- This increases the pressure on the secure memory by about 1400 byte but given that we can meanwhile increase the size of the secmem area, this is acceptable. GnuPG-bug-id: 3848 Signed-off-by: Werner Koch diff --git a/cipher/primegen.c b/cipher/primegen.c index ce5ad3c..e24de4d 100644 --- a/cipher/primegen.c +++ b/cipher/primegen.c @@ -758,7 +758,8 @@ gen_prime (unsigned int nbits, int secret, int randomlevel, if (nbits < 16) log_fatal ("can't generate a prime with less than %d bits\n", 16); - mods = xmalloc (no_of_small_prime_numbers * sizeof *mods); + mods = (secret? xmalloc_secure (no_of_small_prime_numbers * sizeof *mods) + /* */ : xmalloc (no_of_small_prime_numbers * sizeof *mods)); /* Make nbits fit into gcry_mpi_t implementation. */ val_2 = mpi_alloc_set_ui( 2 ); val_3 = mpi_alloc_set_ui( 3); ----------------------------------------------------------------------- Summary of changes: cipher/primegen.c | 3 ++- random/rndlinux.c | 33 +++++++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 5 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 13:49:57 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Fri, 26 Oct 2018 13:49:57 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-110-g7e66268 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 7e662680c170968661ee0105d132813f8281d229 (commit) from 319f55e6e5793c59f1ba4cfe481b562bca42194d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7e662680c170968661ee0105d132813f8281d229 Author: Daniel Kahn Gillmor Date: Wed Sep 5 10:34:04 2018 -0400 random: use getrandom() on Linux where available * random/rndlinux.c (_gcry_rndlinux_gather_random): use the getrandom() syscall on Linux if it exists, regardless of what kind of entropy was requested. -- This change avoids the serious usability problem of unnecessary blocking on /dev/random when the kernel's PRNG is already seeded, without introducing the risk of pulling from an uninitialized PRNG. It only has an effect on Linux systems with a functioning getrandom() syscall. If that syscall is unavailable or fails, it should fall through to the pre-existing behavior. GnuPG-bug-id: 3894 Signed-off-by: Daniel Kahn Gillmor diff --git a/random/rndlinux.c b/random/rndlinux.c index f70bc21..fefc3c3 100644 --- a/random/rndlinux.c +++ b/random/rndlinux.c @@ -245,17 +245,16 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, struct timeval tv; int rc; - /* If we have a modern Linux kernel and we want to read from the - * the non-blocking /dev/urandom, we first try to use the new + /* If we have a modern Linux kernel, we first try to use the new * getrandom syscall. That call guarantees that the kernel's * RNG has been properly seeded before returning any data. This * is different from /dev/urandom which may, due to its * non-blocking semantics, return data even if the kernel has - * not been properly seeded. Unfortunately we need to use a + * not been properly seeded. And it differs from /dev/random by never + * blocking once the kernel is seeded. Unfortunately we need to use a * syscall and not a new device and thus we are not able to use * select(2) to have a timeout. */ #if defined(__linux__) && defined(HAVE_SYSCALL) && defined(__NR_getrandom) - if (fd == fd_urandom) { long ret; size_t nbytes; @@ -272,7 +271,7 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, } while (ret == -1 && errno == EINTR); if (ret == -1 && errno == ENOSYS) - ; /* The syscall is not supported - fallback to /dev/urandom. */ + ; /* The syscall is not supported - fallback to pulling from fd. */ else { /* The syscall is supported. Some sanity checks. */ if (ret == -1) ----------------------------------------------------------------------- Summary of changes: random/rndlinux.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 13:52:18 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Fri, 26 Oct 2018 13:52:18 +0200 Subject: [git] GCRYPT - branch, LIBGCRYPT-1.8-BRANCH, updated. libgcrypt-1.8.3-13-g0973c3f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1.8-BRANCH has been updated via 0973c3f9ee7a9ad7c97b77849ed33ecd6789c787 (commit) via 60885655756dd0427872b8f01c06da14eab5af70 (commit) via 5b1d022293c5779b1150a7653cce4e3bf494a07c (commit) from 99a5babfd1e759310db8ab8b11d182f2e139dfb1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0973c3f9ee7a9ad7c97b77849ed33ecd6789c787 Author: Daniel Kahn Gillmor Date: Wed Sep 5 10:34:04 2018 -0400 random: use getrandom() on Linux where available * random/rndlinux.c (_gcry_rndlinux_gather_random): use the getrandom() syscall on Linux if it exists, regardless of what kind of entropy was requested. -- This change avoids the serious usability problem of unnecessary blocking on /dev/random when the kernel's PRNG is already seeded, without introducing the risk of pulling from an uninitialized PRNG. It only has an effect on Linux systems with a functioning getrandom() syscall. If that syscall is unavailable or fails, it should fall through to the pre-existing behavior. GnuPG-bug-id: 3894 Signed-off-by: Daniel Kahn Gillmor (cherry picked from commit 7e662680c170968661ee0105d132813f8281d229) diff --git a/random/rndlinux.c b/random/rndlinux.c index f70bc21..fefc3c3 100644 --- a/random/rndlinux.c +++ b/random/rndlinux.c @@ -245,17 +245,16 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, struct timeval tv; int rc; - /* If we have a modern Linux kernel and we want to read from the - * the non-blocking /dev/urandom, we first try to use the new + /* If we have a modern Linux kernel, we first try to use the new * getrandom syscall. That call guarantees that the kernel's * RNG has been properly seeded before returning any data. This * is different from /dev/urandom which may, due to its * non-blocking semantics, return data even if the kernel has - * not been properly seeded. Unfortunately we need to use a + * not been properly seeded. And it differs from /dev/random by never + * blocking once the kernel is seeded. Unfortunately we need to use a * syscall and not a new device and thus we are not able to use * select(2) to have a timeout. */ #if defined(__linux__) && defined(HAVE_SYSCALL) && defined(__NR_getrandom) - if (fd == fd_urandom) { long ret; size_t nbytes; @@ -272,7 +271,7 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, } while (ret == -1 && errno == EINTR); if (ret == -1 && errno == ENOSYS) - ; /* The syscall is not supported - fallback to /dev/urandom. */ + ; /* The syscall is not supported - fallback to pulling from fd. */ else { /* The syscall is supported. Some sanity checks. */ if (ret == -1) commit 60885655756dd0427872b8f01c06da14eab5af70 Author: Werner Koch Date: Fri Oct 26 13:22:16 2018 +0200 random: Make sure to re-open /dev/random after a fork * random/rndlinux.c (_gcry_rndlinux_gather_random): Detect fork and re-open devices. -- This mitigates about ill-behaving software which has closed the standard fds but later dups them to /dev/null. GnuPG-bug-id: 3491 Signed-off-by: Werner Koch (cherry picked from commit 319f55e6e5793c59f1ba4cfe481b562bca42194d) diff --git a/random/rndlinux.c b/random/rndlinux.c index 1bb7c76..f70bc21 100644 --- a/random/rndlinux.c +++ b/random/rndlinux.c @@ -104,9 +104,10 @@ open_device (const char *name, int retry) /* Note that the caller needs to make sure that this function is only - called by one thread at a time. The function returns 0 on success - or true on failure (in which case the caller will signal a fatal - error). */ + * called by one thread at a time. The function returns 0 on success + * or true on failure (in which case the caller will signal a fatal + * error). This function should be entered only by one thread at a + * time. */ int _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, enum random_origins), @@ -117,6 +118,11 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, static int fd_random = -1; static int only_urandom = -1; static unsigned char ever_opened; + static volatile pid_t my_pid; /* The volatile is there to make sure + * the compiler does not optimize the + * code away in case the getpid + * function is badly attributed. */ + volatile pid_t apid; int fd; int n; byte buffer[768]; @@ -130,13 +136,13 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, * use only urandom. */ if (only_urandom == -1) { + my_pid = getpid (); if ((_gcry_random_read_conf () & RANDOM_CONF_ONLY_URANDOM)) only_urandom = 1; else only_urandom = 0; } - if (!add) { /* Special mode to close the descriptors. */ @@ -153,6 +159,25 @@ _gcry_rndlinux_gather_random (void (*add)(const void*, size_t, return 0; } + /* Detect a fork and close the devices so that we don't use the old + * file descriptors. Note that open_device will be called in retry + * mode if the devices was opened by the parent process. */ + apid = getpid (); + if (my_pid != apid) + { + if (fd_random != -1) + { + close (fd_random); + fd_random = -1; + } + if (fd_urandom != -1) + { + close (fd_urandom); + fd_urandom = -1; + } + my_pid = apid; + } + /* First read from a hardware source. However let it account only for up to 50% (or 25% for RDRAND) of the requested bytes. */ commit 5b1d022293c5779b1150a7653cce4e3bf494a07c Author: Werner Koch Date: Fri Oct 26 12:57:30 2018 +0200 primes: Avoid leaking bits of the prime test to pageable memory. * cipher/primegen.c (gen_prime): Allocate MODS in secure memory. -- This increases the pressure on the secure memory by about 1400 byte but given that we can meanwhile increase the size of the secmem area, this is acceptable. GnuPG-bug-id: 3848 Signed-off-by: Werner Koch (cherry picked from commit 2e2e68ad4874a4678cfbe452b70ae987e0402eca) diff --git a/cipher/primegen.c b/cipher/primegen.c index ce5ad3c..e24de4d 100644 --- a/cipher/primegen.c +++ b/cipher/primegen.c @@ -758,7 +758,8 @@ gen_prime (unsigned int nbits, int secret, int randomlevel, if (nbits < 16) log_fatal ("can't generate a prime with less than %d bits\n", 16); - mods = xmalloc (no_of_small_prime_numbers * sizeof *mods); + mods = (secret? xmalloc_secure (no_of_small_prime_numbers * sizeof *mods) + /* */ : xmalloc (no_of_small_prime_numbers * sizeof *mods)); /* Make nbits fit into gcry_mpi_t implementation. */ val_2 = mpi_alloc_set_ui( 2 ); val_3 = mpi_alloc_set_ui( 3); ----------------------------------------------------------------------- Summary of changes: cipher/primegen.c | 3 ++- random/rndlinux.c | 42 +++++++++++++++++++++++++++++++++--------- 2 files changed, 35 insertions(+), 10 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 14:58:36 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 26 Oct 2018 14:58:36 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-247-gb83fed6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via b83fed64f8051279a8f36e024c1f12f7f13c4716 (commit) via f248416bc9792e80bb0785302058131de49d7639 (commit) from 4249e9a2bf028f007d1ddaac730f636e5c6da20f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b83fed64f8051279a8f36e024c1f12f7f13c4716 Author: Werner Koch Date: Fri Oct 26 14:54:52 2018 +0200 build: By default build wks-tools on all Unix platforms. Signed-off-by: Werner Koch diff --git a/configure.ac b/configure.ac index f0e6966..795daa4 100644 --- a/configure.ac +++ b/configure.ac @@ -129,7 +129,10 @@ GNUPG_BUILD_PROGRAM(symcryptrun, no) # We use gpgtar to unpack test data, hence we always build it. If the # user opts out, we simply don't install it. GNUPG_BUILD_PROGRAM(gpgtar, yes) -GNUPG_BUILD_PROGRAM(wks-tools, no) +# We also install the gpg-wks-server tool by default but disable it +# later for platforms where it can't be build. +GNUPG_BUILD_PROGRAM(wks-tools, yes) + AC_SUBST(PACKAGE) AC_SUBST(PACKAGE_GT) @@ -681,6 +684,7 @@ case "${host}" in try_gettext="no" use_simple_gettext=yes mmap_needed=no + build_wks_tools=no ;; i?86-emx-os2 | i?86-*-os2*emx ) # OS/2 with the EMX environment @@ -688,6 +692,7 @@ case "${host}" in AC_DEFINE(HAVE_DRIVE_LETTERS) have_dosish_system=yes try_gettext="no" + build_wks_tools=no ;; i?86-*-msdosdjgpp*) @@ -696,6 +701,7 @@ case "${host}" in AC_DEFINE(HAVE_DRIVE_LETTERS) have_dosish_system=yes try_gettext="no" + build_wks_tools=no ;; *-*-hpux*) @@ -726,6 +732,7 @@ case "${host}" in # Android is fully utf-8 and we do not want to use iconv to # keeps things simple require_iconv=no + build_wks_tools=no ;; *-apple-darwin*) AC_DEFINE(_DARWIN_C_SOURCE, 900000L, commit f248416bc9792e80bb0785302058131de49d7639 Author: Werner Koch Date: Fri Oct 26 14:44:32 2018 +0200 wkd: Add option --directory to the server. * tools/gpg-wks-server.c (opts): Add '--directory', (main): Explain how to set correct permissions. (command_list_domains): Create an empty policy file and remove the warning for an empty policy file. -- Note that a policy file is meanwhile required and thus is is useful to create it. Signed-off-by: Werner Koch diff --git a/doc/wks.texi b/doc/wks.texi index 51b86ca..bd2b8d5 100644 --- a/doc/wks.texi +++ b/doc/wks.texi @@ -215,9 +215,9 @@ Further it creates missing directories for the configuration and prints warnings pertaining to problems in the configuration. The command @option{--check-key} (or just @option{--check}) checks -whether a key with the given user-id is installed. The process return -success in this case; to also print a diagnostic, use option - at option{-v}. If the key is not installed a diagnostics is printed and +whether a key with the given user-id is installed. The process returns +success in this case; to also print a diagnostic use the option + at option{-v}. If the key is not installed a diagnostic is printed and the process returns failure; to suppress the diagnostic, use option @option{-q}. More than one user-id can be given; see also option @option{with-file}. @@ -243,6 +243,12 @@ The command @option{--revoke-key} is not yet functional. @table @gnupgtabopt + at item -C @var{dir} + at itemx --directory @var{dir} + at opindex directory +Use @var{dir} as top level directory for domains. The default is + at file{/var/lib/gnupg/wks}. + @item --from @var{mailaddr} @opindex from Use @var{mailaddr} as the default sender address. @@ -256,21 +262,22 @@ Add the mail header "@var{name}: @var{value}" to all outgoing mails. Directly send created mails using the @command{sendmail} command. Requires installation of that command. - at item --output @var{file} - at itemx -o + at item -o @var{file} + at itemx --output @var{file} @opindex output Write the created mail also to @var{file}. Note that the value @code{-} for @var{file} would write it to stdout. @item --with-dir @opindex with-dir -Also print the directory name for each domain listed by command - at option{--list-domains}. +When used with the command @option{--list-domains} print for each +installed domain the domain name and its directory name. @item --with-file @opindex with-file -With command @option{--check-key} print for each user-id, the address, -'i' for installed key or 'n' for not installed key, and the filename. +When used with the command @option{--check-key} print for each user-id, +the address, 'i' for installed key or 'n' for not installed key, and +the filename. @item --verbose @opindex verbose @@ -316,7 +323,7 @@ Finally run $ gpg-wks-server --list-domains @end example -to create the required sub-directories with the permission set +to create the required sub-directories with the permissions set correctly. For each domain a submission address needs to be configured. All service mails are directed to that address. It can be the same address for all configured domains, for example: @@ -326,7 +333,7 @@ be the same address for all configured domains, for example: $ echo key-submission@@example.net >submission-address @end example -The protocol requires that the key to be published is sent with an +The protocol requires that the key to be published is send with an encrypted mail to the service. Thus you need to create a key for the submission address: diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c index a588155..24b3312 100644 --- a/tools/gpg-wks-server.c +++ b/tools/gpg-wks-server.c @@ -58,6 +58,7 @@ enum cmd_and_opt_values oQuiet = 'q', oVerbose = 'v', oOutput = 'o', + oDirectory = 'C', oDebug = 500, @@ -108,6 +109,7 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_s_s (oGpgProgram, "gpg", "@"), ARGPARSE_s_n (oSend, "send", "send the mail using sendmail"), ARGPARSE_s_s (oOutput, "output", "|FILE|write the mail to FILE"), + ARGPARSE_s_s (oDirectory, "directory", "|DIR|use DIR as top directory"), ARGPARSE_s_s (oFrom, "from", "|ADDR|use ADDR as the default sender"), ARGPARSE_s_s (oHeader, "header" , "|NAME=VALUE|add \"NAME: VALUE\" as header to all mails"), @@ -225,6 +227,9 @@ parse_arguments (ARGPARSE_ARGS *pargs, ARGPARSE_OPTS *popts) case oGpgProgram: opt.gpg_program = pargs->r.ret_str; break; + case oDirectory: + opt.directory = pargs->r.ret_str; + break; case oFrom: opt.default_from = pargs->r.ret_str; break; @@ -350,6 +355,7 @@ main (int argc, char **argv) { log_error ("directory '%s' has too relaxed permissions\n", opt.directory); + log_info ("Fix by running: chmod o-rw '%s'\n", opt.directory); exit (2); } } @@ -1667,7 +1673,7 @@ command_receive_cb (void *opaque, const char *mediatype, -/* Return a list of all configured domains. ECh list element is the +/* Return a list of all configured domains. Each list element is the * top directory for the domain. To figure out the actual domain * name strrchr(name, '/') can be used. */ static gpg_error_t @@ -1946,7 +1952,17 @@ command_list_domains (void) if (!fp) { err = gpg_error_from_syserror (); - if (gpg_err_code (err) != GPG_ERR_ENOENT) + if (gpg_err_code (err) == GPG_ERR_ENOENT) + { + fp = es_fopen (fname, "w"); + if (!fp) + log_error ("domain %s: can't create policy file: %s\n", + domain, gpg_strerror (err)); + else + es_fclose (fp); + fp = NULL; + } + else log_error ("domain %s: error in policy file: %s\n", domain, gpg_strerror (err)); } @@ -1955,17 +1971,8 @@ command_list_domains (void) struct policy_flags_s policy; err = wks_parse_policy (&policy, fp, 0); es_fclose (fp); - if (!err) - { - struct policy_flags_s empty_policy; - memset (&empty_policy, 0, sizeof empty_policy); - if (!memcmp (&empty_policy, &policy, sizeof policy)) - log_error ("domain %s: empty policy file\n", domain); - } wks_free_policy (&policy); } - - } err = 0; ----------------------------------------------------------------------- Summary of changes: configure.ac | 9 ++++++++- doc/wks.texi | 29 ++++++++++++++++++----------- tools/gpg-wks-server.c | 29 ++++++++++++++++++----------- 3 files changed, 44 insertions(+), 23 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 15:09:41 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 26 Oct 2018 15:09:41 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.10-21-g8a33d5c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-2 has been updated via 8a33d5c9c699d2145d39b362d580df67571c5f36 (commit) via 839426104a0c829f0182b22048fdc51cf295beb7 (commit) from 04604e6cb9999a1f29fcb6acfe2223981fd2cf4b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8a33d5c9c699d2145d39b362d580df67571c5f36 Author: Werner Koch Date: Fri Oct 26 14:54:52 2018 +0200 build: By default build wks-tools on all Unix platforms. Signed-off-by: Werner Koch (cherry picked from commit b83fed64f8051279a8f36e024c1f12f7f13c4716) diff --git a/configure.ac b/configure.ac index 5106bd9..4d66af9 100644 --- a/configure.ac +++ b/configure.ac @@ -129,7 +129,10 @@ GNUPG_BUILD_PROGRAM(symcryptrun, no) # We use gpgtar to unpack test data, hence we always build it. If the # user opts out, we simply don't install it. GNUPG_BUILD_PROGRAM(gpgtar, yes) -GNUPG_BUILD_PROGRAM(wks-tools, no) +# We also install the gpg-wks-server tool by default but disable it +# later for platforms where it can't be build. +GNUPG_BUILD_PROGRAM(wks-tools, yes) + AC_SUBST(PACKAGE) AC_SUBST(PACKAGE_GT) @@ -666,6 +669,7 @@ case "${host}" in try_gettext="no" use_simple_gettext=yes mmap_needed=no + build_wks_tools=no ;; i?86-emx-os2 | i?86-*-os2*emx ) # OS/2 with the EMX environment @@ -673,6 +677,7 @@ case "${host}" in AC_DEFINE(HAVE_DRIVE_LETTERS) have_dosish_system=yes try_gettext="no" + build_wks_tools=no ;; i?86-*-msdosdjgpp*) @@ -681,6 +686,7 @@ case "${host}" in AC_DEFINE(HAVE_DRIVE_LETTERS) have_dosish_system=yes try_gettext="no" + build_wks_tools=no ;; *-*-hpux*) @@ -711,6 +717,7 @@ case "${host}" in # Android is fully utf-8 and we do not want to use iconv to # keeps things simple require_iconv=no + build_wks_tools=no ;; *-apple-darwin*) AC_DEFINE(_DARWIN_C_SOURCE, 900000L, commit 839426104a0c829f0182b22048fdc51cf295beb7 Author: Werner Koch Date: Fri Oct 26 14:44:32 2018 +0200 wkd: Add option --directory to the server. * tools/gpg-wks-server.c (opts): Add '--directory', (main): Explain how to set correct permissions. (command_list_domains): Create an empty policy file and remove the warning for an empty policy file. -- Note that a policy file is meanwhile required and thus is is useful to create it. Signed-off-by: Werner Koch (cherry picked from commit f248416bc9792e80bb0785302058131de49d7639) diff --git a/doc/wks.texi b/doc/wks.texi index 6d62282..b8de296 100644 --- a/doc/wks.texi +++ b/doc/wks.texi @@ -215,9 +215,9 @@ Further it creates missing directories for the configuration and prints warnings pertaining to problems in the configuration. The command @option{--check-key} (or just @option{--check}) checks -whether a key with the given user-id is installed. The process return -success in this case; to also print a diagnostic, use option - at option{-v}. If the key is not installed a diagnostics is printed and +whether a key with the given user-id is installed. The process returns +success in this case; to also print a diagnostic use the option + at option{-v}. If the key is not installed a diagnostic is printed and the process returns failure; to suppress the diagnostic, use option @option{-q}. More than one user-id can be given; see also option @option{with-file}. @@ -243,6 +243,12 @@ The command @option{--revoke-key} is not yet functional. @table @gnupgtabopt + at item -C @var{dir} + at itemx --directory @var{dir} + at opindex directory +Use @var{dir} as top level directory for domains. The default is + at file{/var/lib/gnupg/wks}. + @item --from @var{mailaddr} @opindex from Use @var{mailaddr} as the default sender address. @@ -256,21 +262,22 @@ Add the mail header "@var{name}: @var{value}" to all outgoing mails. Directly send created mails using the @command{sendmail} command. Requires installation of that command. - at item --output @var{file} - at itemx -o + at item -o @var{file} + at itemx --output @var{file} @opindex output Write the created mail also to @var{file}. Note that the value @code{-} for @var{file} would write it to stdout. @item --with-dir @opindex with-dir -Also print the directory name for each domain listed by command - at option{--list-domains}. +When used with the command @option{--list-domains} print for each +installed domain the domain name and its directory name. @item --with-file @opindex with-file -With command @option{--check-key} print for each user-id, the address, -'i' for installed key or 'n' for not installed key, and the filename. +When used with the command @option{--check-key} print for each user-id, +the address, 'i' for installed key or 'n' for not installed key, and +the filename. @item --verbose @opindex verbose @@ -316,7 +323,7 @@ Finally run $ gpg-wks-server --list-domains @end example -to create the required sub-directories with the permission set +to create the required sub-directories with the permissions set correctly. For each domain a submission address needs to be configured. All service mails are directed to that address. It can be the same address for all configured domains, for example: @@ -326,7 +333,7 @@ be the same address for all configured domains, for example: $ echo key-submission@@example.net >submission-address @end example -The protocol requires that the key to be published is sent with an +The protocol requires that the key to be published is send with an encrypted mail to the service. Thus you need to create a key for the submission address: diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c index a588155..24b3312 100644 --- a/tools/gpg-wks-server.c +++ b/tools/gpg-wks-server.c @@ -58,6 +58,7 @@ enum cmd_and_opt_values oQuiet = 'q', oVerbose = 'v', oOutput = 'o', + oDirectory = 'C', oDebug = 500, @@ -108,6 +109,7 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_s_s (oGpgProgram, "gpg", "@"), ARGPARSE_s_n (oSend, "send", "send the mail using sendmail"), ARGPARSE_s_s (oOutput, "output", "|FILE|write the mail to FILE"), + ARGPARSE_s_s (oDirectory, "directory", "|DIR|use DIR as top directory"), ARGPARSE_s_s (oFrom, "from", "|ADDR|use ADDR as the default sender"), ARGPARSE_s_s (oHeader, "header" , "|NAME=VALUE|add \"NAME: VALUE\" as header to all mails"), @@ -225,6 +227,9 @@ parse_arguments (ARGPARSE_ARGS *pargs, ARGPARSE_OPTS *popts) case oGpgProgram: opt.gpg_program = pargs->r.ret_str; break; + case oDirectory: + opt.directory = pargs->r.ret_str; + break; case oFrom: opt.default_from = pargs->r.ret_str; break; @@ -350,6 +355,7 @@ main (int argc, char **argv) { log_error ("directory '%s' has too relaxed permissions\n", opt.directory); + log_info ("Fix by running: chmod o-rw '%s'\n", opt.directory); exit (2); } } @@ -1667,7 +1673,7 @@ command_receive_cb (void *opaque, const char *mediatype, -/* Return a list of all configured domains. ECh list element is the +/* Return a list of all configured domains. Each list element is the * top directory for the domain. To figure out the actual domain * name strrchr(name, '/') can be used. */ static gpg_error_t @@ -1946,7 +1952,17 @@ command_list_domains (void) if (!fp) { err = gpg_error_from_syserror (); - if (gpg_err_code (err) != GPG_ERR_ENOENT) + if (gpg_err_code (err) == GPG_ERR_ENOENT) + { + fp = es_fopen (fname, "w"); + if (!fp) + log_error ("domain %s: can't create policy file: %s\n", + domain, gpg_strerror (err)); + else + es_fclose (fp); + fp = NULL; + } + else log_error ("domain %s: error in policy file: %s\n", domain, gpg_strerror (err)); } @@ -1955,17 +1971,8 @@ command_list_domains (void) struct policy_flags_s policy; err = wks_parse_policy (&policy, fp, 0); es_fclose (fp); - if (!err) - { - struct policy_flags_s empty_policy; - memset (&empty_policy, 0, sizeof empty_policy); - if (!memcmp (&empty_policy, &policy, sizeof policy)) - log_error ("domain %s: empty policy file\n", domain); - } wks_free_policy (&policy); } - - } err = 0; ----------------------------------------------------------------------- Summary of changes: configure.ac | 9 ++++++++- doc/wks.texi | 29 ++++++++++++++++++----------- tools/gpg-wks-server.c | 29 ++++++++++++++++++----------- 3 files changed, 44 insertions(+), 23 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 19:55:14 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 26 Oct 2018 19:55:14 +0200 Subject: [git] GCRYPT - branch, LIBGCRYPT-1.8-BRANCH, updated. libgcrypt-1.8.3-15-gb3f4e39 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1.8-BRANCH has been updated via b3f4e39b2a29af6de0c45dcaa842414da780b204 (commit) via 93775172713c00c363187b5d6a88895b04ac7c8e (commit) from 0973c3f9ee7a9ad7c97b77849ed33ecd6789c787 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b3f4e39b2a29af6de0c45dcaa842414da780b204 Author: Werner Koch Date: Fri Oct 26 19:55:10 2018 +0200 Post release updates -- diff --git a/Makefile.am b/Makefile.am index 452cb96..5b43ca2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ # internal archive and before uploading this to the public server, # manual tests should be run and the git release tagged and pushed. # Adjust as needed. -RELEASE_ARCHIVE_DIR = wk at vigenere:tarballs/libgpg-error/ +RELEASE_ARCHIVE_DIR = wk at vigenere:tarballs/libgcrypt/v1.8/ # The key used to sign the released sources. Adjust as needed. RELEASE_SIGNING_KEY = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 diff --git a/NEWS b/NEWS index a4c5e20..ff42ba2 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +Noteworthy changes in version 1.8.5 (unreleased) [C22/A2/R5] +------------------------------------------------ + + * Bug fixes: + + + Release-info: https://dev.gnupg.org/T + + Noteworthy changes in version 1.8.4 (2018-10-26) [C22/A2/R4] ------------------------------------------------ diff --git a/configure.ac b/configure.ac index ce11162..2d63448 100644 --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,7 @@ min_automake_version="1.14" # for the LT versions. m4_define(mym4_version_major, [1]) m4_define(mym4_version_minor, [8]) -m4_define(mym4_version_micro, [4]) +m4_define(mym4_version_micro, [5]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag @@ -50,13 +50,13 @@ m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) AC_INIT([libgcrypt],[mym4_full_version],[http://bugs.gnupg.org]) -# LT Version numbers, remember to change them just *before* a release. +# LT Version numbers: In this branch we only change the revision. # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) # (Interfaces added: CURRENT++, AGE++, REVISION=0) # (No interfaces changed: REVISION++) LIBGCRYPT_LT_CURRENT=22 LIBGCRYPT_LT_AGE=2 -LIBGCRYPT_LT_REVISION=4 +LIBGCRYPT_LT_REVISION=5 # If the API is changed in an incompatible way: increment the next counter. commit 93775172713c00c363187b5d6a88895b04ac7c8e Author: Werner Koch Date: Fri Oct 26 19:29:46 2018 +0200 Release 1.8.4 Signed-off-by: Werner Koch diff --git a/NEWS b/NEWS index b368d76..a4c5e20 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,25 @@ -Noteworthy changes in version 1.8.4 (unreleased) [C22/A2/R4] +Noteworthy changes in version 1.8.4 (2018-10-26) [C22/A2/R4] ------------------------------------------------ + * Bug fixes: + + - Fix infinite loop due to applications using fork the wrong + way. [#3491] + + - Fix possible leak of a few bits of secret primes to pageable + memory. [#3848] + + - Fix possible hang in the RNG (1.8.3 only). [#4034] + + - Several minor fixes. [#4102,#4208,#4209,#4210,#4211,#4212] + + * Performance: + + - On Linux always make use of getrandom if possible and then use + its /dev/urandom behaviour. [#3894] + + Release-info: https://dev.gnupg.org/T4234 + Noteworthy changes in version 1.8.3 (2018-06-13) [C22/A2/R3] ------------------------------------------------ @@ -20,7 +39,7 @@ Noteworthy changes in version 1.8.3 (2018-06-13) [C22/A2/R3] - Fix rare assertion failure in gcry_prime_check. - Release info at . + Release-info: https://dev.gnupg.org/T4016 Noteworthy changes in version 1.8.2 (2017-12-13) [C22/A2/R2] diff --git a/README b/README index 7ac8e4a..8a3f2aa 100644 --- a/README +++ b/README @@ -26,14 +26,10 @@ The download canonical location for libgcrypt is: - ftp://ftp.gnupg.org/gcrypt/libgcrypt/ - or https://gnupg.org/ftp/gcrypt/libgcrypt/ To build libgcrypt you need libgpg-error: - ftp://ftp.gnupg.org/gcrypt/libgpg-error/ - or https://gnupg.org/ftp/gcrypt/libgpg-error/ You should get the latest versions of course. @@ -193,6 +189,9 @@ Build Problems -------------- + If you have a problem with a a certain release, please first check + the Release-info URL given in the NEWS file. + We can't check all assembler files, so if you have problems assembling them (or the program crashes) use --disable-asm with ./configure. If you opt to delete individual replacement files in ----------------------------------------------------------------------- Summary of changes: Makefile.am | 2 +- NEWS | 32 ++++++++++++++++++++++++++++++-- README | 7 +++---- configure.ac | 6 +++--- 4 files changed, 37 insertions(+), 10 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 19:58:57 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 26 Oct 2018 19:58:57 +0200 Subject: [git] gnupg-doc - branch, master, updated. c730362aea99564e54bfae00a9e39e7ee913dfcc Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GnuPG website and other docs". The branch, master has been updated via c730362aea99564e54bfae00a9e39e7ee913dfcc (commit) from 727c686e2cbf0ca49d9ece2a72e285f7847958c1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c730362aea99564e54bfae00a9e39e7ee913dfcc Author: Werner Koch Date: Fri Oct 26 19:56:54 2018 +0200 swdb: Release libgcrypt 1.8.4 FWIW, the signature of the swdb.lst was the 1000-th signature done with that key. diff --git a/web/swdb.mac b/web/swdb.mac index 064aab3..6477e2b 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -97,11 +97,11 @@ # # LIBGCRYPT # -#+macro: libgcrypt_ver 1.8.3 -#+macro: libgcrypt_date 2018-06-13 -#+macro: libgcrypt_size 2919k -#+macro: libgcrypt_sha1 13bd2ce69e59ab538e959911dfae80ea309636e3 -#+macro: libgcrypt_sha2 66ec90be036747602f2b48f98312361a9180c97c68a690a5f376fa0f67d0af7c +#+macro: libgcrypt_ver 1.8.4 +#+macro: libgcrypt_date 2018-10-26 +#+macro: libgcrypt_size 2920k +#+macro: libgcrypt_sha1 4a8ef9db6922f3a31992aca5640b4198a69b58fc +#+macro: libgcrypt_sha2 f638143a0672628fde0cad745e9b14deb85dffb175709cacc1f4fe24b93f2227 # ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Fri Oct 26 20:05:00 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 26 Oct 2018 20:05:00 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-111-gf1fe145 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via f1fe145a2958ba7a51113d35a83cfc676a920a86 (commit) from 7e662680c170968661ee0105d132813f8281d229 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f1fe145a2958ba7a51113d35a83cfc676a920a86 Author: Werner Koch Date: Fri Oct 26 20:04:44 2018 +0200 Merge release info from 1.8.4 -- diff --git a/Makefile.am b/Makefile.am index 24c362a..7fa4fa4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,7 +21,7 @@ # internal archive and before uploading this to the public server, # manual tests should be run and the git release tagged and pushed. # Adjust as needed. -RELEASE_ARCHIVE_DIR = wk at vigenere:tarballs/libgpg-error/ +RELEASE_ARCHIVE_DIR = wk at vigenere:tarballs/libgcrypt/v1.9 # The key used to sign the released sources. Adjust as needed. RELEASE_SIGNING_KEY = D8692123C4065DEA5E0F3AB5249B39D24F25E3B6 diff --git a/NEWS b/NEWS index a4841b3..aa58fda 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,20 @@ Noteworthy changes in version 1.9.0 (unreleased) [C22/A3/R0] * Bug fixes + - Fix infinite loop due to applications using fork the wrong + way. [#3491][also in 1.8.4] + + - Fix possible leak of a few bits of secret primes to pageable + memory. [#3848][also in 1.8.4] + + - Fix possible hang in the RNG (1.8.3 only). [#4034][also in 1.8.4] + + - Several minor fixes. [#4102,#4208,#4209,#4210,#4211,#4212] + [also in 1.8.4] + + - On Linux always make use of getrandom if possible and then use + its /dev/urandom behaviour. [#3894][also in 1.8.4] + - Use blinding for ECDSA signing to mitigate a novel side-channel attack. [#4011,CVE-2018-0495] [also in 1.8.3, 1.7.10] @@ -36,6 +50,7 @@ Noteworthy changes in version 1.9.0 (unreleased) [C22/A3/R0] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Version 1.8.2 (2017-12-13) Version 1.8.3 (2018-06-13) + Version 1.8.4 (2018-10-26) Noteworthy changes in version 1.8.1 (2017-08-27) [C22/A2/R1] diff --git a/README b/README index 7ac8e4a..92f2f1b 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ Libgcrypt - The GNU Crypto Library ------------------------------------ - Version 1.8 + Version 1.9 Copyright (C) 1989,1991-2018 Free Software Foundation, Inc. Copyright (C) 2012-2018 g10 Code GmbH @@ -193,6 +193,9 @@ Build Problems -------------- + If you have a problem with a a certain release, please first check + the Release-info URL given in the NEWS file. + We can't check all assembler files, so if you have problems assembling them (or the program crashes) use --disable-asm with ./configure. If you opt to delete individual replacement files in ----------------------------------------------------------------------- Summary of changes: Makefile.am | 2 +- NEWS | 15 +++++++++++++++ README | 5 ++++- 3 files changed, 20 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Sat Oct 27 15:16:29 2018 From: cvs at cvs.gnupg.org (by Jussi Kivilinna) Date: Sat, 27 Oct 2018 15:16:29 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-112-g6e669e0 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 6e669e09603e5a98b59dcf35f77f346db6c81eac (commit) from f1fe145a2958ba7a51113d35a83cfc676a920a86 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6e669e09603e5a98b59dcf35f77f346db6c81eac Author: Jussi Kivilinna Date: Sat Oct 27 15:48:29 2018 +0300 Fix missing global initialization in fips_is_operational * src/g10lib.h (_gcry_global_any_init_done): New extern. (fips_is_operational): Check for _gcry_global_any_init_done and call _gcry_global_is_operational. * src/global.c (any_init_done): Rename to ... (_gcry_global_any_init_done): ... this and make externally available. -- Commit b6e6ace324440f564df664e27f8276ef01f76795 "Add fast path for _gcry_fips_is_operational" inadvertently replaced function call to _gcry_global_is_operational with call to _gcry_fips_is_operational in fips_is_operational macro. This can cause libgcrypt to miss initialization. This patch restores _gcry_global_is_operational functionality to fips_is_operational macro while keeping fast-path to reduce call-overhead to gcry_* functions. Signed-off-by: Jussi Kivilinna diff --git a/src/g10lib.h b/src/g10lib.h index d52eef3..c1f84ee 100644 --- a/src/g10lib.h +++ b/src/g10lib.h @@ -102,6 +102,7 @@ /*-- src/global.c -*/ +extern int _gcry_global_any_init_done; int _gcry_global_is_operational (void); gcry_err_code_t _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr); void _gcry_check_heap (const void *a); @@ -466,7 +467,9 @@ int _gcry_fips_is_operational (void); /* Return true if the library is in the operational state. */ #define fips_is_operational() \ - (!fips_mode () || _gcry_fips_is_operational ()) + (!_gcry_global_any_init_done ? \ + _gcry_global_is_operational() : \ + (!fips_mode () || _gcry_global_is_operational ())) #define fips_not_operational() (GPG_ERR_NOT_OPERATIONAL) diff --git a/src/global.c b/src/global.c index 6c2486c..d82c680 100644 --- a/src/global.c +++ b/src/global.c @@ -54,7 +54,7 @@ static unsigned int debug_flags; static int force_fips_mode; /* Controlled by global_init(). */ -static int any_init_done; +int _gcry_global_any_init_done; /* * Functions called before and after blocking syscalls. @@ -91,9 +91,9 @@ global_init (void) { gcry_error_t err = 0; - if (any_init_done) + if (_gcry_global_any_init_done) return; - any_init_done = 1; + _gcry_global_any_init_done = 1; /* Tell the random module that we have seen an init call. */ _gcry_set_preferred_rng_type (0); @@ -161,7 +161,7 @@ global_init (void) int _gcry_global_is_operational (void) { - if (!any_init_done) + if (!_gcry_global_any_init_done) { #ifdef HAVE_SYSLOG syslog (LOG_USER|LOG_WARNING, "Libgcrypt warning: " @@ -570,7 +570,7 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr) break; case GCRYCTL_ANY_INITIALIZATION_P: - if (any_init_done) + if (_gcry_global_any_init_done) rc = GPG_ERR_GENERAL; break; @@ -682,7 +682,7 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr) selftest is triggered. It is not possible to put the libraty into fips mode after having passed the initialization. */ _gcry_set_preferred_rng_type (0); - if (!any_init_done) + if (!_gcry_global_any_init_done) { /* Not yet initialized at all. Set a flag so that we are put into fips mode during initialization. */ @@ -749,7 +749,7 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr) break; case GCRYCTL_SET_ENFORCED_FIPS_FLAG: - if (!any_init_done) + if (!_gcry_global_any_init_done) { /* Not yet initialized at all. Set the enforced fips mode flag */ _gcry_set_preferred_rng_type (0); @@ -773,7 +773,7 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr) { int *ip = va_arg (arg_ptr, int*); if (ip) - *ip = _gcry_get_rng_type (!any_init_done); + *ip = _gcry_get_rng_type (!_gcry_global_any_init_done); } break; @@ -801,7 +801,8 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr) int npers = va_arg (arg_ptr, int); if (va_arg (arg_ptr, void *) || npers < 0) rc = GPG_ERR_INV_ARG; - else if (_gcry_get_rng_type (!any_init_done) != GCRY_RNG_TYPE_FIPS) + else if (_gcry_get_rng_type (!_gcry_global_any_init_done) + != GCRY_RNG_TYPE_FIPS) rc = GPG_ERR_NOT_SUPPORTED; else rc = _gcry_rngdrbg_reinit (flagstr, pers, npers); ----------------------------------------------------------------------- Summary of changes: src/g10lib.h | 5 ++++- src/global.c | 19 ++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Sat Oct 27 21:26:20 2018 From: cvs at cvs.gnupg.org (by Ben Kibbey) Date: Sat, 27 Oct 2018 21:26:20 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-42-gb229ed4 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via b229ed40e2653bd3eabaa6931cd8582280a226d7 (commit) from aec676c9ca2da4feb2970f6ce036179afe778b25 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b229ed40e2653bd3eabaa6931cd8582280a226d7 Author: Ben Kibbey Date: Sat Oct 27 12:22:25 2018 -0700 b64dec: Fix to use custom memory handlers. * src/b64dec.c (_gpgrt_b64dec_finish): Use xfree(). Signed-off-by: Ben Kibbey diff --git a/src/b64dec.c b/src/b64dec.c index 1235406..868d985 100644 --- a/src/b64dec.c +++ b/src/b64dec.c @@ -270,10 +270,10 @@ _gpgrt_b64dec_finish (gpgrt_b64state_t state) err = state->lasterr; else { - free (state->title); + xfree (state->title); err = state->invalid_encoding? GPG_ERR_BAD_DATA : 0; } - free (state); + xfree (state); return err; } ----------------------------------------------------------------------- Summary of changes: src/b64dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 04:13:17 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 29 Oct 2018 04:13:17 +0100 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-43-g93d45f7 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 93d45f7e7e937020c796781705516a4b62e6589a (commit) from b229ed40e2653bd3eabaa6931cd8582280a226d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 93d45f7e7e937020c796781705516a4b62e6589a Author: NIIBE Yutaka Date: Mon Oct 29 12:11:05 2018 +0900 gpgrt-config: Better architecture independent support. * configure.ac: Don't generate gpgrt-config. * src/gpgrt-config: Rename from gpgrt-config.in. (--prefix, --exec-prefix, --libdir): Use --libdir to determine PKG_CONFIG_LIBDIR. * src/Makefile.am (EXTRA_DIST): Remove gpgrt-config.in. * src/gpg-error-config-test.sh: Fix for path to gpgrt-config. * src/gpg-error.m4: Provide --prefix, --exec-prefix, --libdir option from configure. Don't use CC because we have --libdir. Bump version date. * src/gpgrt.m4: Likewise. -- Considering multilib support as well as multiarch support, it is better to provide the information for PKG_CONFIG_LIBDIR by --libdir directly, instead of CC. Difficulty is that configure allows variable reference like: --libdir='${exec_prefix}/i386-linux' So, it should also support --prefix and --exec_prefix options. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 81b72f0..34ea775 100644 --- a/configure.ac +++ b/configure.ac @@ -651,17 +651,6 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests], build_tests=$enableval, build_tests=yes) AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno]) -case "$libdir" in - */*-*-*) - # Looks like it's multiarch, then, - # let the script detect host architecture at runtime - pkg_config_libdir=auto - ;; - *) - pkg_config_libdir=$libdir/pkgconfig - ;; -esac -AC_SUBST(pkg_config_libdir) # # Substitution # @@ -672,7 +661,6 @@ AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd]) AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest]) AC_CONFIG_FILES([src/gpg-error.pc]) AC_CONFIG_FILES([src/gpg-error-config-old:src/gpg-error-config.in], [chmod +x src/gpg-error-config-old]) -AC_CONFIG_FILES([src/gpgrt-config], [chmod +x src/gpgrt-config]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index 6df2d6c..280a673 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -98,7 +98,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \ err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 gpgrt.m4 \ gpg-error.vers gpg-error.def.in \ versioninfo.rc.in gpg-error.w32-manifest.in \ - gpgrt-config.in gpg-error-config-test.sh gpg-error.pc.in \ + gpg-error-config-test.sh gpg-error.pc.in \ $(lock_obj_pub) BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \ diff --git a/src/gpg-error-config-test.sh b/src/gpg-error-config-test.sh index 2d8b94b..7125e10 100755 --- a/src/gpg-error-config-test.sh +++ b/src/gpg-error-config-test.sh @@ -1,5 +1,7 @@ #!/bin/sh +srcdir=${0%/*} + PKG_CONFIG_PATH="." export PKG_CONFIG_PATH @@ -32,54 +34,54 @@ failure () { rm -f gpg-error-config-test.log OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --libs)) -OUTPUT_NEW=$(./gpgrt-config --libs) +OUTPUT_NEW=$($srcdir/gpgrt-config --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --libs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags)) -OUTPUT_NEW=$(./gpgrt-config --cflags) +OUTPUT_NEW=$($srcdir/gpgrt-config --cflags) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags --libs)) -OUTPUT_NEW=$(./gpgrt-config --cflags --libs) +OUTPUT_NEW=$($srcdir/gpgrt-config --cflags --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags --libs if [ "$PKG_CONFIG_CMD" = ./gpg-error-config-old ]; then OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --version)) - OUTPUT_NEW=$(./gpgrt-config --version) + OUTPUT_NEW=$($srcdir/gpgrt-config --version) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --version OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --libs)) - OUTPUT_NEW=$(./gpgrt-config --mt --libs) + OUTPUT_NEW=$($srcdir/gpgrt-config --mt --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --libs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --cflags)) - OUTPUT_NEW=$(./gpgrt-config --mt --cflags) + OUTPUT_NEW=$($srcdir/gpgrt-config --mt --cflags) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --cflags OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --cflags --libs)) - OUTPUT_NEW=$(./gpgrt-config --cflags --libs) + OUTPUT_NEW=$($srcdir/gpgrt-config --cflags --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags --libs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --mt --cflags --libs)) - OUTPUT_NEW=$(./gpgrt-config --mt --cflags --libs) + OUTPUT_NEW=$($srcdir/gpgrt-config --mt --cflags --libs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --cflags --libs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=mtcflags)) - OUTPUT_NEW=$(./gpgrt-config --variable=mtcflags) + OUTPUT_NEW=$($srcdir/gpgrt-config --variable=mtcflags) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=mtcflags OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=mtlibs)) - OUTPUT_NEW=$(./gpgrt-config --variable=mtlibs) + OUTPUT_NEW=$($srcdir/gpgrt-config --variable=mtlibs) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=mtlibs OUTPUT_OLD=$(echo $($PKG_CONFIG_CMD --variable=host)) - OUTPUT_NEW=$(./gpgrt-config --variable=host) + OUTPUT_NEW=$($srcdir/gpgrt-config --variable=host) [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --variable=host fi if [ -n "$test_failed" ]; then OUTPUT_OLD=$($PKG_CONFIG_CMD --version) - OUTPUT_NEW=$(./gpgrt-config --version) + OUTPUT_NEW=$($srcdir/gpgrt-config --version) failure --version exit 99 diff --git a/src/gpg-error.m4 b/src/gpg-error.m4 index 70dc501..0964a26 100644 --- a/src/gpg-error.m4 +++ b/src/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-26 +# Last-changed: 2018-10-29 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -67,13 +67,16 @@ AC_DEFUN([AM_PATH_GPG_ERROR], use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + fi fi else - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` fi if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ @@ -96,30 +99,33 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test -z "$GPGRT_CONFIG"; then if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + fi fi fi fi AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` if test -z "$use_gpgrt_config"; then - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` else - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` else - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then diff --git a/src/gpgrt-config.in b/src/gpgrt-config old mode 100644 new mode 100755 similarity index 88% rename from src/gpgrt-config.in rename to src/gpgrt-config index 9df01b7..1524677 --- a/src/gpgrt-config.in +++ b/src/gpgrt-config @@ -10,52 +10,6 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # SPDX-License-Identifier: FSFULLR -prefix=@prefix@ -exec_prefix=@exec_prefix@ -pkg_config_libdir=@pkg_config_libdir@ -if [ x"${PKG_CONFIG_LIBDIR+set}" = x ]; then - # If PKG_CONFIG_LIBDIR is not specified, detect the directory. - - # We supports standard cross build with $CC - triplet="" - case "$CC" in - *-*-*) triplet=${CC%-*} ;; - *) ;; - esac - if [ "$pkg_config_libdir" = auto ]; then - # It's multiarch environment. - # It may be standard cross build, native multiarch build, or - # multiarch-cross build - multiarch="" - if [ -n "$triplet" ]; then - triplet1=$triplet - else - triplet1=$(gcc -dumpmachine) - fi - # Follow existing practice for multiarch name - if expr $triplet1 : "^i[4567]86-" >/dev/null; then - multiarch="i386-${triplet1#*-}" - else - multiarch=$triplet1 - fi - if [ -n "$triplet" ]; then - PKG_CONFIG_LIBDIR="@exec_prefix@/$triplet/lib/pkgconfig:@exec_prefix@/lib/$multiarch/pkgconfig" - else - PKG_CONFIG_LIBDIR="@exec_prefix@/lib/$multiarch/pkgconfig" - fi - unset multiarch triplet1 - elif [ -n "$triplet" ]; then - # It's cross build - PKG_CONFIG_LIBDIR="@exec_prefix@/$triplet/lib/pkgconfig" - else - # Native build in standard (non-multiarch) environment - PKG_CONFIG_LIBDIR="$pkg_config_libdir" - fi - unset triplet -fi -PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$PKG_CONFIG_LIBDIR" -# - #### start of functions for this script # @@ -460,19 +414,10 @@ sysroot () { echo "$_result" } -#### end of functions for this script - -myname=${0##*/} -if [ $myname = gpgrt-config ]; then - default_module="gpg-error" -else - default_module=${myname%-config} -fi - -usage() -{ +# Show usage +usage () { cat <&2 + echo "When LIBDIR has variable references for prefix and/or exec_prefix," 1>&2 + echo "you should provide --prefix=PREFIX option and/or" 1>&2 + echo "--exec-prefix=EXEC_PREFIX option, too" 1>&2 + exit 1 +fi + +PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$PKG_CONFIG_LIBDIR" +# if test $# -eq 0; then usage 1 1>&2 fi +# Second stage to do the main functionality + module_list="" want_var="" want_attr="" diff --git a/src/gpgrt.m4 b/src/gpgrt.m4 index fab1eb4..7f92a22 100644 --- a/src/gpgrt.m4 +++ b/src/gpgrt.m4 @@ -10,7 +10,7 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # SPDX-License-Identifier: FSFULLR # -# Last-changed: 2018-10-25 +# Last-changed: 2018-10-29 # Note: This is a kind of duplicate of gpg-error.m4 with uses the # future name of libgpg-error to prepare for a smooth migration in # some distant time. @@ -70,6 +70,9 @@ AC_DEFUN([AM_PATH_GPGRT], fi AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + fi min_gpgrt_version=ifelse([$1], ,1.33,$1) AC_MSG_CHECKING(for GPG Runtime - version >= $min_gpgrt_version) ok=no @@ -79,7 +82,7 @@ AC_DEFUN([AM_PATH_GPGRT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpgrt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpgrt_config_version=`CC=$CC $GPGRT_CONFIG --version` + gpgrt_config_version=`$GPGRT_CONFIG --version` major=`echo $gpgrt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpgrt_config_version | \ @@ -95,15 +98,15 @@ AC_DEFUN([AM_PATH_GPGRT], fi fi if test $ok = yes; then - GPGRT_CFLAGS=`CC=$CC $GPGRT_CONFIG --cflags` - GPGRT_LIBS=`CC=$CC $GPGRT_CONFIG --libs` - GPGRT_MT_CFLAGS=`CC=$CC $GPGRT_CONFIG --variable=mtcflags 2>/dev/null` + GPGRT_CFLAGS=`$GPGRT_CONFIG --cflags` + GPGRT_LIBS=`$GPGRT_CONFIG --libs` + GPGRT_MT_CFLAGS=`$GPGRT_CONFIG --variable=mtcflags 2>/dev/null` GPGRT_MT_CFLAGS="$GPGRT_CFLAGS${GPGRT_CFLAGS:+ }$GPGRT_MT_CFLAGS" - GPGRT_MT_LIBS=`CC=$CC $GPGRT_CONFIG --variable=mtlibs 2>/dev/null` + GPGRT_MT_LIBS=`$GPGRT_CONFIG --variable=mtlibs 2>/dev/null` GPGRT_MT_LIBS="$GPGRT_LIBS${GPGRT_LIBS:+ }$GPGRT_MT_LIBS" AC_MSG_RESULT([yes ($gpgrt_config_version)]) ifelse([$2], , :, [$2]) - gpgrt_config_host=`CC=$CC $GPGRT_CONFIG --variable=host 2>/dev/null || echo none` + gpgrt_config_host=`$GPGRT_CONFIG --variable=host 2>/dev/null || echo none` if test x"$gpgrt_config_host" != xnone ; then if test x"$gpgrt_config_host" != x"$host" ; then AC_MSG_WARN([[ ----------------------------------------------------------------------- Summary of changes: configure.ac | 12 ---- src/Makefile.am | 2 +- src/gpg-error-config-test.sh | 26 +++---- src/gpg-error.m4 | 38 +++++----- src/{gpgrt-config.in => gpgrt-config} | 131 +++++++++++++++++++--------------- src/gpgrt.m4 | 17 +++-- 6 files changed, 120 insertions(+), 106 deletions(-) rename src/{gpgrt-config.in => gpgrt-config} (88%) mode change 100644 => 100755 hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 04:42:45 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 29 Oct 2018 04:42:45 +0100 Subject: [git] Assuan - branch, master, updated. libassuan-2.5.1-21-ge916b1e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via e916b1ece87dee254ea7899b01cd5d2c2ff58021 (commit) from 882cbafa9444060524ff132d403a76d61f4273a6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e916b1ece87dee254ea7899b01cd5d2c2ff58021 Author: NIIBE Yutaka Date: Mon Oct 29 12:14:47 2018 +0900 build: Update gpg-error.m4 and libassuan.m4. * m4/gpg-error.m4: Update to 2018-10-26. * src/libassuan.m4: Follow the change of gpgrt-config. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 70dc501..0964a26 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-26 +# Last-changed: 2018-10-29 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -67,13 +67,16 @@ AC_DEFUN([AM_PATH_GPG_ERROR], use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + fi fi else - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` fi if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ @@ -96,30 +99,33 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test -z "$GPGRT_CONFIG"; then if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + fi fi fi fi AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` if test -z "$use_gpgrt_config"; then - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` else - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` else - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then diff --git a/src/libassuan.m4 b/src/libassuan.m4 index 57adbfc..52058ea 100644 --- a/src/libassuan.m4 +++ b/src/libassuan.m4 @@ -28,7 +28,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], use_gpgrt_config="" if test x"${LIBASSUAN_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG libassuan >/dev/null 2>&1; then + if $GPGRT_CONFIG libassuan --exists; then LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan" use_gpgrt_config=yes fi @@ -57,9 +57,9 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test -z "$use_gpgrt_config"; then - libassuan_config_version=`CC=$CC $LIBASSUAN_CONFIG --version` + libassuan_config_version=`$LIBASSUAN_CONFIG --version` else - libassuan_config_version=`CC=$CC $LIBASSUAN_CONFIG --modversion` + libassuan_config_version=`$LIBASSUAN_CONFIG --modversion` fi major=`echo $libassuan_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` @@ -94,9 +94,9 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], if test $ok = yes; then if test "$req_libassuan_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then - tmp=`CC=$CC $LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` else - tmp=`CC=$CC $LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0` + tmp=`$LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBASSUAN API version]) @@ -113,9 +113,9 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], if test $ok = yes; then if test x"$host" != x ; then if test -z "$use_gpgrt_config"; then - libassuan_config_host=`CC=$CC $LIBASSUAN_CONFIG --host 2>/dev/null || echo none` + libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none` else - libassuan_config_host=`CC=$CC $LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none` + libassuan_config_host=`$LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$libassuan_config_host" != xnone ; then if test x"$libassuan_config_host" != x"$host" ; then @@ -157,8 +157,8 @@ dnl AC_DEFUN([AM_PATH_LIBASSUAN], [ _AM_PATH_LIBASSUAN_COMMON($1) if test $ok = yes; then - LIBASSUAN_CFLAGS=`CC=$CC $LIBASSUAN_CONFIG --cflags` - LIBASSUAN_LIBS=`CC=$CC $LIBASSUAN_CONFIG --libs` + LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG --cflags` + LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG --libs` ifelse([$2], , :, [$2]) else LIBASSUAN_CFLAGS="" ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 38 ++++++++++++++++++++++---------------- src/libassuan.m4 | 18 +++++++++--------- 2 files changed, 31 insertions(+), 25 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 04:51:49 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 29 Oct 2018 04:51:49 +0100 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-113-g4a4d4a2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 4a4d4a284ca996df874e2534f8529c1611289943 (commit) from 6e669e09603e5a98b59dcf35f77f346db6c81eac (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4a4d4a284ca996df874e2534f8529c1611289943 Author: NIIBE Yutaka Date: Mon Oct 29 12:51:19 2018 +0900 build: Update gpg-error.m4 and ksba.m4. * m4/gpg-error.m4: Update to 2018-10-29. * src/libgrypt.m4: Follow the change of gpgrt-config. Bump the version date. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 70dc501..0964a26 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-26 +# Last-changed: 2018-10-29 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -67,13 +67,16 @@ AC_DEFUN([AM_PATH_GPG_ERROR], use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + fi fi else - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` fi if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ @@ -96,30 +99,33 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test -z "$GPGRT_CONFIG"; then if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + fi fi fi fi AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` if test -z "$use_gpgrt_config"; then - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` else - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` else - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 index 5c3f6e1..2646e96 100644 --- a/src/libgcrypt.m4 +++ b/src/libgcrypt.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-26 +# Last-changed: 2018-10-29 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, @@ -54,7 +54,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], use_gpgrt_config="" if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG libgcrypt >/dev/null 2>&1; then + if $GPGRT_CONFIG libgcrypt --exists; then LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" use_gpgrt_config=yes fi @@ -82,9 +82,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test -z "$use_gpgrt_config"; then - libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --version` + libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` else - libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --modversion` + libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` fi major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` @@ -118,9 +118,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then - tmp=`CC=$CC $LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` else - tmp=`CC=$CC $LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` + tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) @@ -134,13 +134,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi if test $ok = yes; then - LIBGCRYPT_CFLAGS=`CC=$CC $LIBGCRYPT_CONFIG --cflags` - LIBGCRYPT_LIBS=`CC=$CC $LIBGCRYPT_CONFIG --libs` + LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` + LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` else - libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 38 ++++++++++++++++++++++---------------- src/libgcrypt.m4 | 20 ++++++++++---------- 2 files changed, 32 insertions(+), 26 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 04:52:01 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 29 Oct 2018 04:52:01 +0100 Subject: [git] KSBA - branch, master, updated. libksba-1.3.5-30-g9917a23 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "KSBA is a library to access X.509 certificates and CMS data.". The branch, master has been updated via 9917a23a6c8177f79bdd8da031d3b7135b597c91 (commit) from 825a4a9e93655b136dd2eee685e0e67aca912a01 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9917a23a6c8177f79bdd8da031d3b7135b597c91 Author: NIIBE Yutaka Date: Mon Oct 29 12:49:25 2018 +0900 build: Update gpg-error.m4 and ksba.m4. * m4/gpg-error.m4: Update to 2018-10-29. * src/ksba.m4: Follow the change of gpgrt-config. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 70dc501..0964a26 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-26 +# Last-changed: 2018-10-29 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -67,13 +67,16 @@ AC_DEFUN([AM_PATH_GPG_ERROR], use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + fi fi else - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` fi if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ @@ -96,30 +99,33 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test -z "$GPGRT_CONFIG"; then if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + fi fi fi fi AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` if test -z "$use_gpgrt_config"; then - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` else - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` else - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then diff --git a/src/ksba.m4 b/src/ksba.m4 index 22f8cf9..ee4b962 100644 --- a/src/ksba.m4 +++ b/src/ksba.m4 @@ -44,7 +44,7 @@ AC_DEFUN([AM_PATH_KSBA], use_gpgrt_config="" if test x"$KSBA_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG ksba >/dev/null 2>&1; then + if $GPGRT_CONFIG ksba --exists; then KSBA_CONFIG="$GPGRT_CONFIG ksba" use_gpgrt_config=yes fi @@ -72,9 +72,9 @@ AC_DEFUN([AM_PATH_KSBA], req_micro=`echo $min_ksba_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test -z "$use_gpgrt_config"; then - ksba_config_version=`CC=$CC $KSBA_CONFIG --version` + ksba_config_version=`$KSBA_CONFIG --version` else - ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion` + ksba_config_version=`$KSBA_CONFIG --modversion` fi major=`echo $ksba_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` @@ -108,9 +108,9 @@ AC_DEFUN([AM_PATH_KSBA], # API is compatible. if test "$req_ksba_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then - tmp=`CC=$CC $KSBA_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0` else - tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` + tmp=`$KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([KSBA API version]) @@ -124,13 +124,13 @@ AC_DEFUN([AM_PATH_KSBA], fi fi if test $ok = yes; then - KSBA_CFLAGS=`CC=$CC $KSBA_CONFIG --cflags` - KSBA_LIBS=`CC=$CC $KSBA_CONFIG --libs` + KSBA_CFLAGS=`$KSBA_CONFIG --cflags` + KSBA_LIBS=`$KSBA_CONFIG --libs` ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - libksba_config_host=`CC=$CC $KSBA_CONFIG --host 2>/dev/null || echo none` + libksba_config_host=`$KSBA_CONFIG --host 2>/dev/null || echo none` else - libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none` + libksba_config_host=`$KSBA_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$libksba_config_host" != xnone ; then if test x"$libksba_config_host" != x"$host" ; then ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 38 ++++++++++++++++++++++---------------- src/ksba.m4 | 18 +++++++++--------- 2 files changed, 31 insertions(+), 25 deletions(-) hooks/post-receive -- KSBA is a library to access X.509 certificates and CMS data. http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 04:53:34 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 29 Oct 2018 04:53:34 +0100 Subject: [git] NTBTLS - branch, master, updated. ntbtls-0.1.2-15-g6b4fb70 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Not Too Bad TLS". The branch, master has been updated via 6b4fb70b94c70ca071ae2ea20c6d25dffff06664 (commit) from 3bd7643ceb11630d4e483ff60016d794c73faea9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6b4fb70b94c70ca071ae2ea20c6d25dffff06664 Author: NIIBE Yutaka Date: Mon Oct 29 12:52:36 2018 +0900 build: Update *.m4 files. * m4/gpg-error.m4: Update to 2018-10-29. * m4/ksba.m4: Ditto. * m4/libgcrypt.m4: Ditto. * src/ntbtls.m4: Follow the change of gpgrt-config. Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 70dc501..0964a26 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-26 +# Last-changed: 2018-10-29 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -67,13 +67,16 @@ AC_DEFUN([AM_PATH_GPG_ERROR], use_gpgrt_config="" if test "$GPG_ERROR_CONFIG" = "no"; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - if CC=$CC $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --modversion` + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + fi fi else - gpg_error_config_version=`CC=$CC $GPG_ERROR_CONFIG --version` + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` fi if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ @@ -96,30 +99,33 @@ AC_DEFUN([AM_PATH_GPG_ERROR], if test -z "$GPGRT_CONFIG"; then if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) - GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" - use_gpgrt_config=yes + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + fi fi fi fi AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then - GPG_ERROR_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --cflags` - GPG_ERROR_LIBS=`CC=$CC $GPG_ERROR_CONFIG --libs` + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` if test -z "$use_gpgrt_config"; then - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` else - GPG_ERROR_MT_CFLAGS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" - GPG_ERROR_MT_LIBS=`CC=$CC $GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` else - gpg_error_config_host=`CC=$CC $GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then diff --git a/m4/ksba.m4 b/m4/ksba.m4 index 22f8cf9..ee4b962 100644 --- a/m4/ksba.m4 +++ b/m4/ksba.m4 @@ -44,7 +44,7 @@ AC_DEFUN([AM_PATH_KSBA], use_gpgrt_config="" if test x"$KSBA_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG ksba >/dev/null 2>&1; then + if $GPGRT_CONFIG ksba --exists; then KSBA_CONFIG="$GPGRT_CONFIG ksba" use_gpgrt_config=yes fi @@ -72,9 +72,9 @@ AC_DEFUN([AM_PATH_KSBA], req_micro=`echo $min_ksba_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test -z "$use_gpgrt_config"; then - ksba_config_version=`CC=$CC $KSBA_CONFIG --version` + ksba_config_version=`$KSBA_CONFIG --version` else - ksba_config_version=`CC=$CC $KSBA_CONFIG --modversion` + ksba_config_version=`$KSBA_CONFIG --modversion` fi major=`echo $ksba_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` @@ -108,9 +108,9 @@ AC_DEFUN([AM_PATH_KSBA], # API is compatible. if test "$req_ksba_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then - tmp=`CC=$CC $KSBA_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0` else - tmp=`CC=$CC $KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` + tmp=`$KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([KSBA API version]) @@ -124,13 +124,13 @@ AC_DEFUN([AM_PATH_KSBA], fi fi if test $ok = yes; then - KSBA_CFLAGS=`CC=$CC $KSBA_CONFIG --cflags` - KSBA_LIBS=`CC=$CC $KSBA_CONFIG --libs` + KSBA_CFLAGS=`$KSBA_CONFIG --cflags` + KSBA_LIBS=`$KSBA_CONFIG --libs` ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - libksba_config_host=`CC=$CC $KSBA_CONFIG --host 2>/dev/null || echo none` + libksba_config_host=`$KSBA_CONFIG --host 2>/dev/null || echo none` else - libksba_config_host=`CC=$CC $KSBA_CONFIG --variable=host 2>/dev/null || echo none` + libksba_config_host=`$KSBA_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$libksba_config_host" != xnone ; then if test x"$libksba_config_host" != x"$host" ; then diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4 index 5c3f6e1..2646e96 100644 --- a/m4/libgcrypt.m4 +++ b/m4/libgcrypt.m4 @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2018-10-26 +# Last-changed: 2018-10-29 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, @@ -54,7 +54,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], use_gpgrt_config="" if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG libgcrypt >/dev/null 2>&1; then + if $GPGRT_CONFIG libgcrypt --exists; then LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" use_gpgrt_config=yes fi @@ -82,9 +82,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test -z "$use_gpgrt_config"; then - libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --version` + libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` else - libgcrypt_config_version=`CC=$CC $LIBGCRYPT_CONFIG --modversion` + libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` fi major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` @@ -118,9 +118,9 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then - tmp=`CC=$CC $LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` else - tmp=`CC=$CC $LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` + tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) @@ -134,13 +134,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi if test $ok = yes; then - LIBGCRYPT_CFLAGS=`CC=$CC $LIBGCRYPT_CONFIG --cflags` - LIBGCRYPT_LIBS=`CC=$CC $LIBGCRYPT_CONFIG --libs` + LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` + LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` else - libgcrypt_config_host=`CC=$CC $LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then diff --git a/src/ntbtls.m4 b/src/ntbtls.m4 index 665ae00..c4e07dc 100644 --- a/src/ntbtls.m4 +++ b/src/ntbtls.m4 @@ -48,7 +48,7 @@ AC_DEFUN([AM_PATH_NTBTLS], use_gpgrt_config="" if test x"${NTBTLS_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then - if CC=$CC $GPGRT_CONFIG ntbtls >/dev/null 2>&1; then + if $GPGRT_CONFIG ntbtls --exists; then NTBTLS_CONFIG="$GPGRT_CONFIG ntbtls" use_gpgrt_config=yes fi @@ -76,9 +76,9 @@ AC_DEFUN([AM_PATH_NTBTLS], req_micro=`echo $min_ntbtls_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test -z "$use_gpgrt_config"; then - ntbtls_config_version=`CC=$CC $NTBTLS_CONFIG --version` + ntbtls_config_version=`$NTBTLS_CONFIG --version` else - ntbtls_config_version=`CC=$CC $NTBTLS_CONFIG --modversion` + ntbtls_config_version=`$NTBTLS_CONFIG --modversion` fi major=`echo $ntbtls_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` @@ -112,9 +112,9 @@ AC_DEFUN([AM_PATH_NTBTLS], # API is compatible if test "$req_ntbtls_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then - tmp=`CC=$CC $NTBTLS_CONFIG --api-version 2>/dev/null || echo 0` + tmp=`$NTBTLS_CONFIG --api-version 2>/dev/null || echo 0` else - tmp=`CC=$CC $NTBTLS_CONFIG --variable=api_version 2>/dev/null || echo 0` + tmp=`$NTBTLS_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([NTBTLS API version]) @@ -128,13 +128,13 @@ AC_DEFUN([AM_PATH_NTBTLS], fi fi if test $ok = yes; then - NTBTLS_CFLAGS=`CC=$CC $NTBTLS_CONFIG --cflags` - NTBTLS_LIBS=`CC=$CC $NTBTLS_CONFIG --libs` + NTBTLS_CFLAGS=`$NTBTLS_CONFIG --cflags` + NTBTLS_LIBS=`$NTBTLS_CONFIG --libs` ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then - ntbtls_config_host=`CC=$CC $NTBTLS_CONFIG --host 2>/dev/null || echo none` + ntbtls_config_host=`$NTBTLS_CONFIG --host 2>/dev/null || echo none` else - ntbtls_config_host=`CC=$CC $NTBTLS_CONFIG --variable=host 2>/dev/null || echo none` + ntbtls_config_host=`$NTBTLS_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$ntbtls_config_host" != xnone ; then if test x"$ntbtls_config_host" != x"$host" ; then ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 38 ++++++++++++++++++++++---------------- m4/ksba.m4 | 18 +++++++++--------- m4/libgcrypt.m4 | 20 ++++++++++---------- src/ntbtls.m4 | 18 +++++++++--------- 4 files changed, 50 insertions(+), 44 deletions(-) hooks/post-receive -- Not Too Bad TLS http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 09:26:54 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 29 Oct 2018 09:26:54 +0100 Subject: [git] GpgOL - branch, STABLE-BRANCH-2-3, updated. gpgol-2.3.1-15-g1bf9ef1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, STABLE-BRANCH-2-3 has been updated via 1bf9ef1312911a92084515057d26878bbff5bbea (commit) via bf4ab9a6d16869aa6083b10b54a77fc9b8b95b41 (commit) via b4c45c3a3ec98b900bcd785ea9261e33f5562e08 (commit) via 326f0abbbaf1b1d59e0fc72730923b40cfa3bf09 (commit) via 2fbb76c2d31813399203882eca98866566363815 (commit) via c321d3c3394bd04cb1f12be288f6e5cacb3fba32 (commit) via ba8e0516d784a366d676350ae9e87fed41d89224 (commit) via 56ea58e405b57dcc46f6e8a02dd8dca5a619ef31 (commit) via 0ab051af6406cb877200f651ca23ebf1ead6482a (commit) via ffeeda76a797633952370cc3c10548229042536f (commit) via a9f1c04e2933ca8f3dbdfda546bc191383f6d5a3 (commit) via 2aa65cb3d86d0e8eee79db1ec72447707cd4a2f2 (commit) via 1f378c00bda53cec3057ef27684b671293cc21ac (commit) via 50e65b8425e2dece5dc791269bc564168bf819e1 (commit) via 236541264560b59311613c70e7dc01bde537c70a (commit) via 3278db48c5422265ce937f03272bd026eeab8df9 (commit) via 586af18a0d8e7cb4dc43cf6478a0969db0cc7022 (commit) via ab957f55aeb693f2bf4a22a81f4d81b30c16c76b (commit) via 3b8b39ad12b321c4e609916f60e5f05f741a269c (commit) via b3c87431ea24946657956ae710440852da727582 (commit) via f34cd2782bc0cd6f359c14de4d4a889ec4e49a6e (commit) via 14f7aea2d6bf4e2b463a0f8440deb7f92576a286 (commit) via 94c0354fb1f31782fcf7ddb2ee26f8ab1bddd036 (commit) via 55e93a84061b0c35f360e9e1ab78070777798526 (commit) via ca19968b22e6659d7bff26bbca5b5d1c6ebb4571 (commit) via cee0d5aa843aa6b2ed1a6c2635b698d8c9102b8a (commit) via 26c4c8de6730a05c466d760edebe66c48af5aa10 (commit) via b34d4a3fa04502f093f89172b8802ec497161d31 (commit) via 1b37aa01cc67d942de06c882fd9d30d39866b111 (commit) via 005910cd90a86271c77816604ab4a1b8c88fc1fb (commit) via f00d5ecf8f538898cdfc5605d0f3e3a31282eb5f (commit) via 59f6687b60e07a2ac01757d079887d81e6630c2d (commit) via 6bdca98e1f645ca245fbe07254edff3dc6f5d4c5 (commit) via 385ef5768e47903d5e15a4b711a82b6d2c7ec715 (commit) via ce85a6ea230d742f6032bf23fab511e89c9b82fb (commit) via 04b0965b212221c2bcbc6edf00971721caa9df60 (commit) via d04de205a89ef617b31c45f6cf144393f6e9ee36 (commit) via 8c61617886882ce720b884aca9d6fc3e2e1128c4 (commit) via cf47f74df6534d340e7334227168c919596c542d (commit) via 9ccdc0cdc02583ba486535a24660cb94d5c5946f (commit) via 991ee4da98d431f3b5d1a59f9c9419f539931188 (commit) via 9bb552a9ede0c4a089961bcdf81d200145e731f1 (commit) via c7a4f879bd392aac2f471358a2af4b8d3105c76b (commit) via 68191e53049bf88aab4dbbab5427b5d0c90ead05 (commit) via d87848059727587be1f660283e0aeb3be16cc382 (commit) via 1182155ba3d186bb4437fef82693ab501277be39 (commit) via 2ccbfc0ace9f50c788d1e630215a5148aef8b9f5 (commit) via b18f00540c1a78d7700f8cf8d48dbfbff3c1b83f (commit) via 13e84a8f612a793f19155779e4cdfc71c7a70d78 (commit) via c186f2832294737ada9de6d23e466c106537676f (commit) via 8785d7e7777d749413432a5d294e4f3cc9588fa4 (commit) via a20d413e04778f529f885d0ebe7adf7d7077d436 (commit) via 08a048b168bf5cd92c7caf34553da2a7623bfdf0 (commit) via 3078e5a0cd8df98a0bd01882044c121936cf95d5 (commit) via 701652e9dd629e48d8c371594a01bb1ad6633c38 (commit) via c12a5e1ce493d7a15b7b8a092d96be52822bbe1e (commit) via df9b3ca85d7f9702f268cef46c276a89b6e14e4f (commit) via c715ef5d048868786cd9a32018c58aa8225ba6e0 (commit) via 546cdcec1a3506ae0bdddb09dc7dd1492c094c4d (commit) via 38f9d070bf8e32cff85c85657e9c0c86fbb66e85 (commit) via 38584f4c288307fee7b97875fbc9ce1ec72708b8 (commit) via 7b8bfd88f2f333775c22838b90fa76809ad1372b (commit) via b1199e9388f57044b60b1697e57ca3e267dd90c8 (commit) via e6e52c45b0d51becc2428d0b076ba3de20fce79a (commit) via ead5bddb0eb91eaa61be7b03e72f5293eb524134 (commit) via 693f0ac1fbd02fdc920220e4ca5154045385d23f (commit) via 6c00dcbdd98f164c266e47f90c1917b86db7e6b1 (commit) via b4a65a8eda8fabd73bc2cf7db2d7084194089125 (commit) via 19f8d131b3bb48eb60a4a6d6c01ac5c4c97e35ab (commit) via 98439ec3551084153e52b25f069d7170d1db5e6f (commit) via da75bcaa1fc935aa4a770b41e36ce2ce7a218db3 (commit) via 296a4d74725cab076ba714564754148fa783da0f (commit) via 177b72b8c33a2459e20695e01492573211c150f8 (commit) via 5156d7b1da1fd9463e9442f5e913b6b24c0a7b69 (commit) via 635ff920f8c22087d27b62f8a597fe36e9925ff8 (commit) via 9e42f7008b4d089546070cc4de4a461fb96e8e97 (commit) via cb7ce6e0a1496449c5ed157ad93dff8f78e1bd5f (commit) via 4bc8476bd340a1c43052b4a3285a1dde582c0296 (commit) via a0671ccbb477e31d25547532004fa6fd16a29f78 (commit) via 50c514d6bd6026076f5f467b7d8523dff2ce97aa (commit) via 1cefdea05092b68a3db0c6eaa32341c3123f9f37 (commit) via 8fb3524262283c77a91f7e6c615d97f426455332 (commit) via 3c0a66e402e84c0f8c5db4d2219eb8da6e5c0cac (commit) via 4384758e839e816033c07e78bbec1842af076793 (commit) via 062279e5e69ef00d61aac6fddc9fb9ccf1201d9d (commit) via 7ebcc2dc0925864d352935ebe642a8b675cca018 (commit) via abe308f5ce366fc0f9e2e5545676728ac7818085 (commit) via 3b770f928eb17fd876a00e85e7b384d566de2175 (commit) via a507d8bdfb9e31814abf21ad5a9915abd66c96c1 (commit) via 164d89131534bf28ceb0f554bf50d1672445d33f (commit) via 7b5d671c020b32f3d147bcac3585448ea2e65bb0 (commit) via ad81087b2f4c38aa353fce58bf4b2f5b967a381c (commit) from c2e2bc6fdf92c70d18286ef9393e2376c359ea0e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: NEWS | 17 +- configure.ac | 2 +- po/de.po | 536 ++++++++++++++++------- po/fr.po | 502 +++++++++++++++------ po/nl.po | 520 ++++++++++++++++------ po/pt.po | 553 ++++++++++++++++------- po/sv.po | 511 +++++++++++++++------- po/uk.po | 504 +++++++++++++++------ po/zh_CN.po | 502 +++++++++++++++------ po/zh_TW.po | 502 +++++++++++++++------ src/Makefile.am | 4 +- src/addin-options.cpp | 107 ++++- src/addressbook.cpp | 306 +++++++++++++ src/{overlay.h => addressbook.h} | 45 +- src/application-events.cpp | 12 +- src/categorymanager.cpp | 253 +++++++++++ src/categorymanager.h | 69 +++ src/common.cpp | 160 +++---- src/common_indep.c | 283 ------------ src/common_indep.h | 72 +-- src/cpphelp.cpp | 14 + src/cpphelp.h | 3 + src/cryptcontroller.cpp | 202 +++++---- src/debug.cpp | 352 +++++++++++++++ src/debug.h | 149 +++++++ src/dispcache.cpp | 16 +- src/eventsink.h | 16 +- src/exechelp.c | 150 ------- src/exechelp.h | 51 --- src/explorer-events.cpp | 28 +- src/folder-events.cpp | 19 +- src/gpgoladdin.cpp | 66 ++- src/gpgoladdin.h | 4 + src/keycache.cpp | 714 ++++++++++++++++++++++-------- src/keycache.h | 38 +- src/mail.cpp | 906 ++++++++++++++++++++++++-------------- src/mail.h | 10 +- src/mailitem-events.cpp | 144 +++--- src/main.c | 91 ++-- src/mapihelp.cpp | 675 ++++++++++++++++++---------- src/memdbg.cpp | 42 +- src/memdbg.h | 2 +- src/mimedataprovider.cpp | 166 ++++--- src/mimemaker.cpp | 2 +- src/mlang-charset.cpp | 57 ++- src/oomhelp.cpp | 918 +++++++++++++++++++++++++++++---------- src/oomhelp.h | 50 ++- src/parsecontroller.cpp | 112 +++-- src/revert.cpp | 4 + src/rfc2047parse.c | 81 ++-- src/ribbon-callbacks.cpp | 54 ++- src/ribbon-callbacks.h | 3 + src/w32-gettext.h | 8 +- src/watcher.cpp | 205 --------- src/windowmessages.cpp | 113 +++-- src/windowmessages.h | 1 + src/wks-helper.cpp | 62 ++- src/xmalloc.h | 12 +- 58 files changed, 7462 insertions(+), 3538 deletions(-) create mode 100644 src/addressbook.cpp copy src/{overlay.h => addressbook.h} (56%) create mode 100644 src/categorymanager.cpp create mode 100644 src/categorymanager.h create mode 100644 src/debug.cpp create mode 100644 src/debug.h delete mode 100644 src/exechelp.c delete mode 100644 src/exechelp.h delete mode 100644 src/watcher.cpp hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 11:14:28 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 29 Oct 2018 11:14:28 +0100 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-17-ge60a442 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via e60a442820182e4a6958f374c4de5a661551107d (commit) from 12535d4e5d510e6c66578399a534c334d6337749 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e60a442820182e4a6958f374c4de5a661551107d Author: Andre Heinecke Date: Mon Oct 29 11:13:08 2018 +0100 Enable building tests for windows * src/debug.cpp: Use platform indepentent gpgrt_locks. * src/main.c (initialize_main): Drop mutex init. diff --git a/Makefile.am b/Makefile.am index 1c99b44..4f80a37 100644 --- a/Makefile.am +++ b/Makefile.am @@ -25,7 +25,7 @@ DISTCHECK_CONFIGURE_FLAGS = --host=@host@ --build=@build@ \ EXTRA_DIST = autogen.sh autogen.rc if HAVE_W32_SYSTEM -SUBDIRS = src forms po m4 doc +SUBDIRS = src tests forms po m4 doc else SUBDIRS = tests endif diff --git a/src/debug.cpp b/src/debug.cpp index 88e2923..fcc0450 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -29,14 +29,14 @@ static char *logfile; static FILE *logfp; -#ifdef HAVE_W32_SYSTEM +GPGRT_LOCK_DEFINE (log_lock); /* Acquire the mutex for logging. Returns 0 on success. */ static int lock_log (void) { - int code = WaitForSingleObject (log_mutex, 10000); - return code != WAIT_OBJECT_0; + gpgrt_lock_lock (&log_lock); + return 0; } /* Release the mutex for logging. No error return is done because this @@ -45,9 +45,8 @@ lock_log (void) static void unlock_log (void) { - ReleaseMutex (log_mutex); + gpgrt_lock_unlock (&log_lock); } -#endif const char * get_log_file (void) diff --git a/src/main.c b/src/main.c index 50f5061..56b92ad 100644 --- a/src/main.c +++ b/src/main.c @@ -39,26 +39,6 @@ static void drop_locale_dir (char *locale_dir); int g_ol_version_major; -/* For certain operations we need to acquire a log on the logging - functions. This lock is controlled by this Mutex. */ -HANDLE log_mutex; - -/* Early initialization of this module. This is done right at startup - with only one thread running. Should be called only once. Returns - 0 on success. */ -static int -initialize_main (void) -{ - SECURITY_ATTRIBUTES sa; - - memset (&sa, 0, sizeof sa); - sa.bInheritHandle = FALSE; - sa.lpSecurityDescriptor = NULL; - sa.nLength = sizeof sa; - log_mutex = CreateMutex (&sa, FALSE, NULL); - return log_mutex? 0 : -1; -} - void i18n_init (void) { @@ -134,10 +114,6 @@ DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) version string) is not used here. It may be called at any time later for this. */ gpgme_check_version (NULL); - - /* Early initializations of our subsystems. */ - if (initialize_main ()) - return FALSE; } else if (reason == DLL_PROCESS_DETACH) { diff --git a/src/memdbg.cpp b/src/memdbg.cpp index a720e4f..9653c0b 100644 --- a/src/memdbg.cpp +++ b/src/memdbg.cpp @@ -39,7 +39,7 @@ GPGRT_LOCK_DEFINE (memdbg_log); #define DBGGUARD if (!(opt.enable_debug & DBG_MEMORY)) return -#ifdef HAVE_W32_SYSTEM +#ifndef BUILD_TESTS # include "oomhelp.h" #endif @@ -47,7 +47,7 @@ GPGRT_LOCK_DEFINE (memdbg_log); static bool register_name (void *obj, const char *nameSuggestion) { -#ifdef HAVE_W32_SYSTEM +#ifndef BUILD_TESTS char *name = get_object_name ((LPUNKNOWN)obj); bool suggestionUsed = false; @@ -94,6 +94,7 @@ register_name (void *obj, const char *nameSuggestion) } #else (void) obj; + (void) nameSuggestion; #endif return false; } diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp index 826b597..9c925f8 100644 --- a/src/parsecontroller.cpp +++ b/src/parsecontroller.cpp @@ -43,7 +43,6 @@ #endif - const char decrypt_template_html[] = { "" "" @@ -76,6 +75,39 @@ expect_no_mime (msgtype_t type) type == MSGTYPE_GPGOL_CLEAR_SIGNED; } +#ifdef BUILD_TESTS +static void +get_and_print_key_test (const char *fingerprint, GpgME::Protocol proto) +{ + if (!fingerprint) + { + STRANGEPOINT; + return; + } + auto ctx = std::unique_ptr (GpgME::Context::createForProtocol + (proto)); + + if (!ctx) + { + STRANGEPOINT; + return; + } + ctx->setKeyListMode (GpgME::KeyListMode::Local | + GpgME::KeyListMode::Signatures | + GpgME::KeyListMode::Validate | + GpgME::KeyListMode::WithTofu); + + GpgME::Error err; + const auto newKey = ctx->key (fingerprint, err, false); + + std::stringstream ss; + ss << newKey; + + log_debug ("Key: %s", ss.str().c_str()); + return; +} +#endif + #ifdef HAVE_W32_SYSTEM ParseController::ParseController(LPSTREAM instream, msgtype_t type): m_inputprovider (new MimeDataProvider(instream, @@ -498,7 +530,9 @@ ParseController::parse() TRACEPOINT; has_valid_encrypted_checksum = is_valid_chksum (sig); +#ifndef BUILD_TESTS KeyCache::instance ()->update (sig.fingerprint (), protocol); +#endif TRACEPOINT; } @@ -520,8 +554,12 @@ ParseController::parse() const auto key = sig.key(); if (key.isNull()) { +#ifndef BUILD_TESTS ss << '\n' << "Cached key:\n" << KeyCache::instance()->getByFpr( sig.fingerprint(), false); +#else + get_and_print_key_test (sig.fingerprint (), protocol); +#endif } else { diff --git a/src/rfc2047parse.c b/src/rfc2047parse.c index fd8bd1b..7dd81af 100644 --- a/src/rfc2047parse.c +++ b/src/rfc2047parse.c @@ -605,12 +605,12 @@ rfc2047_decode_tokens (rfc2047_token *tokens, size_t buflen) if (!strcasecmp (charset, "UTF-8")) { strncat (decoded, (char *) outptr, outlen); } else { -#ifdef HAVE_W32_SYSTEM +#ifndef BUILD_TESTS str = ansi_charset_to_utf8 (charset, outptr, outlen, 0); #else - log_debug ("%s:%s: Conversion not available on non W32 systems", + log_debug ("%s:%s: Conversion not available for testing", SRCNAME, __func__); - str = strndup (outptr, outlen); + str = strdup (outptr); #endif if (!str) { diff --git a/src/w32-gettext.cpp b/src/w32-gettext.cpp index ab762b2..6fd14dc 100644 --- a/src/w32-gettext.cpp +++ b/src/w32-gettext.cpp @@ -791,7 +791,11 @@ _nl_locale_name (int category, const char *categoryname) return retval; /* Prefer the Ui language of Outlook. */ +#ifndef BUILD_TESTS lcid = get_ol_ui_language (); +#else + lcid = 0; +#endif if (!lcid) { diff --git a/tests/Makefile.am b/tests/Makefile.am index bb4a5a6..42ca92e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -21,14 +21,25 @@ GPG = gpg +if HAVE_W32_SYSTEM TESTS = t-parser +endif AM_LDFLAGS = @GPGME_LIBS@ -lgpgmepp -AM_CFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) +AM_CFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) -DBUILD_TESTS AM_CXXFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(GPGME_CFLAGS)/gpgme++ \ - $(LIBASSUAN_CFLAGS) -std=c++11 -DDATADIR=\"$(abs_srcdir)/data\" \ - -DGPGHOMEDIR=\"$(abs_srcdir)/gnupg_home\" + $(LIBASSUAN_CFLAGS) -std=c++11 -D_FILE_OFFSET_BITS=64 \ + -DBUILD_TESTS +LDADD = ../src/gpgol.la @GPG_ERROR_LIBS@ + +if HAVE_W32_SYSTEM +run_parser_LDADD = \ + -L ../src -lgpgmepp -lgpgme -lassuan -lgpg-error \ + -lmapi32 -lshell32 -lgdi32 -lcomdlg32 \ + -lole32 -loleaut32 -lws2_32 -ladvapi32 \ + -luuid -lgdiplus -lrpcrt4 +endif parser_SRC= ../src/parsecontroller.cpp \ ../src/parsecontroller.h \ @@ -37,9 +48,19 @@ parser_SRC= ../src/parsecontroller.cpp \ ../src/rfc822parse.c ../src/rfc822parse.h \ ../src/rfc2047parse.c ../src/rfc2047parse.h \ ../src/common_indep.c ../src/common_indep.h \ + ../src/debug.cpp ../src/debug.h \ + ../src/memdbg.cpp ../src/memdbg.h \ + ../src/cpphelp.cpp ../src/cpphelp.h \ + ../src/w32-gettext.cpp ../src/w32-gettext.h \ ../src/xmalloc.h +if !HAVE_W32_SYSTEM t_parser_SOURCES = t-parser.cpp $(parser_SRC) +endif run_parser_SOURCES = run-parser.cpp $(parser_SRC) +if !HAVE_W32_SYSTEM noinst_PROGRAMS = t-parser run-parser +else +noinst_PROGRAMS = run-parser +endif diff --git a/tests/run-parser.cpp b/tests/run-parser.cpp index f759496..b908360 100644 --- a/tests/run-parser.cpp +++ b/tests/run-parser.cpp @@ -63,7 +63,7 @@ int main(int argc, char **argv) show_usage (0); else if (!strcmp (*argv, "--verbose")) { - opt.enable_debug |= DBG_MIME_PARSER; + opt.enable_debug |= DBG_DATA; opt.enable_debug |= 1; set_log_file ("stderr"); argc--; argv++; ----------------------------------------------------------------------- Summary of changes: Makefile.am | 2 +- src/debug.cpp | 9 ++++----- src/main.c | 24 ------------------------ src/memdbg.cpp | 5 +++-- src/parsecontroller.cpp | 40 +++++++++++++++++++++++++++++++++++++++- src/rfc2047parse.c | 6 +++--- src/w32-gettext.cpp | 4 ++++ tests/Makefile.am | 27 ++++++++++++++++++++++++--- tests/run-parser.cpp | 2 +- 9 files changed, 79 insertions(+), 40 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 11:57:11 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 29 Oct 2018 11:57:11 +0100 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-19-ge193d2e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via e193d2e3c721a3ab92d3479ddc7d59039265d682 (commit) via ec09bad3291af901eb7c773739aab3f22cda3197 (commit) from e60a442820182e4a6958f374c4de5a661551107d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e193d2e3c721a3ab92d3479ddc7d59039265d682 Author: Andre Heinecke Date: Mon Oct 29 11:53:27 2018 +0100 Initialize memory to X on trace + memdbg * src/xmalloc.h (xmalloc): Initialize memory to X on debug level. -- This is intended to better find memory errors. diff --git a/src/xmalloc.h b/src/xmalloc.h index e302a85..f2cf877 100644 --- a/src/xmalloc.h +++ b/src/xmalloc.h @@ -33,6 +33,8 @@ extern "C" { if ((opt.enable_debug & DBG_MEMORY)) \ { \ memdbg_alloc (retval); \ + if ((opt.enable_debug & DBG_TRACE)) \ + memset (retval, 'X', VAR1); \ } \ retval;}) commit ec09bad3291af901eb7c773739aab3f22cda3197 Author: Andre Heinecke Date: Mon Oct 29 11:52:23 2018 +0100 Fix off by one in iconv_to_utf8 * src/mlang-charset.cpp (iconv_to_utf8): Inlen needed to include the zero. -- This fixes a crash when this function is used for conversion. diff --git a/src/mlang-charset.cpp b/src/mlang-charset.cpp index c4cd1fa..65386d1 100644 --- a/src/mlang-charset.cpp +++ b/src/mlang-charset.cpp @@ -35,7 +35,7 @@ DEFINE_GUID (IID_IMultiLanguage, 0x275c23e1,0x3747,0x11d0,0x9f, #include "mlang-charset.h" static char * -iconv_to_utf8 (const char *charset, const char *input, size_t inlen) +iconv_to_utf8 (const char *charset, const char *input) { if (!charset || !input) { @@ -63,6 +63,7 @@ iconv_to_utf8 (const char *charset, const char *input, size_t inlen) } char *buffer = (char*) xmalloc (len + 1); + size_t inlen = strlen (input) + 1; // Need to add 1 for the zero char *outptr = buffer; size_t outbytes = len; size_t ret = gpgrt_w32_iconv (ctx, (const char **)&input, &inlen, @@ -143,7 +144,7 @@ char *ansi_charset_to_utf8 (const char *charset, const char *input, SRCNAME, __func__, charset); /* We only use this as a fallback as the old code was older and known to work in most cases. */ - ret = iconv_to_utf8 (charset, input, inlen); + ret = iconv_to_utf8 (charset, input); if (ret) { return ret; ----------------------------------------------------------------------- Summary of changes: src/mlang-charset.cpp | 5 +++-- src/xmalloc.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 13:49:40 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 29 Oct 2018 13:49:40 +0100 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-20-gef333f9 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via ef333f9d9021a0c3039eda0139986321dfdb9bbd (commit) from e193d2e3c721a3ab92d3479ddc7d59039265d682 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ef333f9d9021a0c3039eda0139986321dfdb9bbd Author: Andre Heinecke Date: Mon Oct 29 13:49:15 2018 +0100 tests: Add repeats option to parser runner * tests/run-parser.cpp: Add repeats option. diff --git a/tests/run-parser.cpp b/tests/run-parser.cpp index b908360..d4a595e 100644 --- a/tests/run-parser.cpp +++ b/tests/run-parser.cpp @@ -36,6 +36,7 @@ show_usage (int ex) " --opaque-encrypted SMIME opaque encrypted\n" " --clear-signed clearsigned\n" " --pgp-message inline pgp message\n" + " --repeat N repeat N times\n" , stderr); exit (ex); } @@ -45,6 +46,7 @@ int main(int argc, char **argv) int last_argc = -1; msgtype_t msgtype = MSGTYPE_UNKNOWN; FILE *fp_in = NULL; + int repeats = 1; gpgme_check_version (NULL); @@ -98,29 +100,43 @@ int main(int argc, char **argv) msgtype = MSGTYPE_GPGOL_PGP_MESSAGE; argc--; argv++; } + else if (!strcmp (*argv, "--repeat")) + { + argc--; argv++; + if (!argc) + show_usage (1); + repeats = atoi (*argv); + argc--; argv++; + } } if (argc < 1 || argc > 2) show_usage (1); - fp_in = fopen (argv[0], "rb"); - - if (fp_in) + for (int i = 0; i < repeats; i++) { - ParseController parser(fp_in, msgtype); - parser.parse(); - std::cout << "Parse error: " << parser.get_formatted_error (); - std::cout << "\nDecrypt result:\n" << parser.decrypt_result() - << "\nVerify result:\n" << parser.verify_result() - << "\nBEGIN BODY\n" << parser.get_body() << "\nEND BODY" - << "\nBEGIN HTML\n" << parser.get_html_body() << "\nEND HTML"; - for (auto attach: parser.get_attachments()) + std::cout << "Run: " << i; + fp_in = fopen (argv[0], "rb"); + + if (fp_in) { - std::cout << "Attachment: " << attach->get_display_name(); + ParseController parser(fp_in, msgtype); + parser.setSender("test at example.com"); + parser.parse(); + std::cout << "Parse error: " << parser.get_formatted_error (); + std::cout << "\nDecrypt result:\n" << parser.decrypt_result() + << "\nVerify result:\n" << parser.verify_result() + << "\nBEGIN BODY\n" << parser.get_body() << "\nEND BODY" + << "\nBEGIN HTML\n" << parser.get_html_body() << "\nEND HTML"; + for (auto attach: parser.get_attachments()) + { + std::cout << "Attachment: " << attach->get_display_name(); + } + fclose (fp_in); } - fclose (fp_in); - } - else - { - std::cout << "failed to open input: " << argv[0]; + else + { + std::cout << "failed to open input: " << argv[0]; + } + } } ----------------------------------------------------------------------- Summary of changes: tests/run-parser.cpp | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 16:15:41 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 29 Oct 2018 16:15:41 +0100 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-26-g8f27511 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 8f27511862cabac8fa1dd8f883cb78faebc05ef6 (commit) via 62c736ba76a19d3b41af69e1f340a53b80f13fe0 (commit) from 05a0e97f5c12c06082fbeab0fba6f86ddbfbe6b2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8f27511862cabac8fa1dd8f883cb78faebc05ef6 Author: Andre Heinecke Date: Mon Oct 29 16:11:22 2018 +0100 core: Do not crash if CMS plaintext is ignored * src/engine-gpgsm.c (gpgsm_verify): Fix handling both plaintext and signed_text as NULL. -- Previously if plaintext was NULL and signed_text was NULL it would set MESSAGE_FD to NULL which resulted in a crash. Ignoring the plaintext of an opaque signature might make sense in some cases and engine-gpg handles it. diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c index 3266e36..6e6df46 100644 --- a/src/engine-gpgsm.c +++ b/src/engine-gpgsm.c @@ -2030,11 +2030,19 @@ gpgsm_verify (void *engine, gpgme_data_t sig, gpgme_data_t signed_text, err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data)); if (err) return err; - if (plaintext) + if (!signed_text) { /* Normal or cleartext signature. */ - gpgsm->output_cb.data = plaintext; - err = gpgsm_set_fd (gpgsm, OUTPUT_FD, 0); + if (plaintext) + { + gpgsm->output_cb.data = plaintext; + err = gpgsm_set_fd (gpgsm, OUTPUT_FD, 0); + } + else + { + /* No output requested. */ + gpgsm_clear_fd (gpgsm, OUTPUT_FD); + } gpgsm_clear_fd (gpgsm, MESSAGE_FD); } else commit 62c736ba76a19d3b41af69e1f340a53b80f13fe0 Author: Andre Heinecke Date: Mon Oct 29 15:36:45 2018 +0100 cpp,tests: Add another test runner * lang/cpp/tests/run-verify.cpp: New. * lang/cpp/tests/Makefile.am: Update accordingly. -- Add another test runner which helps to find problems on windows. diff --git a/lang/cpp/tests/Makefile.am b/lang/cpp/tests/Makefile.am index e9d9a57..67dd3d3 100644 --- a/lang/cpp/tests/Makefile.am +++ b/lang/cpp/tests/Makefile.am @@ -31,5 +31,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \ run_getkey_SOURCES = run-getkey.cpp run_keylist_SOURCES = run-keylist.cpp +run_verify_SOURCES = run-verify.cpp -noinst_PROGRAMS = run-getkey run-keylist +noinst_PROGRAMS = run-getkey run-keylist run-verify diff --git a/lang/cpp/tests/run-verify.cpp b/lang/cpp/tests/run-verify.cpp new file mode 100644 index 0000000..ec431e5 --- /dev/null +++ b/lang/cpp/tests/run-verify.cpp @@ -0,0 +1,186 @@ +/* + run-keylist.cpp + + This file is part of GpgMEpp's test suite. + Copyright (c) 2018 Intevation GmbH + + QGpgME is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License, + version 2, as published by the Free Software Foundation. + + QGpgME is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + In addition, as a special exception, the copyright holders give + permission to link the code of this program with any edition of + the Qt library by Trolltech AS, Norway (or with modified versions + of Qt that use the same license as Qt), and distribute linked + combinations including the two. You must obey the GNU General + Public License in all respects for all of the code used other than + Qt. If you modify this file, you may extend this exception to + your version of the file, but you are not obligated to do so. If + you do not wish to do so, delete this exception statement from + your version. +*/ +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "context.h" +#include "key.h" +#include "data.h" +#include "verificationresult.h" + +#include +#include +#include + +using namespace GpgME; +static int +show_usage (int ex) +{ + fputs ("usage: run-verify [options] [DETACHEDSIGFILE] FILE\n\n" + "Options:\n" + " --verbose run in verbose mode\n" + " --openpgp use the OpenPGP protocol (default)\n" + " --cms use the CMS protocol\n" + " --sender MBOX use MBOX as sender address\n" + " --repeat N repeat it N times\n" + " --list-key list the signing key afterwards\n" + , stderr); + exit (ex); +} + +int +main (int argc, char **argv) +{ + int last_argc = -1; + Protocol protocol = OpenPGP; + std::string sender; + int repeats = 1; + bool verbose = false; + bool list_key = false; + + if (argc) + { argc--; argv++; } + + while (argc && last_argc != argc ) + { + last_argc = argc; + if (!strcmp (*argv, "--")) + { + argc--; argv++; + break; + } + else if (!strcmp (*argv, "--help")) + show_usage (0); + else if (!strcmp (*argv, "--verbose")) + { + verbose = true; + argc--; argv++; + } + else if (!strcmp (*argv, "--list-key")) + { + list_key = true; + argc--; argv++; + } + else if (!strcmp (*argv, "--openpgp")) + { + protocol = OpenPGP; + argc--; argv++; + } + else if (!strcmp (*argv, "--cms")) + { + protocol = CMS; + argc--; argv++; + } + else if (!strcmp (*argv, "--sender")) + { + argc--; argv++; + if (!argc) + show_usage (1); + sender = *argv; + argc--; argv++; + } + else if (!strcmp (*argv, "--repeat")) + { + argc--; argv++; + if (!argc) + show_usage (1); + repeats = atoi (*argv); + argc--; argv++; + } + else if (!strncmp (*argv, "--", 2)) + show_usage (1); + } + + if (argc < 1 || argc > 2) + show_usage (1); + + GpgME::initializeLibrary(); + + for (int i = 0; i < repeats; i++) { + std::cout << "Starting run: " << i << std::endl; + auto ctx = std::unique_ptr (Context::createForProtocol(protocol)); + if (!ctx) { + std::cerr << "Failed to get Context"; + return -1; + } + + std::FILE *fp_sig = fopen (argv[0], "rb"); + if (!fp_sig) { + std::cerr << "Failed to open sig file"; + exit (1); + } + + std::FILE *fp_msg = nullptr; + if (argc > 1) + { + fp_msg = fopen (argv[1], "rb"); + if (!fp_msg) { + std::cerr << "Failed to open msg file"; + exit (1); + } + } + Data dSig(fp_sig); + Data dMsg; + bool is_opaque = true; + if (fp_msg) { + dMsg = Data(fp_msg); + is_opaque = false; + } + + if (!sender.empty()) { + ctx->setSender(sender.c_str()); + } + + Data output; + VerificationResult result; + if (is_opaque) { + result = ctx->verifyOpaqueSignature(dSig, output); + } else { + result = ctx->verifyDetachedSignature(dSig, dMsg); + } + + Signature sig; + if (result.numSignatures()) { + sig = result.signature(0); + } + + if (list_key && !sig.isNull()) { + sig.key(true, false); + } + + if (verbose) { + std::cout << "Result: " << result << std::endl; + } else { + std::cout << "Err:" << result.error() << std::endl; + } + } +} ----------------------------------------------------------------------- Summary of changes: lang/cpp/tests/Makefile.am | 3 +- lang/cpp/tests/run-verify.cpp | 186 ++++++++++++++++++++++++++++++++++++++++++ src/engine-gpgsm.c | 14 +++- 3 files changed, 199 insertions(+), 4 deletions(-) create mode 100644 lang/cpp/tests/run-verify.cpp hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 16:33:44 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 29 Oct 2018 16:33:44 +0100 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-27-g681525b Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 681525be003433728d127303d40712803b70cb9c (commit) from 8f27511862cabac8fa1dd8f883cb78faebc05ef6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 681525be003433728d127303d40712803b70cb9c Author: Andre Heinecke Date: Mon Oct 29 16:33:04 2018 +0100 tests: Add repeat argument to run-verify * tests/run-verify.c (main): Add repeat argument. -- This helps reproducing rare / random crashes. diff --git a/tests/run-verify.c b/tests/run-verify.c index 4a6c960..b8dd021 100644 --- a/tests/run-verify.c +++ b/tests/run-verify.c @@ -230,6 +230,7 @@ show_usage (int ex) " --openpgp use the OpenPGP protocol (default)\n" " --cms use the CMS protocol\n" " --sender MBOX use MBOX as sender address\n" + " --repeat N repeat the operation N times\n" " --auto-key-retrieve\n" , stderr); exit (ex); @@ -241,17 +242,11 @@ main (int argc, char **argv) { int last_argc = -1; const char *s; - gpgme_error_t err; - gpgme_ctx_t ctx; gpgme_protocol_t protocol = GPGME_PROTOCOL_OpenPGP; - FILE *fp_sig = NULL; - gpgme_data_t sig = NULL; - FILE *fp_msg = NULL; - gpgme_data_t msg = NULL; - gpgme_verify_result_t result; int print_status = 0; const char *sender = NULL; int auto_key_retrieve = 0; + int repeats = 1; if (argc) { argc--; argv++; } @@ -294,6 +289,14 @@ main (int argc, char **argv) sender = *argv; argc--; argv++; } + else if (!strcmp (*argv, "--repeat")) + { + argc--; argv++; + if (!argc) + show_usage (1); + repeats = atoi (*argv); + argc--; argv++; + } else if (!strcmp (*argv, "--auto-key-retrieve")) { auto_key_retrieve = 1; @@ -308,87 +311,108 @@ main (int argc, char **argv) if (argc < 1 || argc > 2) show_usage (1); - fp_sig = fopen (argv[0], "rb"); - if (!fp_sig) - { - err = gpgme_error_from_syserror (); - fprintf (stderr, PGM ": can't open `%s': %s\n", - argv[0], gpgme_strerror (err)); - exit (1); - } - if (argc > 1) + init_gpgme (protocol); + + for (int i = 0; i < repeats; i++) { - fp_msg = fopen (argv[1], "rb"); - if (!fp_msg) + gpgme_error_t err; + gpgme_ctx_t ctx; + FILE *fp_sig = NULL; + gpgme_data_t sig = NULL; + FILE *fp_msg = NULL; + gpgme_data_t msg = NULL; + gpgme_verify_result_t result; + + if (repeats > 1) + { + printf ("Repeat: %i\n", i); + } + + fp_sig = fopen (argv[0], "rb"); + if (!fp_sig) { err = gpgme_error_from_syserror (); fprintf (stderr, PGM ": can't open `%s': %s\n", - argv[1], gpgme_strerror (err)); + argv[0], gpgme_strerror (err)); exit (1); } - } - - init_gpgme (protocol); + if (argc > 1) + { + fp_msg = fopen (argv[1], "rb"); + if (!fp_msg) + { + err = gpgme_error_from_syserror (); + fprintf (stderr, PGM ": can't open `%s': %s\n", + argv[1], gpgme_strerror (err)); + exit (1); + } + } - err = gpgme_new (&ctx); - fail_if_err (err); - gpgme_set_protocol (ctx, protocol); - if (print_status) - { - gpgme_set_status_cb (ctx, status_cb, NULL); - gpgme_set_ctx_flag (ctx, "full-status", "1"); - } - /* gpgme_set_ctx_flag (ctx, "raw-description", "1"); */ + err = gpgme_new (&ctx); + fail_if_err (err); + gpgme_set_protocol (ctx, protocol); + if (print_status) + { + gpgme_set_status_cb (ctx, status_cb, NULL); + gpgme_set_ctx_flag (ctx, "full-status", "1"); + } + /* gpgme_set_ctx_flag (ctx, "raw-description", "1"); */ - if (auto_key_retrieve) - { - gpgme_set_ctx_flag (ctx, "auto-key-retrieve", "1"); - s = gpgme_get_ctx_flag (ctx, "auto-key-retrieve"); - if (!s || strcmp (s, "1")) + if (auto_key_retrieve) { - fprintf (stderr, PGM ": gpgme_get_ctx_flag failed for '%s'\n", - "auto-key-retrieve"); - exit (1); + gpgme_set_ctx_flag (ctx, "auto-key-retrieve", "1"); + s = gpgme_get_ctx_flag (ctx, "auto-key-retrieve"); + if (!s || strcmp (s, "1")) + { + fprintf (stderr, PGM ": gpgme_get_ctx_flag failed for '%s'\n", + "auto-key-retrieve"); + exit (1); + } } - } - if (sender) - { - err = gpgme_set_sender (ctx, sender); - fail_if_err (err); - } + if (sender) + { + err = gpgme_set_sender (ctx, sender); + fail_if_err (err); + } - err = gpgme_data_new_from_stream (&sig, fp_sig); - if (err) - { - fprintf (stderr, PGM ": error allocating data object: %s\n", - gpgme_strerror (err)); - exit (1); - } - if (fp_msg) - { - err = gpgme_data_new_from_stream (&msg, fp_msg); + err = gpgme_data_new_from_stream (&sig, fp_sig); if (err) { fprintf (stderr, PGM ": error allocating data object: %s\n", gpgme_strerror (err)); exit (1); } - } + if (fp_msg) + { + err = gpgme_data_new_from_stream (&msg, fp_msg); + if (err) + { + fprintf (stderr, PGM ": error allocating data object: %s\n", + gpgme_strerror (err)); + exit (1); + } + } - err = gpgme_op_verify (ctx, sig, msg, NULL); - result = gpgme_op_verify_result (ctx); - if (result) - print_result (result); - if (err) - { - fprintf (stderr, PGM ": verify failed: %s\n", gpgme_strerror (err)); - exit (1); - } + err = gpgme_op_verify (ctx, sig, msg, NULL); + result = gpgme_op_verify_result (ctx); + if (result) + print_result (result); + if (err) + { + fprintf (stderr, PGM ": verify failed: %s\n", gpgme_strerror (err)); + exit (1); + } - gpgme_data_release (msg); - gpgme_data_release (sig); + gpgme_data_release (msg); + gpgme_data_release (sig); - gpgme_release (ctx); + gpgme_release (ctx); + + if (fp_msg) + fclose (fp_msg); + if (fp_sig) + fclose (fp_sig); + } return 0; } ----------------------------------------------------------------------- Summary of changes: tests/run-verify.c | 160 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 92 insertions(+), 68 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Mon Oct 29 20:01:46 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Mon, 29 Oct 2018 20:01:46 +0100 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-28-g7a1b580 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 7a1b58045f980c4df76daf225a2a1b604e8604d2 (commit) from 681525be003433728d127303d40712803b70cb9c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7a1b58045f980c4df76daf225a2a1b604e8604d2 Author: Andre Heinecke Date: Mon Oct 29 19:44:02 2018 +0100 core,w32: Fix memleak of tmp_name in w32-io * src/w32-io.c (_gpgme_io_spawn): Free tmp_name. -- GnuPG-Bug-Id: T4238 diff --git a/src/w32-io.c b/src/w32-io.c index 05e11ee..d3b1b91 100644 --- a/src/w32-io.c +++ b/src/w32-io.c @@ -1610,6 +1610,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, { close (tmp_fd); DeleteFileA (tmp_name); + free (tmp_name); return TRACE_SYSRES (-1); } @@ -1649,6 +1650,9 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, MessageBoxA (NULL, msg, "GpgME not installed correctly", MB_OK); gpgrt_free (msg); gpg_err_set_errno (EIO); + close (tmp_fd); + DeleteFileA (tmp_name); + free (tmp_name); return TRACE_SYSRES (-1); } if (!CreateProcessA (spawnhelper, @@ -1667,12 +1671,14 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, free (arg_string); close (tmp_fd); DeleteFileA (tmp_name); + free (tmp_name); /* FIXME: Should translate the error code. */ gpg_err_set_errno (EIO); return TRACE_SYSRES (-1); } + free (tmp_name); free (arg_string); if (flags & IOSPAWN_FLAG_ALLOW_SET_FG) @@ -1702,6 +1708,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, close (tmp_fd); DeleteFileA (tmp_name); + free (tmp_name); /* FIXME: Should translate the error code. */ gpg_err_set_errno (EIO); ----------------------------------------------------------------------- Summary of changes: src/w32-io.c | 7 +++++++ 1 file changed, 7 insertions(+) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 30 04:08:11 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 30 Oct 2018 04:08:11 +0100 Subject: [git] GCRYPT - branch, LIBGCRYPT-1.8-BRANCH, updated. libgcrypt-1.8.3-16-g813b002 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1.8-BRANCH has been updated via 813b002eaf3052586f25b36d0b72668cfad3e0ee (commit) from b3f4e39b2a29af6de0c45dcaa842414da780b204 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 813b002eaf3052586f25b36d0b72668cfad3e0ee Author: NIIBE Yutaka Date: Tue Oct 30 12:04:59 2018 +0900 libgrypt.pc: Provide pkg-config file. * configure.ac: Generate src/libgcrypt.pc. * src/Makefile.am (pkgconfigdir, pkgconfig_DATA): New. (EXTRA_DIST): Add libgcrypt.pc.in. * src/libgcrypt.pc.in: New. -- Backported from master. Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index 2d63448..97ab209 100644 --- a/configure.ac +++ b/configure.ac @@ -2613,6 +2613,7 @@ doc/Makefile src/Makefile src/gcrypt.h src/libgcrypt-config +src/libgcrypt.pc src/versioninfo.rc tests/Makefile ]) diff --git a/src/Makefile.am b/src/Makefile.am index 3cc4a55..82d6e8a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -20,8 +20,11 @@ ## Process this file with automake to produce Makefile.in +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libgcrypt.pc + EXTRA_DIST = libgcrypt-config.in libgcrypt.m4 libgcrypt.vers \ - gcrypt.h.in libgcrypt.def + gcrypt.h.in libgcrypt.def libgcrypt.pc.in bin_SCRIPTS = libgcrypt-config m4datadir = $(datadir)/aclocal diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in new file mode 100644 index 0000000..ec68fa2 --- /dev/null +++ b/src/libgcrypt.pc.in @@ -0,0 +1,17 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ +host=@LIBGCRYPT_CONFIG_HOST@ +api_version=@LIBGCRYPT_CONFIG_API_VERSION@ +symmetric_ciphers="@LIBGCRYPT_CIPHERS@" +asymmetric_ciphers="@LIBGCRYPT_PUBKEY_CIPHERS@" +digests="@LIBGCRYPT_DIGESTS@" + +Name: libgcrypt +Description: General purpose cryptographic library +Requires: gpg-error +Version: @PACKAGE_VERSION@ +Cflags: @LIBGCRYPT_CONFIG_CFLAGS@ +Libs: @LIBGCRYPT_CONFIG_LIBS@ +URL: https://www.gnupg.org/software/libgcrypt/index.html ----------------------------------------------------------------------- Summary of changes: configure.ac | 1 + src/Makefile.am | 5 ++++- src/libgcrypt.pc.in | 17 +++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 src/libgcrypt.pc.in hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 30 04:14:22 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 30 Oct 2018 04:14:22 +0100 Subject: [git] GCRYPT - branch, LIBGCRYPT-1.8-BRANCH, updated. libgcrypt-1.8.3-17-g0216418 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1.8-BRANCH has been updated via 0216418ab23a690662764098a17002754202a2c2 (commit) from 813b002eaf3052586f25b36d0b72668cfad3e0ee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0216418ab23a690662764098a17002754202a2c2 Author: NIIBE Yutaka Date: Tue Oct 30 12:12:57 2018 +0900 libgcrypt.m4: Update from master. * src/libgcrypt.m4: Update. -- Backport from master to enable use of gpgrt-config. Signed-off-by: NIIBE Yutaka diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 index c67cfec..2646e96 100644 --- a/src/libgcrypt.m4 +++ b/src/libgcrypt.m4 @@ -1,5 +1,5 @@ # libgcrypt.m4 - Autoconf macros to detect libgcrypt -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-29 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, @@ -52,7 +52,17 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi - AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) + use_gpgrt_config="" + if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG libgcrypt --exists; then + LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) + fi + tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -71,7 +81,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` + if test -z "$use_gpgrt_config"; then + libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` + else + libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` + fi major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ @@ -103,7 +117,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then - tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then @@ -119,12 +137,16 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) - libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + else + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $LIBGCRYPT_CONFIG was +*** The config script "$LIBGCRYPT_CONFIG" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix ----------------------------------------------------------------------- Summary of changes: src/libgcrypt.m4 | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 30 09:20:06 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 30 Oct 2018 09:20:06 +0100 Subject: [git] GpgOL - branch, master, updated. gpgol-2.3.1-22-gdc2a57f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG extension for MS Outlook". The branch, master has been updated via dc2a57f878282e50ccae9c55b3cfadcea1bb7f27 (commit) via 6c8166d36e634b76ccbf03de3ebb0e43f89f5574 (commit) from ef333f9d9021a0c3039eda0139986321dfdb9bbd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dc2a57f878282e50ccae9c55b3cfadcea1bb7f27 Author: Andre Heinecke Date: Tue Oct 30 09:18:35 2018 +0100 Fix Linux build of tests * src/common_indep.c: Include wchar.h * src/cpphelp.cpp (in_de_vs_mode): use strcasecm (get_registry_subkeys): Make conditional. * src/cpphelp.h: Update accordinlgy. * src/debug.cpp: Fix unused errors and do locking. * src/parsecontroller.cpp (ParseController::parse): Remove unused warning. * tests/Makefile.am: Add definitions for linux diff --git a/src/common_indep.c b/src/common_indep.c index aebd10c..4a029a0 100644 --- a/src/common_indep.c +++ b/src/common_indep.c @@ -24,6 +24,7 @@ #include #endif +#include #include #include diff --git a/src/cpphelp.cpp b/src/cpphelp.cpp index 30daa9e..434a368 100644 --- a/src/cpphelp.cpp +++ b/src/cpphelp.cpp @@ -19,7 +19,9 @@ * along with this program; if not, see . */ -#include "config.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "cpphelp.h" @@ -28,13 +30,18 @@ #include #include -#include "common.h" +#include "common_indep.h" #include #include #include -#include +#ifdef HAVE_W32_SYSTEM +# include "common.h" +# include +#else +#include "common_indep.h" +#endif void release_cArray (char **carray) @@ -148,7 +155,11 @@ in_de_vs_mode() { if (option.name () && !strcmp (option.name (), "compliance") && option.currentValue ().stringValue () && +#ifdef HAVE_W32_SYSTEM !stricmp (option.currentValue ().stringValue (), "de-vs")) +#else + !strcasecmp (option.currentValue ().stringValue (), "de-vs")) +#endif { log_debug ("%s:%s: Detected de-vs mode", SRCNAME, __func__); @@ -164,6 +175,7 @@ in_de_vs_mode() return false; } +#ifdef HAVE_W32_SYSTEM std::map get_registry_subkeys (const char *path) { @@ -252,6 +264,7 @@ get_registry_subkeys (const char *path) RegCloseKey (theKey); return ret; } +#endif template void internal_split (const std::string &s, char delim, Out result) { diff --git a/src/cpphelp.h b/src/cpphelp.h index cd56349..de10dee 100644 --- a/src/cpphelp.h +++ b/src/cpphelp.h @@ -48,8 +48,10 @@ std::vector cArray_to_vector (const char **cArray); /* Check if we are in de_vs mode. */ bool in_de_vs_mode (); +#ifdef HAVE_W32_SYSTEM /* Get a map of all subkey value pairs in a registry key */ std::map get_registry_subkeys (const char *path); +#endif std::vector gpgol_split (const std::string &s, char delim); diff --git a/src/debug.cpp b/src/debug.cpp index fcc0450..e7981d3 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -57,10 +57,8 @@ get_log_file (void) void set_log_file (const char *name) { -#ifdef HAVE_W32_SYSTEM if (!lock_log ()) { -#endif if (logfp) { fclose (logfp); @@ -72,10 +70,8 @@ set_log_file (const char *name) else logfile = strdup (name); -#ifdef HAVE_W32_SYSTEM unlock_log (); } -#endif } static void @@ -152,6 +148,8 @@ do_log (const char *fmt, va_list a, int w32err, int err, tmpbuf[strlen (tmpbuf)-1] = 0; fprintf (logfp, "%s (%d)", tmpbuf, w32err); } +#else + (void) w32err; #endif if (buf) { diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp index 9c925f8..4a72a65 100644 --- a/src/parsecontroller.cpp +++ b/src/parsecontroller.cpp @@ -515,6 +515,8 @@ ParseController::parse() m_verify_result = ctx->verifyOpaqueSignature(input, output); } } +#else +(void)allBad; #endif } } diff --git a/tests/Makefile.am b/tests/Makefile.am index 42ca92e..dfb96b0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,10 +28,18 @@ endif AM_LDFLAGS = @GPGME_LIBS@ -lgpgmepp AM_CFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) -DBUILD_TESTS +if !HAVE_W32_SYSTEM +AM_CXXFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(GPGME_CFLAGS)/gpgme++ \ + $(LIBASSUAN_CFLAGS) -std=c++11 -D_FILE_OFFSET_BITS=64 \ + -DBUILD_TESTS -DDATADIR=\"$(abs_srcdir)/data\" \ + -DGPGHOMEDIR=\"$(abs_srcdir)/gnupg_home\" +else AM_CXXFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(GPGME_CFLAGS)/gpgme++ \ $(LIBASSUAN_CFLAGS) -std=c++11 -D_FILE_OFFSET_BITS=64 \ -DBUILD_TESTS -LDADD = ../src/gpgol.la @GPG_ERROR_LIBS@ +endif +LDADD = @GPG_ERROR_LIBS@ + if HAVE_W32_SYSTEM run_parser_LDADD = \ @@ -51,13 +59,15 @@ parser_SRC= ../src/parsecontroller.cpp \ ../src/debug.cpp ../src/debug.h \ ../src/memdbg.cpp ../src/memdbg.h \ ../src/cpphelp.cpp ../src/cpphelp.h \ - ../src/w32-gettext.cpp ../src/w32-gettext.h \ ../src/xmalloc.h if !HAVE_W32_SYSTEM t_parser_SOURCES = t-parser.cpp $(parser_SRC) -endif run_parser_SOURCES = run-parser.cpp $(parser_SRC) +else +run_parser_SOURCES = run-parser.cpp $(parser_SRC) \ + ../src/w32-gettext.cpp ../src/w32-gettext.h +endif if !HAVE_W32_SYSTEM noinst_PROGRAMS = t-parser run-parser commit 6c8166d36e634b76ccbf03de3ebb0e43f89f5574 Author: Andre Heinecke Date: Tue Oct 30 09:16:22 2018 +0100 Minor style improvement in run-parser output * tests/run-parser.cpp (main): Add some newlines. diff --git a/tests/run-parser.cpp b/tests/run-parser.cpp index d4a595e..62f1e70 100644 --- a/tests/run-parser.cpp +++ b/tests/run-parser.cpp @@ -114,7 +114,7 @@ int main(int argc, char **argv) for (int i = 0; i < repeats; i++) { - std::cout << "Run: " << i; + std::cout << std::endl << "Run: " << i << std::endl; fp_in = fopen (argv[0], "rb"); if (fp_in) ----------------------------------------------------------------------- Summary of changes: src/common_indep.c | 1 + src/cpphelp.cpp | 19 ++++++++++++++++--- src/cpphelp.h | 2 ++ src/debug.cpp | 6 ++---- src/parsecontroller.cpp | 2 ++ tests/Makefile.am | 16 +++++++++++++--- tests/run-parser.cpp | 2 +- 7 files changed, 37 insertions(+), 11 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 30 11:20:49 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 30 Oct 2018 11:20:49 +0100 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-29-g9eef23f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 9eef23fcf39f2b2eb2645afd31a79ba1286d9885 (commit) from 7a1b58045f980c4df76daf225a2a1b604e8604d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9eef23fcf39f2b2eb2645afd31a79ba1286d9885 Author: Werner Koch Date: Tue Oct 30 11:19:33 2018 +0100 w32: Fix previous commit. * src/w32-io.c (_gpgme_io_spawn): Move freeing of TMP_NAME behind its use in an error handling. Signed-off-by: Werner Koch diff --git a/src/w32-io.c b/src/w32-io.c index d3b1b91..52327af 100644 --- a/src/w32-io.c +++ b/src/w32-io.c @@ -1678,9 +1678,6 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, return TRACE_SYSRES (-1); } - free (tmp_name); - free (arg_string); - if (flags & IOSPAWN_FLAG_ALLOW_SET_FG) _gpgme_allow_set_foreground_window ((pid_t)pi.dwProcessId); @@ -1763,6 +1760,8 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, (hopefully). */ #endif + free (tmp_name); + free (arg_string); TRACE_LOG4 ("CreateProcess ready: hProcess=%p, hThread=%p, " "dwProcessID=%d, dwThreadId=%d", ----------------------------------------------------------------------- Summary of changes: src/w32-io.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 30 17:06:51 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Tue, 30 Oct 2018 17:06:51 +0100 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-30-gd5c2296 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via d5c22966d5bf397cccfa171095885cd207ef6ae3 (commit) from 9eef23fcf39f2b2eb2645afd31a79ba1286d9885 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d5c22966d5bf397cccfa171095885cd207ef6ae3 Author: Ben McGinnes Date: Wed Oct 31 01:24:47 2018 +1100 docs: python * dropped the ".org" extension and added a mode line for each file as this will make scripting format conversions a lot easier. diff --git a/lang/python/doc/src/gpgme-python-howto.org b/lang/python/doc/src/gpgme-python-howto similarity index 99% rename from lang/python/doc/src/gpgme-python-howto.org rename to lang/python/doc/src/gpgme-python-howto index 3c389d1..1e83e09 100644 --- a/lang/python/doc/src/gpgme-python-howto.org +++ b/lang/python/doc/src/gpgme-python-howto @@ -1,3 +1,4 @@ +# -*- mode: org -*- #+TITLE: GNU Privacy Guard (GnuPG) Made Easy Python Bindings HOWTO (English) #+AUTHOR: Ben McGinnes #+LATEX_COMPILER: xelatex @@ -490,7 +491,7 @@ place. :CUSTOM_ID: snafu-the-full-monty :END: -For a veriety of reasons it may be either necessary or just preferable +For a variety of reasons it may be either necessary or just preferable to install the bindings to alternative installed Python versions which meet the requirements of these bindings. @@ -507,6 +508,16 @@ by major version numbers and probably minor numbers too). On most POSIX systems, including OS X, this will very likely be the case in most, if not all, cases. +Note that from GPGME [[https://dev.gnupg.org/rMff6ff616aea6f59b7f2ce1176492850ecdf3851e][1.12.1]] the default installation installs to each +version of Python it can find first. That is that it will currently +install for the first copies of Python versions 2.7, 3.4, 3.5, 3.6, +3.7 and 3.8 (dev branch) that it finds. Usually this will be in the +same prefix as GPGME itself, but is dictated by the =$PATH= when the +installation is performed. The above instructions can still be +performed on other python installations which the installer does not +find, including alternative prefixes. + + *** Won't Work With Windows :PROPERTIES: diff --git a/lang/python/doc/src/index.org b/lang/python/doc/src/index similarity index 96% rename from lang/python/doc/src/index.org rename to lang/python/doc/src/index index 701d986..9fe7a3c 100644 --- a/lang/python/doc/src/index.org +++ b/lang/python/doc/src/index @@ -1,3 +1,4 @@ +# -*- mode: org -*- #+TITLE: GNU Privacy Guard (GnuPG) Made Easy Python Bindings #+AUTHOR: Ben McGinnes #+LATEX_COMPILER: xelatex diff --git a/lang/python/doc/src/short-history.org b/lang/python/doc/src/short-history similarity index 99% rename from lang/python/doc/src/short-history.org rename to lang/python/doc/src/short-history index 587cb9f..ac5804d 100644 --- a/lang/python/doc/src/short-history.org +++ b/lang/python/doc/src/short-history @@ -1,3 +1,4 @@ +# -*- mode: org -*- #+TITLE: A Short History of the GPGME bindings for Python #+LATEX_COMPILER: xelatex #+LATEX_CLASS: article ----------------------------------------------------------------------- Summary of changes: .../doc/src/{gpgme-python-howto.org => gpgme-python-howto} | 13 ++++++++++++- lang/python/doc/src/{index.org => index} | 1 + lang/python/doc/src/{short-history.org => short-history} | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) rename lang/python/doc/src/{gpgme-python-howto.org => gpgme-python-howto} (99%) rename lang/python/doc/src/{index.org => index} (96%) rename lang/python/doc/src/{short-history.org => short-history} (99%) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Oct 30 17:43:08 2018 From: cvs at cvs.gnupg.org (by Ben McGinnes) Date: Tue, 30 Oct 2018 17:43:08 +0100 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-31-g78be1e2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 78be1e2f543667576a49286476e7d66a707dd17e (commit) from d5c22966d5bf397cccfa171095885cd207ef6ae3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 78be1e2f543667576a49286476e7d66a707dd17e Author: Ben McGinnes Date: Wed Oct 31 03:41:47 2018 +1100 docs: python docs restructure * Moved the what's new section out of the HOWTO (mostly), in anticipation of expanding the docs to be more than merely a HOWTO. diff --git a/lang/python/doc/src/gpgme-python-howto b/lang/python/doc/src/gpgme-python-howto index 1e83e09..ffcb1d4 100644 --- a/lang/python/doc/src/gpgme-python-howto +++ b/lang/python/doc/src/gpgme-python-howto @@ -77,78 +77,25 @@ major releases. :CUSTOM_ID: new-stuff :END: -The most obviously new point for those reading this guide is this -section on other new things, but that's hardly important. Not given -all the other things which spurred the need for adding this section -and its subsections. +Full details of what is new are now available in the [[file:what-is-new.org][What's New]] file +and archives of the preceding /What's New/ sections are available in +the [[file:what-was-new][What Was New]] file. + + +*** New in GPGME 1?13?0 + :PROPERTIES: + :CUSTOM_ID: new-stuff-1-13-0 + :END: + +See the [[file:what-is-new#new-stuff-1-13-0][What's New]] document for what is new in version 1.13.0. + *** New in GPGME 1?12?0 :PROPERTIES: :CUSTOM_ID: new-stuff-1-12-0 :END: -There have been quite a number of additions to GPGME and the Python -bindings to it since the last release of GPGME with versions 1.11.0 -and 1.11.1 in April, 2018. - -The bullet points of new additiions are: - -- an expanded section on [[#installation][installing]] and [[#snafu][troubleshooting]] the Python - bindings. -- The release of Python 3.7.0; which appears to be working just fine - with our bindings, in spite of intermittent reports of problems for - many other Python projects with that new release. -- Python 3.7 has been moved to the head of the specified python - versions list in the build process. -- In order to fix some other issues, there are certain underlying - functions which are more exposed through the [[#howto-get-context][gpg.Context()]], but - ongoing documentation ought to clarify that or otherwise provide the - best means of using the bindings. Some additions to =gpg.core= and - the =Context()=, however, were intended (see below). -- Continuing work in identifying and confirming the cause of - oft-reported [[#snafu-runtime-not-funtime][problems installing the Python bindings on Windows]]. -- GSOC: Google's Surreptitiously Ordered Conscription ... erm ... oh, - right; Google's Summer of Code. Though there were two hopeful - candidates this year; only one ended up involved with the GnuPG - Project directly, the other concentrated on an unrelated third party - project with closer ties to one of the GNU/Linux distributions than - to the GnuPG Project. Thus the Python bindings benefited from GSOC - participant Jacob Adams, who added the key_import function; building - on prior work by Tobias Mueller. -- Several new methods functions were added to the gpg.Context(), - including: [[#howto-import-key][key_import]], [[#howto-export-key][key_export]], [[#howto-export-public-key][key_export_minimal]] and - [[#howto-export-secret-key][key_export_secret]]. -- Importing and exporting examples include versions integrated with - Marcel Fest's recently released [[https://github.com/Selfnet/hkp4py][HKP for Python]] module. Some - [[#hkp4py][additional notes on this module]] are included at the end of the HOWTO. -- Instructions for dealing with semi-walled garden implementations - like ProtonMail are also included. This is intended to make things - a little easier when communicating with users of ProtonMail's - services and should not be construed as an endorsement of said - service. The GnuPG Project neither favours, nor disfavours - ProtonMail and the majority of this deals with interacting with the - ProtonMail keyserver. -- Semi-formalised the location where [[#draft-editions][draft versions]] of this HOWTO may - periodically be accessible. This is both for the reference of - others and testing the publishing of the document itself. Renamed - this file at around the same time. -- The Texinfo documentation build configuration has been replicated - from the parent project in order to make to maintain consistency - with that project (and actually ship with each release). -- a reStructuredText (=.rst=) version is also generated for Python - developers more used to and comfortable with that format as it is - the standard Python documentation format and Python developers may - wish to use it with Sphinx. Please note that there has been no - testing of the reStructuredText version with Sphinx at all. The - reST file was generated by the simple expedient of using [[https://pandoc.org/][Pandoc]]. -- Added a new section for [[#advanced-use][advanced or experimental use]]. -- Began the advanced use cases with [[#cython][a section]] on using the module with - [[https://cython.org/][Cython]]. -- Added a number of new scripts to the =example/howto/= directory; - some of which may be in advance of their planned sections of the - HOWTO (and some are just there because it seemed like a good idea at - the time). -- Cleaned up a lot of things under the hood. +See the [[file:what-was-new#new-stuff-1-12-0][What Was New]] document for what was new in version 1.12.0. * GPGME Concepts @@ -2983,15 +2930,16 @@ from the author at any of the following URLs: All of these draft versions except for one have been generated from this document via Emacs [[https://orgmode.org/][Org mode]] and [[https://www.gnu.org/software/texinfo/][GNU Texinfo]]. Though it is likely -that the specific [[https://files.au.adversary.org/crypto/gpgme-python-howto.org][file]] [[http://files.au.adversary.org/crypto/gpgme-python-howto.org][version]] used will be on the same server with +that the specific [[https://files.au.adversary.org/crypto/gpgme-python-howto][file]] [[http://files.au.adversary.org/crypto/gpgme-python-howto.org][version]] used will be on the same server with the generated output formats. The one exception is the reStructuredText version, which was converted using the latest version of Pandoc from the Org mode source file using -the following command: +either of the following two commands: #+BEGIN_SRC shell pandoc -f org -t rst -o gpgme-python-howto.rst gpgme-python-howto.org + pandoc -f org -t rst -o gpgme-python-howto.rst gpgme-python-howto #+END_SRC In addition to these there is a significantly less frequently updated @@ -3025,7 +2973,7 @@ PURPOSE. * Footnotes -[fn:1] =short-history.org= and/or =short-history.html=. +[fn:1] =short-history= and/or =short-history.html=. [fn:2] With no issues reported specific to Python 3.7, the release of Python 3.7.1 at around the same time as GPGME 1.12.0 and the testing diff --git a/lang/python/doc/src/index b/lang/python/doc/src/index index 9fe7a3c..18c9386 100644 --- a/lang/python/doc/src/index +++ b/lang/python/doc/src/index @@ -22,5 +22,5 @@ :END: -- [[file:short-history.org][A short history of the project]] -- [[file:gpgme-python-howto.org][GPGME Python Bindings HOWTO]] +- [[file:short-history][A short history of the project]] +- [[file:gpgme-python-howto][GPGME Python Bindings HOWTO]] diff --git a/lang/python/doc/src/what-is-new b/lang/python/doc/src/what-is-new new file mode 100644 index 0000000..4ca8ea8 --- /dev/null +++ b/lang/python/doc/src/what-is-new @@ -0,0 +1,43 @@ +# -*- mode: org -*- +#+TITLE: What's New in the GPGME Python Bindings and Documentation +#+AUTHOR: Ben McGinnes +#+LATEX_COMPILER: xelatex +#+LATEX_CLASS: article +#+LATEX_CLASS_OPTIONS: [12pt] +#+LATEX_HEADER: \usepackage{xltxtra} +#+LATEX_HEADER: \usepackage[margin=1in]{geometry} +#+LATEX_HEADER: \setmainfont[Ligatures={Common}]{Times New Roman} +#+LATEX_HEADER: \author{Ben McGinnes } + + +* What's New + :PROPERTIES: + :CUSTOM_ID: new-stuff + :END: + +| Version: | 0.0.1-draft | +| GPGME Version: | 1.13.0 | +| Author: | [[https://gnupg.org/people/index.html#sec-1-5][Ben McGinnes]] | +| Author GPG Key: | DB4724E6FA4286C92B4E55C4321E4E2373590E5D | +| Language: | Australian English, British English | +| xml:lang: | en-AU, en-GB, en | + +Last time the most obviously new thing was adding the /What's New/ +section to the HOWTO. Now it's moving it out of the HOWTO. Not to +mention expanding on the documentation both generally and +considerably. + + +** New in GPGME 1?13?0 + :PROPERTIES: + :CUSTOM_ID: new-stuff-1-13-0 + :END: + +Additions since GPGME 1.12.0 include: + +- An advanced HOWTO on using the bindings with web interfaces, + specifically Flask. +- Moving the /What's New/ section out of the basic [[file:gpgme-python-howto.org][HOWTO]] document and + into its own file so as to more readily include other documents + beyond that HOWTO. +- Moving the preceding, archival, segments into [[file:what-was-new.org][another file]]. diff --git a/lang/python/doc/src/what-was-new b/lang/python/doc/src/what-was-new new file mode 100644 index 0000000..666e5cc --- /dev/null +++ b/lang/python/doc/src/what-was-new @@ -0,0 +1,106 @@ +# -*- mode: org -*- +#+TITLE: What Was New in the GPGME Python Bindings and Documentation +#+AUTHOR: Ben McGinnes +#+LATEX_COMPILER: xelatex +#+LATEX_CLASS: article +#+LATEX_CLASS_OPTIONS: [12pt] +#+LATEX_HEADER: \usepackage{xltxtra} +#+LATEX_HEADER: \usepackage[margin=1in]{geometry} +#+LATEX_HEADER: \setmainfont[Ligatures={Common}]{Times New Roman} +#+LATEX_HEADER: \author{Ben McGinnes } + + +* What Was New + :PROPERTIES: + :CUSTOM_ID: new-stuff + :END: + +| Version: | 0.0.1-draft | +| GPGME Version: | 1.13.0 | +| Author: | [[https://gnupg.org/people/index.html#sec-1-5][Ben McGinnes]] | +| Author GPG Key: | DB4724E6FA4286C92B4E55C4321E4E2373590E5D | +| Language: | Australian English, British English | +| xml:lang: | en-AU, en-GB, en | + +The following are all the past /What's New/ sections for the Python +Bindings HOWTO and other documentation. + + +** What Was New in GPGME 1?12?0 + :PROPERTIES: + :CUSTOM_ID: gpgme-1-12-0 + :END: + +The most obviously new point for those reading this guide is this +section on other new things, but that?s hardly important. Not given +all the other things which spurred the need for adding this section +and its subsections. + + +*** New in GPGME 1?12?0 + :PROPERTIES: + :CUSTOM_ID: new-stuff-1-12-0 + :END: + +There have been quite a number of additions to GPGME and the Python +bindings to it since the last release of GPGME with versions 1.11.0 +and 1.11.1 in April, 2018. + +The bullet points of new additiions are: + +- an expanded section on [[#installation][installing]] and [[#snafu][troubleshooting]] the Python + bindings. +- The release of Python 3.7.0; which appears to be working just fine + with our bindings, in spite of intermittent reports of problems for + many other Python projects with that new release. +- Python 3.7 has been moved to the head of the specified python + versions list in the build process. +- In order to fix some other issues, there are certain underlying + functions which are more exposed through the [[#howto-get-context][gpg.Context()]], but + ongoing documentation ought to clarify that or otherwise provide the + best means of using the bindings. Some additions to =gpg.core= and + the =Context()=, however, were intended (see below). +- Continuing work in identifying and confirming the cause of + oft-reported [[#snafu-runtime-not-funtime][problems installing the Python bindings on Windows]]. +- GSOC: Google's Surreptitiously Ordered Conscription ... erm ... oh, + right; Google's Summer of Code. Though there were two hopeful + candidates this year; only one ended up involved with the GnuPG + Project directly, the other concentrated on an unrelated third party + project with closer ties to one of the GNU/Linux distributions than + to the GnuPG Project. Thus the Python bindings benefited from GSOC + participant Jacob Adams, who added the key_import function; building + on prior work by Tobias Mueller. +- Several new methods functions were added to the gpg.Context(), + including: [[#howto-import-key][key_import]], [[#howto-export-key][key_export]], [[#howto-export-public-key][key_export_minimal]] and + [[#howto-export-secret-key][key_export_secret]]. +- Importing and exporting examples include versions integrated with + Marcel Fest's recently released [[https://github.com/Selfnet/hkp4py][HKP for Python]] module. Some + [[#hkp4py][additional notes on this module]] are included at the end of the HOWTO. +- Instructions for dealing with semi-walled garden implementations + like ProtonMail are also included. This is intended to make things + a little easier when communicating with users of ProtonMail's + services and should not be construed as an endorsement of said + service. The GnuPG Project neither favours, nor disfavours + ProtonMail and the majority of this deals with interacting with the + ProtonMail keyserver. +- Semi-formalised the location where [[#draft-editions][draft versions]] of this HOWTO may + periodically be accessible. This is both for the reference of + others and testing the publishing of the document itself. Renamed + this file at around the same time. +- The Texinfo documentation build configuration has been replicated + from the parent project in order to make to maintain consistency + with that project (and actually ship with each release). +- a reStructuredText (=.rst=) version is also generated for Python + developers more used to and comfortable with that format as it is + the standard Python documentation format and Python developers may + wish to use it with Sphinx. Please note that there has been no + testing of the reStructuredText version with Sphinx at all. The + reST file was generated by the simple expedient of using [[https://pandoc.org/][Pandoc]]. +- Added a new section for [[#advanced-use][advanced or experimental use]]. +- Began the advanced use cases with [[#cython][a section]] on using the module with + [[https://cython.org/][Cython]]. +- Added a number of new scripts to the =example/howto/= directory; + some of which may be in advance of their planned sections of the + HOWTO (and some are just there because it seemed like a good idea at + the time). +- Cleaned up a lot of things under the hood. ----------------------------------------------------------------------- Summary of changes: lang/python/doc/src/gpgme-python-howto | 86 ++++++-------------------- lang/python/doc/src/index | 4 +- lang/python/doc/src/what-is-new | 43 +++++++++++++ lang/python/doc/src/what-was-new | 106 +++++++++++++++++++++++++++++++++ 4 files changed, 168 insertions(+), 71 deletions(-) create mode 100644 lang/python/doc/src/what-is-new create mode 100644 lang/python/doc/src/what-was-new hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 31 00:22:22 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 31 Oct 2018 00:22:22 +0100 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.7-248-gfd7aee6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via fd7aee6a97134fdf48a496841241f8ae25736e61 (commit) from b83fed64f8051279a8f36e024c1f12f7f13c4716 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fd7aee6a97134fdf48a496841241f8ae25736e61 Author: NIIBE Yutaka Date: Wed Oct 31 08:20:37 2018 +0900 build: Update *.m4 from libraries. * m4/gpg-error.m4: Update from master. * m4/ksba.m4: Ditto. * m4/libassuan.m4: Ditto. * m4/libgcrypt.m4: Ditto. * m4/npth.m4: Ditto. * m4/ntbtls.m4: Ditto. -- Signed-off-by: NIIBE Yutaka diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 index 8ba24b7..0964a26 100644 --- a/m4/gpg-error.m4 +++ b/m4/gpg-error.m4 @@ -1,5 +1,5 @@ # gpg-error.m4 - autoconf macro to detect libgpg-error. -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,7 +9,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-29 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, @@ -17,7 +17,7 @@ dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl dnl Test for libgpg-error and define GPG_ERROR_CFLAGS, GPG_ERROR_LIBS, dnl GPG_ERROR_MT_CFLAGS, and GPG_ERROR_MT_LIBS. The _MT_ variants are -dnl used for programs requiring real multi thread support. +dnl used for programs requireing real multi thread support. dnl dnl If a prefix option is not used, the config script is first dnl searched in $SYSROOT/bin and then along $PATH. If the used @@ -61,16 +61,28 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) - min_gpg_error_version=ifelse([$1], ,0.0,$1) - AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) + min_gpg_error_version=ifelse([$1], ,1.33,$1) ok=no - if test "$GPG_ERROR_CONFIG" != "no" \ - && test -f "$GPG_ERROR_CONFIG" ; then + + use_gpgrt_config="" + if test "$GPG_ERROR_CONFIG" = "no"; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` + fi + fi + else + gpg_error_config_version=`$GPG_ERROR_CONFIG --version` + fi + if test "$GPG_ERROR_CONFIG" != "no"; then req_major=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_gpg_error_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` - gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` major=`echo $gpg_error_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $gpg_error_config_version | \ @@ -84,23 +96,45 @@ AC_DEFUN([AM_PATH_GPG_ERROR], fi fi fi + if test -z "$GPGRT_CONFIG"; then + if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then + AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no) + if test "$GPGRT_CONFIG" != "no"; then + GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir" + GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" + use_gpgrt_config=yes + fi + fi + fi fi + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) if test $ok = yes; then - GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` - GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` - GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null` - GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null` + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs` + if test -z "$use_gpgrt_config"; then + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null` + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null` + else + GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --variable=mtcflags 2>/dev/null` + GPG_ERROR_MT_CFLAGS="$GPG_ERROR_CFLAGS${GPG_ERROR_CFLAGS:+ }$GPG_ERROR_MT_CFLAGS" + GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --variable=mtlibs 2>/dev/null` + GPG_ERROR_MT_LIBS="$GPG_ERROR_LIBS${GPG_ERROR_LIBS:+ }$GPG_ERROR_MT_LIBS" + fi AC_MSG_RESULT([yes ($gpg_error_config_version)]) ifelse([$2], , :, [$2]) - gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none` + else + gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$gpg_error_config_host" != xnone ; then if test x"$gpg_error_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $GPG_ERROR_CONFIG was +*** The config script "$GPG_ERROR_CONFIG" was *** built for $gpg_error_config_host and thus may not match the *** used host $host. -*** You may want to use the configure option --with-gpg-error-prefix +*** You may want to use the configure option --with-libgpg-error-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) gpg_config_script_warn="$gpg_config_script_warn libgpg-error" diff --git a/m4/ksba.m4 b/m4/ksba.m4 index 8cb49a3..ee4b962 100644 --- a/m4/ksba.m4 +++ b/m4/ksba.m4 @@ -1,5 +1,5 @@ # ksba.m4 - autoconf macro to detect ksba -# Copyright (C) 2002 g10 Code GmbH +# Copyright (C) 2002, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -13,27 +13,46 @@ dnl AM_PATH_KSBA([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libksba and define KSBA_CFLAGS and KSBA_LIBS -dnl MINIMUM-VERSION is a string with the version number optionally prefixed +dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed dnl with the API version to also check the API compatibility. Example: -dnl a MINIMUM-VERSION of 1:1.0.7 won't pass the test unless the installed +dnl a MINIMUN-VERSION of 1:1.0.7 won't pass the test unless the installed dnl version of libksba is at least 1.0.7 *and* the API number is 1. Using -dnl this feature prevents building against newer versions of libksba +dnl this features allows to prevent build against newer versions of libksba dnl with a changed API. dnl AC_DEFUN([AM_PATH_KSBA], -[AC_REQUIRE([AC_CANONICAL_HOST]) - AC_ARG_WITH(ksba-prefix, - AC_HELP_STRING([--with-ksba-prefix=PFX], - [prefix where KSBA is installed (optional)]), +[ AC_REQUIRE([AC_CANONICAL_HOST]) + dnl --with-libksba-prefix=PFX is the preferred name for this option, + dnl since that is consistent with how our three siblings use the directory/ + dnl package name in --with-$dir_name-prefix=PFX. + AC_ARG_WITH(libksba-prefix, + AC_HELP_STRING([--with-libksba-prefix=PFX], + [prefix where KSBA is installed (optional)]), ksba_config_prefix="$withval", ksba_config_prefix="") + + dnl Accept --with-ksba-prefix and make it work the same as + dnl --with-libksba-prefix above, for backwards compatibility, + dnl but do not document this old, inconsistently-named option. + AC_ARG_WITH(ksba-prefix,, + ksba_config_prefix="$withval", ksba_config_prefix="") + if test x$ksba_config_prefix != x ; then - ksba_config_args="$ksba_config_args --prefix=$ksba_config_prefix" - if test x${KSBA_CONFIG+set} != xset ; then - KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config - fi + if test x${KSBA_CONFIG+set} != xset ; then + KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config + fi + fi + + use_gpgrt_config="" + if test x"$KSBA_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG ksba --exists; then + KSBA_CONFIG="$GPGRT_CONFIG ksba" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(KSBA_CONFIG, ksba-config, no) fi - AC_PATH_PROG(KSBA_CONFIG, ksba-config, no) tmp=ifelse([$1], ,1:1.0.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -52,7 +71,11 @@ AC_DEFUN([AM_PATH_KSBA], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ksba_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ksba_config_version=`$KSBA_CONFIG $ksba_config_args --version` + if test -z "$use_gpgrt_config"; then + ksba_config_version=`$KSBA_CONFIG --version` + else + ksba_config_version=`$KSBA_CONFIG --modversion` + fi major=`echo $ksba_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ksba_config_version | \ @@ -84,7 +107,11 @@ AC_DEFUN([AM_PATH_KSBA], # Even if we have a recent libksba, we should check that the # API is compatible. if test "$req_ksba_api" -gt 0 ; then - tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`$KSBA_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([KSBA API version]) if test "$req_ksba_api" -eq "$tmp" ; then @@ -97,15 +124,19 @@ AC_DEFUN([AM_PATH_KSBA], fi fi if test $ok = yes; then - KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags` - KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs` + KSBA_CFLAGS=`$KSBA_CONFIG --cflags` + KSBA_LIBS=`$KSBA_CONFIG --libs` ifelse([$2], , :, [$2]) - libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libksba_config_host=`$KSBA_CONFIG --host 2>/dev/null || echo none` + else + libksba_config_host=`$KSBA_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libksba_config_host" != xnone ; then if test x"$libksba_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $LIBKSBA_CONFIG was +*** The config script "$KSBA_CONFIG" was *** built for $libksba_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libksba-prefix diff --git a/m4/libassuan.m4 b/m4/libassuan.m4 index 004eee3..52058ea 100644 --- a/m4/libassuan.m4 +++ b/m4/libassuan.m4 @@ -1,5 +1,5 @@ dnl Autoconf macros for libassuan -dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc. dnl dnl This file is free software; as a special exception the author gives dnl unlimited permission to copy and/or distribute it, with or without @@ -8,23 +8,34 @@ dnl dnl This file is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +dnl SPDX-License-Identifier: FSFULLR dnl dnl Common code used for libassuan detection [internal] dnl Returns ok set to yes or no. dnl AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], -[ AC_ARG_WITH(libassuan-prefix, +[ AC_REQUIRE([AC_CANONICAL_HOST]) + AC_ARG_WITH(libassuan-prefix, AC_HELP_STRING([--with-libassuan-prefix=PFX], [prefix where LIBASSUAN is installed (optional)]), libassuan_config_prefix="$withval", libassuan_config_prefix="") if test x$libassuan_config_prefix != x ; then - libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix" if test x${LIBASSUAN_CONFIG+set} != xset ; then LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config fi fi - AC_PATH_PROG(LIBASSUAN_CONFIG, libassuan-config, no) + + use_gpgrt_config="" + if test x"${LIBASSUAN_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG libassuan --exists; then + LIBASSUAN_CONFIG="$GPGRT_CONFIG libassuan" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(LIBASSUAN_CONFIG, libassuan-config, no) + fi tmp=ifelse([$1], ,1:0.9.2,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then @@ -35,55 +46,60 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], min_libassuan_version="$tmp" fi - if test "$LIBASSUAN_CONFIG" != "no" ; then - libassuan_version=`$LIBASSUAN_CONFIG --version` - fi - libassuan_version_major=`echo $libassuan_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` - libassuan_version_minor=`echo $libassuan_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` - libassuan_version_micro=`echo $libassuan_version | \ - sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` - - AC_MSG_CHECKING(for LIBASSUAN ifelse([$2], ,,[$2 ])- version >= $min_libassuan_version) + AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version) ok=no - if test "$LIBASSUAN_CONFIG" != "no" ; then - ifelse([$2], ,,[if `$LIBASSUAN_CONFIG --thread=$2 2> /dev/null` ; then]) + if test "$LIBASSUAN_CONFIG" != "no"; then req_major=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libassuan_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - if test "$libassuan_version_major" -gt "$req_major"; then + + if test -z "$use_gpgrt_config"; then + libassuan_config_version=`$LIBASSUAN_CONFIG --version` + else + libassuan_config_version=`$LIBASSUAN_CONFIG --modversion` + fi + major=`echo $libassuan_config_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` + minor=`echo $libassuan_config_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` + micro=`echo $libassuan_config_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` + + if test "$major" -gt "$req_major"; then ok=yes - else - if test "$libassuan_version_major" -eq "$req_major"; then - if test "$libassuan_version_minor" -gt "$req_minor"; then + else + if test "$major" -eq "$req_major"; then + if test "$minor" -gt "$req_minor"; then ok=yes else - if test "$libassuan_version_minor" -eq "$req_minor"; then - if test "$libassuan_version_micro" -ge "$req_micro"; then + if test "$minor" -eq "$req_minor"; then + if test "$micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi - ifelse([$2], ,,[fi]) fi if test $ok = yes; then - AC_MSG_RESULT([yes ($libassuan_version)]) + AC_MSG_RESULT([yes ($libassuan_config_version)]) else AC_MSG_RESULT(no) fi if test $ok = yes; then if test "$req_libassuan_api" -gt 0 ; then - tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`$LIBASSUAN_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then - AC_MSG_CHECKING([LIBASSUAN ifelse([$2], ,,[$2 ])API version]) + AC_MSG_CHECKING([LIBASSUAN API version]) if test "$req_libassuan_api" -eq "$tmp" ; then AC_MSG_RESULT(okay) else @@ -94,6 +110,27 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON], fi fi + if test $ok = yes; then + if test x"$host" != x ; then + if test -z "$use_gpgrt_config"; then + libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none` + else + libassuan_config_host=`$LIBASSUAN_CONFIG --variable=host 2>/dev/null || echo none` + fi + if test x"$libassuan_config_host" != xnone ; then + if test x"$libassuan_config_host" != x"$host" ; then + AC_MSG_WARN([[ +*** +*** The config script "$LIBASSUAN_CONFIG" was +*** built for $libassuan_config_host and thus may not match the +*** used host $host. +*** You may want to use the configure option --with-libassuan-prefix +*** to specify a matching config script. +***]]) + fi + fi + fi + fi ]) dnl AM_CHECK_LIBASSUAN([MINIMUM-VERSION, @@ -120,8 +157,8 @@ dnl AC_DEFUN([AM_PATH_LIBASSUAN], [ _AM_PATH_LIBASSUAN_COMMON($1) if test $ok = yes; then - LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags` - LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs` + LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG --cflags` + LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG --libs` ifelse([$2], , :, [$2]) else LIBASSUAN_CFLAGS="" @@ -131,45 +168,3 @@ AC_DEFUN([AM_PATH_LIBASSUAN], AC_SUBST(LIBASSUAN_CFLAGS) AC_SUBST(LIBASSUAN_LIBS) ]) - - -dnl AM_PATH_LIBASSUAN_PTH([MINIMUM-VERSION, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) -dnl Test for libassuan and define LIBASSUAN_PTH_CFLAGS and LIBASSUAN_PTH_LIBS -dnl -AC_DEFUN([AM_PATH_LIBASSUAN_PTH], -[ _AM_PATH_LIBASSUAN_COMMON($1,pth) - if test $ok = yes; then - LIBASSUAN_PTH_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pth --cflags` - LIBASSUAN_PTH_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pth --libs` - ifelse([$2], , :, [$2]) - else - LIBASSUAN_PTH_CFLAGS="" - LIBASSUAN_PTH_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(LIBASSUAN_PTH_CFLAGS) - AC_SUBST(LIBASSUAN_PTH_LIBS) -]) - - -dnl AM_PATH_LIBASSUAN_PTHREAD([MINIMUM-VERSION, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) -dnl Test for libassuan and define LIBASSUAN_PTHREAD_CFLAGS -dnl and LIBASSUAN_PTHREAD_LIBS -dnl -AC_DEFUN([AM_PATH_LIBASSUAN_PTHREAD], -[ _AM_PATH_LIBASSUAN_COMMON($1,pthread) - if test $ok = yes; then - LIBASSUAN_PTHREAD_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pthread --cflags` - LIBASSUAN_PTHREAD_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pthread --libs` - ifelse([$2], , :, [$2]) - else - LIBASSUAN_PTHREAD_CFLAGS="" - LIBASSUAN_PTHREAD_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(LIBASSUAN_PTHREAD_CFLAGS) - AC_SUBST(LIBASSUAN_PTHREAD_LIBS) -]) - diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4 index dd167f8..2646e96 100644 --- a/m4/libgcrypt.m4 +++ b/m4/libgcrypt.m4 @@ -1,5 +1,5 @@ # libgcrypt.m4 - Autoconf macros to detect libgcrypt -# Copyright (C) 2002, 2003, 2004, 2011, 2014 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -9,17 +9,17 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# Last-changed: 2014-10-02 +# Last-changed: 2018-10-29 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. -dnl MINIMUM-VERSION is a string with the version number optionally prefixed +dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed dnl with the API version to also check the API compatibility. Example: -dnl a MINIMUM-VERSION of 1:1.2.5 won't pass the test unless the installed +dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using -dnl this feature prevents building against newer versions of libgcrypt +dnl this features allows to prevent build against newer versions of libgcrypt dnl with a changed API. dnl dnl If a prefix option is not used, the config script is first @@ -52,7 +52,17 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], fi fi - AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) + use_gpgrt_config="" + if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG libgcrypt --exists; then + LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) + fi + tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -71,7 +81,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` + if test -z "$use_gpgrt_config"; then + libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` + else + libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` + fi major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ @@ -103,7 +117,11 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then - tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then @@ -119,12 +137,16 @@ AC_DEFUN([AM_PATH_LIBGCRYPT], LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) - libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` + else + libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $LIBGCRYPT_CONFIG was +*** The config script "$LIBGCRYPT_CONFIG" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix diff --git a/m4/npth.m4 b/m4/npth.m4 index 17c2644..7296cbc 100644 --- a/m4/npth.m4 +++ b/m4/npth.m4 @@ -1,5 +1,5 @@ # npth.m4 - autoconf macro to detect NPTH. -# Copyright (C) 2002, 2003, 2004, 2011 g10 Code GmbH +# Copyright (C) 2002, 2003, 2004, 2011, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -17,10 +17,24 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG], if test "x$npth_config_prefix" != x ; then NPTH_CONFIG="$npth_config_prefix/bin/npth-config" fi - AC_PATH_PROG(NPTH_CONFIG, npth-config, no) + + use_gpgrt_config="" + if test x"$NPTH_CONFIG" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG npth --exists; then + NPTH_CONFIG="$GPGRT_CONFIG npth" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(NPTH_CONFIG, npth-config, no) + fi if test "$NPTH_CONFIG" != "no" ; then - npth_version=`$NPTH_CONFIG --version` + if test -z "$use_gpgrt_config"; then + npth_version=`$NPTH_CONFIG --version` + else + npth_version=`$NPTH_CONFIG --modversion` + fi fi npth_version_major=`echo $npth_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` @@ -70,31 +84,39 @@ AC_DEFUN([AM_PATH_NPTH], AC_MSG_RESULT(no) fi if test $ok = yes; then - # If we have a recent NPTH, we should also check that the - # API is compatible. - if test "$req_npth_api" -gt 0 ; then + # If we have a recent NPTH, we should also check that the + # API is compatible. + if test "$req_npth_api" -gt 0 ; then + if test -z "$use_gpgrt_config"; then tmp=`$NPTH_CONFIG --api-version 2>/dev/null || echo 0` - if test "$tmp" -gt 0 ; then - AC_MSG_CHECKING([NPTH API version]) - if test "$req_npth_api" -eq "$tmp" ; then - AC_MSG_RESULT([okay]) - else - ok=no - AC_MSG_RESULT([does not match. want=$req_npth_api got=$tmp]) - fi + else + tmp=`$NPTH_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi + if test "$tmp" -gt 0 ; then + AC_MSG_CHECKING([NPTH API version]) + if test "$req_npth_api" -eq "$tmp" ; then + AC_MSG_RESULT([okay]) + else + ok=no + AC_MSG_RESULT([does not match. want=$req_npth_api got=$tmp]) fi - fi + fi + fi fi if test $ok = yes; then NPTH_CFLAGS=`$NPTH_CONFIG --cflags` NPTH_LIBS=`$NPTH_CONFIG --libs` ifelse([$2], , :, [$2]) - npth_config_host=`$NPTH_CONFIG --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + npth_config_host=`$NPTH_CONFIG --host 2>/dev/null || echo none` + else + npth_config_host=`$NPTH_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$npth_config_host" != xnone ; then if test x"$npth_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $NPTH_CONFIG was +*** The config script "$NPTH_CONFIG" was *** built for $npth_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-npth-prefix diff --git a/m4/ntbtls.m4 b/m4/ntbtls.m4 index 4a4b5da..c4e07dc 100644 --- a/m4/ntbtls.m4 +++ b/m4/ntbtls.m4 @@ -14,11 +14,11 @@ dnl AM_PATH_NTBTLS([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl dnl Test for NTBTLS and define NTBTLS_CFLAGS and NTBTLS_LIBS. -dnl MINIMUM-VERSION is a string with the version number optionally prefixed +dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed dnl with the API version to also check the API compatibility. Example: -dnl a MINIMUM-VERSION of 1:1.2.5 won't pass the test unless the installed -dnl version of ntbtls is at least 1.2.5 *and* the API number is 1. Using -dnl this feature prevents building against newer versions of ntbtls +dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed +dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using +dnl this features allows to prevent build against newer versions of libgcrypt dnl with a changed API. dnl AC_DEFUN([AM_PATH_NTBTLS], @@ -46,7 +46,17 @@ AC_DEFUN([AM_PATH_NTBTLS], fi fi - AC_PATH_PROG(NTBTLS_CONFIG, ntbtls-config, no) + use_gpgrt_config="" + if test x"${NTBTLS_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then + if $GPGRT_CONFIG ntbtls --exists; then + NTBTLS_CONFIG="$GPGRT_CONFIG ntbtls" + use_gpgrt_config=yes + fi + fi + if test -z "$use_gpgrt_config"; then + AC_PATH_PROG(NTBTLS_CONFIG, ntbtls-config, no) + fi + tmp=ifelse([$1], ,1:1.0.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_ntbtls_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` @@ -65,7 +75,11 @@ AC_DEFUN([AM_PATH_NTBTLS], sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_ntbtls_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` - ntbtls_config_version=`$NTBTLS_CONFIG --version` + if test -z "$use_gpgrt_config"; then + ntbtls_config_version=`$NTBTLS_CONFIG --version` + else + ntbtls_config_version=`$NTBTLS_CONFIG --modversion` + fi major=`echo $ntbtls_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $ntbtls_config_version | \ @@ -97,7 +111,11 @@ AC_DEFUN([AM_PATH_NTBTLS], # If we have a recent ntbtls, we should also check that the # API is compatible if test "$req_ntbtls_api" -gt 0 ; then - tmp=`$NTBTLS_CONFIG --api-version 2>/dev/null || echo 0` + if test -z "$use_gpgrt_config"; then + tmp=`$NTBTLS_CONFIG --api-version 2>/dev/null || echo 0` + else + tmp=`$NTBTLS_CONFIG --variable=api_version 2>/dev/null || echo 0` + fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([NTBTLS API version]) if test "$req_ntbtls_api" -eq "$tmp" ; then @@ -113,12 +131,16 @@ AC_DEFUN([AM_PATH_NTBTLS], NTBTLS_CFLAGS=`$NTBTLS_CONFIG --cflags` NTBTLS_LIBS=`$NTBTLS_CONFIG --libs` ifelse([$2], , :, [$2]) - ntbtls_config_host=`$NTBTLS_CONFIG --host 2>/dev/null || echo none` + if test -z "$use_gpgrt_config"; then + ntbtls_config_host=`$NTBTLS_CONFIG --host 2>/dev/null || echo none` + else + ntbtls_config_host=`$NTBTLS_CONFIG --variable=host 2>/dev/null || echo none` + fi if test x"$ntbtls_config_host" != xnone ; then if test x"$ntbtls_config_host" != x"$host" ; then AC_MSG_WARN([[ *** -*** The config script $NTBTLS_CONFIG was +*** The config script "$NTBTLS_CONFIG" was *** built for $ntbtls_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-ntbtls-prefix ----------------------------------------------------------------------- Summary of changes: m4/gpg-error.m4 | 64 +++++++++++++++++++------- m4/ksba.m4 | 69 ++++++++++++++++++++-------- m4/libassuan.m4 | 137 +++++++++++++++++++++++++++----------------------------- m4/libgcrypt.m4 | 42 ++++++++++++----- m4/npth.m4 | 56 ++++++++++++++++------- m4/ntbtls.m4 | 40 +++++++++++++---- 6 files changed, 267 insertions(+), 141 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 31 08:56:33 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 31 Oct 2018 08:56:33 +0100 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-44-g2e9ee74 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 2e9ee747ac81434ca542291287eb56c9025f0a39 (commit) from 93d45f7e7e937020c796781705516a4b62e6589a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2e9ee747ac81434ca542291287eb56c9025f0a39 Author: NIIBE Yutaka Date: Wed Oct 31 16:55:53 2018 +0900 gpgrt-config: Fix typo in the script. * src/gpgrt-config: Add missing $ for libdir_option. Signed-off-by: NIIBE Yutaka diff --git a/src/gpgrt-config b/src/gpgrt-config index 1524677..9ff0b3a 100755 --- a/src/gpgrt-config +++ b/src/gpgrt-config @@ -480,7 +480,7 @@ EOF fi # --libdir option has precedence over the env var. -if [ -n "libdir_option" ]; then +if [ -n "$libdir_option" ]; then libdir=$(substitute_vars $libdir_option) PKG_CONFIG_LIBDIR=$libdir/pkgconfig fi ----------------------------------------------------------------------- Summary of changes: src/gpgrt-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 31 12:00:48 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 31 Oct 2018 12:00:48 +0100 Subject: [git] GPGME - branch, master, updated. gpgme-1.12.0-32-g2e07d4f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 2e07d4f89a26bb56a55b2743d39fb37532028ffd (commit) from 78be1e2f543667576a49286476e7d66a707dd17e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2e07d4f89a26bb56a55b2743d39fb37532028ffd Author: Werner Koch Date: Wed Oct 31 11:57:45 2018 +0100 w32: Remove cruft in w32-io from WindowsME times. * src/w32-io.c (set_synchronize): Remove. (create_reader, create_writer): No need for set_synchronize. -- The set_synchronize dates back to 2001 at a time when I wrote the Windows support on WindowsME and Windows2000. Maybe this was required then due to bugs in that old NT or partly NT based Windows versions. Signed-off-by: Werner Koch diff --git a/src/w32-io.c b/src/w32-io.c index 52327af..aea0547 100644 --- a/src/w32-io.c +++ b/src/w32-io.c @@ -247,33 +247,6 @@ get_desired_thread_priority (void) } -static HANDLE -set_synchronize (HANDLE hd) -{ -#ifdef HAVE_W32CE_SYSTEM - return hd; -#else - HANDLE new_hd; - - /* For NT we have to set the sync flag. It seems that the only way - to do it is by duplicating the handle. Tsss... */ - if (!DuplicateHandle (GetCurrentProcess (), hd, - GetCurrentProcess (), &new_hd, - EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, 0)) - { - TRACE1 (DEBUG_SYSIO, "gpgme:set_synchronize", hd, - "DuplicateHandle failed: ec=%d", (int) GetLastError ()); - /* FIXME: Should translate the error code. */ - gpg_err_set_errno (EIO); - return INVALID_HANDLE_VALUE; - } - - CloseHandle (hd); - return new_hd; -#endif -} - - static DWORD CALLBACK reader (void *arg) { @@ -470,7 +443,6 @@ create_reader (int fd) return NULL; } - ctx->have_data_ev = set_synchronize (ctx->have_data_ev); INIT_LOCK (ctx->mutex); #ifdef HAVE_W32CE_SYSTEM @@ -843,7 +815,6 @@ create_writer (int fd) return NULL; } - ctx->is_empty = set_synchronize (ctx->is_empty); INIT_LOCK (ctx->mutex); #ifdef HAVE_W32CE_SYSTEM ----------------------------------------------------------------------- Summary of changes: src/w32-io.c | 29 ----------------------------- 1 file changed, 29 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Wed Oct 31 14:20:24 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 31 Oct 2018 14:20:24 +0100 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-45-g5b898b8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 5b898b8bc89c18e2fd02e6c9efd5e91cb96357cc (commit) from 2e9ee747ac81434ca542291287eb56c9025f0a39 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5b898b8bc89c18e2fd02e6c9efd5e91cb96357cc Author: Andre Heinecke Date: Wed Oct 31 14:18:35 2018 +0100 w32: Remove cruft in w32-estream from olden times. * src/w32-io.c (set_synchronize): Remove. (create_reader, create_writer): No need for set_synchronize. -- The set_synchronize dates back to 2001 at a time when gpgme got the Windows support on WindowsME and Windows2000. Maybe this was required then due to bugs in that old NT or partly NT based Windows versions. Removal similar to the removal in gpgme's w32-io. diff --git a/src/w32-estream.c b/src/w32-estream.c index 6f916b0..5d29b2c 100644 --- a/src/w32-estream.c +++ b/src/w32-estream.c @@ -119,32 +119,6 @@ struct estream_cookie_w32_pollable }; -static HANDLE -set_synchronize (HANDLE hd) -{ -#ifdef HAVE_W32CE_SYSTEM - return hd; -#else - HANDLE new_hd; - - /* For NT we have to set the sync flag. It seems that the only way - to do it is by duplicating the handle. Tsss... */ - if (!DuplicateHandle (GetCurrentProcess (), hd, - GetCurrentProcess (), &new_hd, - EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, 0)) - { - trace_errno (1, ("DuplicateHandle failed: ec=%d", (int)GetLastError ())); - /* FIXME: Should translate the error code. */ - _gpg_err_set_errno (EIO); - return INVALID_HANDLE_VALUE; - } - - CloseHandle (hd); - return new_hd; -#endif -} - - static DWORD CALLBACK reader (void *arg) { @@ -289,7 +263,6 @@ create_reader (estream_cookie_w32_pollable_t pcookie) return NULL; } - ctx->have_data_ev = set_synchronize (ctx->have_data_ev); InitializeCriticalSection (&ctx->mutex); #ifdef HAVE_W32CE_SYSTEM @@ -593,7 +566,6 @@ create_writer (estream_cookie_w32_pollable_t pcookie) return NULL; } - ctx->is_empty = set_synchronize (ctx->is_empty); InitializeCriticalSection (&ctx->mutex); #ifdef HAVE_W32CE_SYSTEM ----------------------------------------------------------------------- Summary of changes: src/w32-estream.c | 28 ---------------------------- 1 file changed, 28 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org