From cvs at cvs.gnupg.org Mon Apr 2 10:45:06 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Mon, 02 Apr 2018 10:45:06 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-41-ga17d2d1 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 a17d2d1f690ebe5d005b4589a5fe378b6487c657 (commit) from 6705ee42a4bd89eea3f959f75d3c14a69c1249a3 (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 a17d2d1f690ebe5d005b4589a5fe378b6487c657 Author: NIIBE Yutaka Date: Mon Apr 2 17:41:50 2018 +0900 g10: Fix filtering by PK->REQ_USAGE. * g10/getkey.c (get_pubkey_byfprint): Filter by PK->REQ_USAGE. -- GnuPG-bug-id: 3844 Signed-off-by: NIIBE Yutaka diff --git a/g10/getkey.c b/g10/getkey.c index dabd052..0405d1d 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -1810,6 +1810,8 @@ get_pubkey_byfprint (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock, ctx.items[0].mode = fprint_len == 16 ? KEYDB_SEARCH_MODE_FPR16 : KEYDB_SEARCH_MODE_FPR20; memcpy (ctx.items[0].u.fpr, fprint, fprint_len); + if (pk) + ctx.req_usage = pk->req_usage; rc = lookup (ctrl, &ctx, 0, &kb, &found_key); if (!rc && pk) pk_from_block (pk, kb, found_key); ----------------------------------------------------------------------- Summary of changes: g10/getkey.c | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 3 13:31:22 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 03 Apr 2018 13:31:22 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-42-gcb1731c 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 cb1731c23cddfa524d3f51cfd82029bff853a073 (commit) from a17d2d1f690ebe5d005b4589a5fe378b6487c657 (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 cb1731c23cddfa524d3f51cfd82029bff853a073 Author: NIIBE Yutaka Date: Tue Apr 3 20:30:29 2018 +0900 scd: Writing KDF resets auth state. * scd/app-openpgp.c (do_setattr): Clear auth state. Signed-off-by: NIIBE Yutaka diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index ab57d90..9fcfa19 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -2459,7 +2459,7 @@ 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 }, - { "KDF", 0x00F9, 3, 0, 1 }, + { "KDF", 0x00F9, 3, 4, 1 }, { NULL, 0 } }; int exmode; @@ -2507,6 +2507,12 @@ do_setattr (app_t app, const char *name, app->force_chv1 = (valuelen && *value == 0); else if (table[idx].special == 2) parse_login_data (app); + else if (table[idx].special == 4) + { + app->did_chv1 = 0; + app->did_chv2 = 0; + app->did_chv3 = 0; + } return rc; } ----------------------------------------------------------------------- Summary of changes: scd/app-openpgp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 4 11:23:27 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 04 Apr 2018 11:23:27 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.10.0-183-g5eb261d 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 5eb261d6028ab2c0ddd9af8e3e1f82e479c6109c (commit) from fed024eff1091056647296ac589a0c88c2be41bb (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 5eb261d6028ab2c0ddd9af8e3e1f82e479c6109c Author: Andre Heinecke Date: Wed Apr 4 11:21:53 2018 +0200 qt: Add test for resetting config value * lang/qt/tests/t-config.cpp (CryptoConfigTest::testDefault): New. -- There is a bug around here somewhere. This test does not show it :-( diff --git a/lang/qt/tests/t-config.cpp b/lang/qt/tests/t-config.cpp index e04a6bb..afbb4d1 100644 --- a/lang/qt/tests/t-config.cpp +++ b/lang/qt/tests/t-config.cpp @@ -39,6 +39,8 @@ #include "t-support.h" #include "protocol.h" #include "cryptoconfig.h" +#include "engineinfo.h" + #include using namespace QGpgME; @@ -51,7 +53,7 @@ private Q_SLOTS: void testKeyserver() { // Repeatedly set a config value and clear it - // this war broken at some point so it gets a + // this was broken at some point so it gets a // unit test. for (int i = 0; i < 10; i++) { auto conf = cryptoConfig(); @@ -78,6 +80,36 @@ private Q_SLOTS: } } + void testDefault() + { + if (GpgME::engineInfo(GpgME::GpgEngine).engineVersion() < "2.2.0") { + // We are using compliance here and other options might also + // be unsupported in older versions. + return; + } + // First set compliance to de-vs + auto conf = cryptoConfig(); + QVERIFY(conf); + auto entry = conf->entry(QStringLiteral("gpg"), + QStringLiteral("Configuration"), + QStringLiteral("compliance")); + QVERIFY(entry); + entry->setStringValue("de-vs"); + conf->sync(true); + conf->clear(); + entry = conf->entry(QStringLiteral("gpg"), + QStringLiteral("Configuration"), + QStringLiteral("compliance")); + QCOMPARE(entry->stringValue(), QStringLiteral("de-vs")); + entry->resetToDefault(); + conf->sync(true); + conf->clear(); + entry = conf->entry(QStringLiteral("gpg"), + QStringLiteral("Configuration"), + QStringLiteral("compliance")); + QCOMPARE(entry->stringValue(), QStringLiteral("gnupg")); + } + void initTestCase() { QGpgMETest::initTestCase(); ----------------------------------------------------------------------- Summary of changes: lang/qt/tests/t-config.cpp | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 4 13:37:40 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 04 Apr 2018 13:37:40 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-43-g83529e1 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 83529e1bd14a6d39f2a8ecab9fb6aa4c1f344c73 (commit) from cb1731c23cddfa524d3f51cfd82029bff853a073 (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 83529e1bd14a6d39f2a8ecab9fb6aa4c1f344c73 Author: NIIBE Yutaka Date: Wed Apr 4 20:27:08 2018 +0900 tests: Fix no gpg-agent upon removal of GNUPGHOME. * tests/gpgscm/gnupg.scm (with-ephemeral-home-directory): Add teadown-fn. * tests/gpgsm/export.scm: Use -no-atexit version and stop-agent. * tests/openpgp/decrypt-session-key.scm: Likewise. * tests/openpgp/decrypt-unwrap-verify.scm: Likewise. * tests/openpgp/defs.scm (have-opt-always-trust): Likewise. (setup-environment-no-atexit): New. (start-agent): Support no use of atexit. * tests/gpgsm/gpgsm-defs.scm (setup-gpgsm-environment-no-atexit): New. * tests/migrations/common.scm (untar-armored): Follow the change of with-ephemeral-home-directory. -- When gpg-agent detects homedir removal, it will automatically exit. Then, call of 'gpgconf --kill all' will fail. So, stop-agent should be called before the removal of homedir. Signed-off-by: NIIBE Yutaka diff --git a/tests/gpgscm/gnupg.scm b/tests/gpgscm/gnupg.scm index 5fcf9fd..77bf479 100644 --- a/tests/gpgscm/gnupg.scm +++ b/tests/gpgscm/gnupg.scm @@ -28,17 +28,22 @@ ;; Evaluate a sequence of expressions with an ephemeral home ;; directory. -(define-macro (with-ephemeral-home-directory setup-fn . expressions) +(define-macro (with-ephemeral-home-directory setup-fn teardown-fn . expressions) (let ((original-home-directory (gensym)) (ephemeral-home-directory (gensym)) - (setup (gensym))) + (setup (gensym)) + (teardown (gensym))) `(let ((,original-home-directory (getenv "GNUPGHOME")) (,ephemeral-home-directory (mkdtemp)) - (,setup (delay (,setup-fn)))) + (,setup (delay (,setup-fn))) + (,teardown (delay (,teardown-fn)))) (finally (unlink-recursively ,ephemeral-home-directory) (dynamic-wind (lambda () (setenv "GNUPGHOME" ,ephemeral-home-directory #t) (with-working-directory ,ephemeral-home-directory (force ,setup))) (lambda () , at expressions) - (lambda () (setenv "GNUPGHOME" ,original-home-directory #t))))))) + (lambda () + (setenv "GNUPGHOME" ,ephemeral-home-directory #t) + (with-working-directory ,ephemeral-home-directory (force ,teardown)) + (setenv "GNUPGHOME" ,original-home-directory #t))))))) diff --git a/tests/gpgsm/export.scm b/tests/gpgsm/export.scm index d29b6cc..4a8108b 100644 --- a/tests/gpgsm/export.scm +++ b/tests/gpgsm/export.scm @@ -25,7 +25,7 @@ (lambda (cert) (lettmp (exported) (call-check `(, at gpgsm --output ,exported --export ,cert::uid::CN)) - (with-ephemeral-home-directory setup-gpgsm-environment + (with-ephemeral-home-directory setup-gpgsm-environment-no-atexit stop-agent (call-check `(, at gpgsm --import ,exported)) (assert (sm-have-public-key? cert))))) (lambda (cert) cert::uid::CN) diff --git a/tests/gpgsm/gpgsm-defs.scm b/tests/gpgsm/gpgsm-defs.scm index c78a127..f118642 100644 --- a/tests/gpgsm/gpgsm-defs.scm +++ b/tests/gpgsm/gpgsm-defs.scm @@ -99,3 +99,9 @@ (call-check `(,(tool 'gpgtar) --extract --directory=. ,(cadr *args*))) (create-gpgsm-gpghome)) (start-agent)) + +(define (setup-gpgsm-environment-no-atexit) + (if (member "--unpack-tarball" *args*) + (call-check `(,(tool 'gpgtar) --extract --directory=. ,(cadr *args*))) + (create-gpgsm-gpghome)) + (start-agent #t)) diff --git a/tests/migrations/common.scm b/tests/migrations/common.scm index 54d33b9..cabfdff 100644 --- a/tests/migrations/common.scm +++ b/tests/migrations/common.scm @@ -39,7 +39,7 @@ (define GPGTAR (path-join (getenv "objdir") "tools" (qualify "gpgtar"))) (define (untar-armored source-name) - (with-ephemeral-home-directory (lambda ()) + (with-ephemeral-home-directory (lambda ()) (lambda ()) (pipe:do (pipe:open source-name (logior O_RDONLY O_BINARY)) (pipe:spawn `(, at GPG --dearmor)) diff --git a/tests/openpgp/decrypt-session-key.scm b/tests/openpgp/decrypt-session-key.scm index 35aa7f3..c3294e0 100755 --- a/tests/openpgp/decrypt-session-key.scm +++ b/tests/openpgp/decrypt-session-key.scm @@ -37,7 +37,7 @@ (lambda (name) (let* ((source (in-srcdir "tests" "openpgp" (string-append name ".asc"))) (key (get-session-key source))) - (with-ephemeral-home-directory setup-environment + (with-ephemeral-home-directory setup-environment-no-atexit stop-agent (tr:do (tr:open source) (tr:gpg "" `(--yes --decrypt --override-session-key ,key)) diff --git a/tests/openpgp/decrypt-unwrap-verify.scm b/tests/openpgp/decrypt-unwrap-verify.scm index bf7d14d..addc2da 100755 --- a/tests/openpgp/decrypt-unwrap-verify.scm +++ b/tests/openpgp/decrypt-unwrap-verify.scm @@ -35,7 +35,7 @@ ;; Then, verify the signature with a clean working directory ;; containing only Steve's public key. - (with-ephemeral-home-directory setup-environment + (with-ephemeral-home-directory setup-environment-no-atexit stop-agent (call-check `(, at gpg --import ,steve's-key)) (call-check `(, at gpg --verify ,unwrapped))))) '("encsig-2-keys-3" "encsig-2-keys-4"))) diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm index a6347fe..9537652 100644 --- a/tests/openpgp/defs.scm +++ b/tests/openpgp/defs.scm @@ -201,7 +201,7 @@ (define have-opt-always-trust (catch #f - (with-ephemeral-home-directory (lambda ()) + (with-ephemeral-home-directory (lambda ()) (lambda ()) (call-check `(,(tool 'gpg) --gpgconf-test --always-trust))) #t)) @@ -365,6 +365,10 @@ (create-gpghome) (start-agent)) +(define (setup-environment-no-atexit) + (create-gpghome) + (start-agent #t)) + (define (create-sample-files) (log "Creating sample data files") (for-each @@ -448,12 +452,12 @@ (preset-passphrases)) ;; Create the socket dir and start the agent. -(define (start-agent) +(define (start-agent . args) (log "Starting gpg-agent...") (let ((gnupghome (getenv "GNUPGHOME"))) - (atexit (lambda () - (with-home-directory gnupghome - (stop-agent))))) + (if (null? args) + (atexit (lambda () + (with-home-directory gnupghome (stop-agent)))))) (catch (log "Warning: Creating socket directory failed:" (car *error*)) (gpg-conf '--create-socketdir)) (call-check `(,(tool 'gpg-connect-agent) --verbose ----------------------------------------------------------------------- Summary of changes: tests/gpgscm/gnupg.scm | 13 +++++++++---- tests/gpgsm/export.scm | 2 +- tests/gpgsm/gpgsm-defs.scm | 6 ++++++ tests/migrations/common.scm | 2 +- tests/openpgp/decrypt-session-key.scm | 2 +- tests/openpgp/decrypt-unwrap-verify.scm | 2 +- tests/openpgp/defs.scm | 14 +++++++++----- 7 files changed, 28 insertions(+), 13 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 5 03:39:25 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 05 Apr 2018 03:39:25 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-44-g870527d 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 870527df0dd704c994928348c8c2910030776680 (commit) from 83529e1bd14a6d39f2a8ecab9fb6aa4c1f344c73 (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 870527df0dd704c994928348c8c2910030776680 Author: NIIBE Yutaka Date: Thu Apr 5 10:37:23 2018 +0900 g10: Let card-edit/key-attr show message when change. * g10/card-util.c (ask_card_rsa_keysize): Don't show message here. (ask_card_keyattr): Show message when change, also for ECC. Signed-off-by: NIIBE Yutaka diff --git a/g10/card-util.c b/g10/card-util.c index e33a417..896ead0 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -1389,12 +1389,7 @@ ask_card_rsa_keysize (unsigned int nbits) "RSA", min_nbits, max_nbits); } else - { - tty_printf (_("The card will now be re-configured" - " to generate a key of %u bits\n"), req_nbits); - show_keysize_warning (); - return req_nbits; - } + return req_nbits; } } @@ -1501,8 +1496,19 @@ ask_card_keyattr (int keyno, const struct key_attr *current) } leave: - if (!key_attr) - tty_printf (_("No change.")); + if (key_attr) + { + if (key_attr->algo == PUBKEY_ALGO_RSA) + tty_printf (_("The card will now be re-configured" + " to generate a key of %u bits\n"), key_attr->nbits); + else if (key_attr->algo == PUBKEY_ALGO_ECDH + || key_attr->algo == PUBKEY_ALGO_ECDSA + || key_attr->algo == PUBKEY_ALGO_EDDSA) + tty_printf (_("The card will now be re-configured" + " to generate a key of type: %s\n"), key_attr->curve), + + show_keysize_warning (); + } return key_attr; } ----------------------------------------------------------------------- Summary of changes: g10/card-util.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 5 11:00:30 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 05 Apr 2018 11:00:30 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.0.6-117-g0aac05e 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 0aac05ee0cfbe8101e9df59f0cd0716fbf84c596 (commit) via cc78a181785c0a2fe363c749d26d5ade959ccca3 (commit) via 0aada62ad6d7faa14917860179829cdc5329702d (commit) via bf273a7a67d8571030a57a087365de1d9b494e56 (commit) via 5bf8ceeae7d6e76e432218dfa9751168fd2f09c0 (commit) from f79f3379aba5949941c320b6cd2d9a1e95785ca1 (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 0aac05ee0cfbe8101e9df59f0cd0716fbf84c596 Author: Andre Heinecke Date: Thu Apr 5 10:57:39 2018 +0200 Disable oom body check for MIME mails * src/mailitem-events.cpp (EVENT_SINK_INVOKE): Disable safety checks. -- The safety check added for T3863 triggered too often. Even if a Body is found in OOM when we send MIME that should not be a problem as the MIME conversion will wkill the body. GnuPG-Bug-Id: T3863 GnuPG-Bug-Id: T3875 diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp index bc40cc8..ec6d6cc 100644 --- a/src/mailitem-events.cpp +++ b/src/mailitem-events.cpp @@ -429,6 +429,19 @@ EVENT_SINK_INVOKE(MailItemEvents) { if (!m_mail->has_crypted_or_empty_body()) { +/* The safety checks here trigger too often. Somehow for some + users the body is not empty after the encryption but when + it is sent it is still sent with the crypto content because + the encrypted MIME Structure is used because it is + correct in MAPI land. + + For safety reasons enabling the checks might be better but + until we figure out why for some users the body replacement + does not work we have to disable them. Otherwise GpgOL + is unusuable for such users. GnuPG-Bug-Id: T3875 +*/ +#define DISABLE_SAFTEY_CHECKS +#ifndef DISABLE_SAFTEY_CHECKS gpgol_bug (m_mail->get_window (), ERR_WANTS_SEND_MIME_BODY); log_debug ("%s:%s: Message %p mail %p cancelling send mime - " @@ -437,6 +450,11 @@ EVENT_SINK_INVOKE(MailItemEvents) m_mail->set_crypt_state (Mail::NoCryptMail); *(parms->rgvarg[0].pboolVal) = VARIANT_TRUE; break; +#else + log_debug ("%s:%s: Message %p mail %p - " + "not encrypted or not empty body detected - MIME.", + SRCNAME, __func__, m_object, m_mail); +#endif } /* Now we adress T3656 if Outlooks internal S/MIME is somehow * mixed in (even if it is enabled and then disabled) it might commit cc78a181785c0a2fe363c749d26d5ade959ccca3 Author: Andre Heinecke Date: Thu Apr 5 10:56:29 2018 +0200 Log body if body was found after crypto * src/mail.cpp (has_crypt_or_empty_body_oom): Log body in very verbose logging mode. -- Might help to figure out what goes wrong in: GnuPG-Bug-Id: T3875 diff --git a/src/mail.cpp b/src/mail.cpp index e6b2f1e..bd28cc3 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -2569,6 +2569,11 @@ has_crypt_or_empty_body_oom (Mail *mail) { ret.second = true; } + else + { + log_mime_parser ("%s:%s: Body found in %p : \"%s\"", + SRCNAME, __func__, mail, body.c_str ()); + } return ret; } commit 0aada62ad6d7faa14917860179829cdc5329702d Author: Andre Heinecke Date: Thu Apr 5 10:55:43 2018 +0200 Also clear plain body in wipe * src/mail.cpp (Mail::wipe): Clear body even if clearing the HTML Body succeeds. -- Might help with: GnuPG-Bug-Id: T3875 diff --git a/src/mail.cpp b/src/mail.cpp index 9d96bb6..e6b2f1e 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -1280,6 +1280,10 @@ Mail::wipe (bool force) } return -1; } + else + { + put_oom_string (m_mailitem, "Body", ""); + } m_needs_wipe = false; return 0; } commit bf273a7a67d8571030a57a087365de1d9b494e56 Author: Andre Heinecke Date: Thu Apr 5 08:44:44 2018 +0200 Properly handle crypt cancel for inline mails * src/mailitem-events.cpp (EVENT_SINK_INVOKE): Handle error or canceled crypt for inline mails. -- Canceling recipients would otherwise show a bug message. GnuPG-Bug-Id: T3864 diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp index 2a96166..bc40cc8 100644 --- a/src/mailitem-events.cpp +++ b/src/mailitem-events.cpp @@ -375,6 +375,15 @@ EVENT_SINK_INVOKE(MailItemEvents) } else { + if (m_mail->crypt_state () == Mail::NoCryptMail) + { + // Crypto failed or was canceled + log_debug ("%s:%s: Message %p mail %p cancelling send - " + "Crypto failed or canceled.", + SRCNAME, __func__, m_object, m_mail); + *(parms->rgvarg[0].pboolVal) = VARIANT_TRUE; + break; + } // For inline response we can't trigger send programatically // so we do the encryption in sync. if (m_mail->crypt_state () == Mail::NeedsUpdateInOOM) commit 5bf8ceeae7d6e76e432218dfa9751168fd2f09c0 Author: Andre Heinecke Date: Thu Apr 5 08:39:40 2018 +0200 Don't access listed key on error * src/parsecontroller.cpp (ParseController::get_ultimate_keys): Don't access key data member on error. -- A bit cleaner in case key is somehow invalid. diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp index 484afc2..a4debf5 100644 --- a/src/parsecontroller.cpp +++ b/src/parsecontroller.cpp @@ -486,7 +486,7 @@ ParseController::get_ultimate_keys() while (!err) { const auto key = ctx->nextKey(err); - if (key.isNull() || err) + if (err || key.isNull()) { break; } ----------------------------------------------------------------------- Summary of changes: src/mail.cpp | 9 +++++++++ src/mailitem-events.cpp | 27 +++++++++++++++++++++++++++ src/parsecontroller.cpp | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 5 12:05:32 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 05 Apr 2018 12:05:32 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.0.6-119-gc9343fa 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 c9343fa680d37927341292c48ef3be2001e1a6cc (commit) via 857afbf1a2e594b1ca10a84842d372c1edb87507 (commit) from 0aac05ee0cfbe8101e9df59f0cd0716fbf84c596 (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 c9343fa680d37927341292c48ef3be2001e1a6cc Author: Andre Heinecke Date: Thu Apr 5 12:01:18 2018 +0200 Revert "Jump the event queue" This reverts commit a6bf8ef284d98f87a9e64ce326e2a0a55633213c. -- Did not work as intended diff --git a/src/olflange.h b/src/olflange.h index 31aea7a..7601eb6 100644 --- a/src/olflange.h +++ b/src/olflange.h @@ -37,7 +37,7 @@ DEFINE_GUID(CLSID_GPGOL, 0x42d30988, 0x1a3a, 0x11da, */ /* The ProgID used by us */ -#define GPGOL_PROGID "Z.GNU.GpgOL" +#define GPGOL_PROGID "GNU.GpgOL" /* User friendly add in name */ #define GPGOL_PRETTY "GpgOL - The GnuPG Outlook Plugin" /* Short description of the addin */ commit 857afbf1a2e594b1ca10a84842d372c1edb87507 Author: Andre Heinecke Date: Thu Apr 5 11:29:02 2018 +0200 More saveguards and logging in get_ultimate_keys * src/parsecontroller.cpp (ParseController::get_ultimate_keys): Add more debug output and saveguards. -- From the logs in a bugreport it looks very much like we crash somewhere in between starting the keylisting and finishing it. Checking for invalid key or if a uid has an id makes sense, but might not be the crash. GnuPG-Bug-Id: T3857 diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp index a4debf5..454ac4c 100644 --- a/src/parsecontroller.cpp +++ b/src/parsecontroller.cpp @@ -475,6 +475,7 @@ ParseController::get_ultimate_keys() } ctx->setKeyListMode (KeyListMode::Local); Error err; + TRACEPOINT; if ((err = ctx->startKeyListing ())) { log_error ("%s:%s: Failed to start keylisting err: %i: %s", @@ -483,23 +484,36 @@ ParseController::get_ultimate_keys() gpgrt_lock_unlock (&keylist_lock); return 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) + if (uid.validity() == UserID::Validity::Ultimate && + uid.id()) { s_ultimate_keys.push_back (key); - log_debug ("adding ultimate uid: %s", uid.id()); + log_debug ("%s:%s: Adding ultimate uid.", + SRCNAME, __func__); + log_mime_parser ("%s:%s: Added uid %s.", + SRCNAME, __func__, uid.id()); break; } } } + TRACEPOINT; delete ctx; log_debug ("%s:%s: keylisting done.", SRCNAME, __func__); ----------------------------------------------------------------------- Summary of changes: src/olflange.h | 2 +- src/parsecontroller.cpp | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 5 14:06:30 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 05 Apr 2018 14:06:30 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.0.6-121-g1441f67 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 1441f6710db976c76b5cb64073be05b318df84ce (commit) via 21893fa30aec87dc3ec25153490c41e00f1641b0 (commit) from c9343fa680d37927341292c48ef3be2001e1a6cc (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 1441f6710db976c76b5cb64073be05b318df84ce Author: Andre Heinecke Date: Thu Apr 5 14:05:13 2018 +0200 Fix encrypt to self if keycache is used * src/cryptcontroller.cpp (CryptController::resolve_keys_cached): Add sender to recipients if encrypt is selected. * src/keycache.cpp, src/keycache.h (KeyCache::getEncryptionKeys): Use a vector of strings instead of carray. -- Oooops. diff --git a/src/cryptcontroller.cpp b/src/cryptcontroller.cpp index eddc9f7..1065f6e 100644 --- a/src/cryptcontroller.cpp +++ b/src/cryptcontroller.cpp @@ -309,12 +309,16 @@ CryptController::resolve_keys_cached() if (m_encrypt) { - m_recipients = cache->getEncryptionKeys((const char **)m_recipient_addrs, GpgME::OpenPGP); + const auto cached_sender = m_mail->get_cached_sender (); + auto recps = cArray_to_vector ((const char**) m_recipient_addrs); + recps.push_back (cached_sender); + + m_recipients = cache->getEncryptionKeys(recps, GpgME::OpenPGP); m_proto = GpgME::OpenPGP; if (m_recipients.empty() && opt.enable_smime) { - m_recipients = cache->getEncryptionKeys((const char **)m_recipient_addrs, GpgME::CMS); + m_recipients = cache->getEncryptionKeys(recps, GpgME::CMS); fallbackToSMIME = true; m_proto = GpgME::CMS; } diff --git a/src/keycache.cpp b/src/keycache.cpp index 73011aa..29382d5 100644 --- a/src/keycache.cpp +++ b/src/keycache.cpp @@ -219,22 +219,22 @@ public: return key; } - std::vector getEncryptionKeys (const char **recipients, + std::vector getEncryptionKeys (const std::vector &recipients, GpgME::Protocol proto) { std::vector ret; - if (!recipients) + if (recipients.empty ()) { TRACEPOINT; return ret; } - for (int i = 0; recipients[i]; i++) + for (const auto &recip: recipients) { - const auto key = getKey (recipients[i], proto); + const auto key = getKey (recip.c_str (), proto); if (key.isNull()) { log_mime_parser ("%s:%s: No key for %s. no internal encryption", - SRCNAME, __func__, recipients[i]); + SRCNAME, __func__, recip.c_str ()); return std::vector(); } @@ -242,20 +242,20 @@ public: key.isExpired() || key.isDisabled() || key.isInvalid()) { log_mime_parser ("%s:%s: Invalid key for %s. no internal encryption", - SRCNAME, __func__, recipients[i]); + SRCNAME, __func__, recip.c_str ()); return std::vector(); } if (in_de_vs_mode () && key.isDeVs ()) { log_mime_parser ("%s:%s: key for %s is not deVS", - SRCNAME, __func__, recipients[i]); + SRCNAME, __func__, recip.c_str ()); return std::vector(); } bool validEnough = false; /* Here we do the check if the key is valid for this recipient */ - const auto addrSpec = GpgME::UserID::addrSpecFromString (recipients[i]); + const auto addrSpec = GpgME::UserID::addrSpecFromString (recip.c_str ()); for (const auto &uid: key.userIDs ()) { if (addrSpec != uid.addrSpec()) @@ -272,7 +272,7 @@ public: if (!validEnough) { log_mime_parser ("%s:%s: UID for %s does not have at least marginal trust", - SRCNAME, __func__, recipients[i]); + SRCNAME, __func__, recip.c_str ()); return std::vector(); } // Accepting key @@ -309,7 +309,7 @@ KeyCache::getSigningKey (const char *addr, GpgME::Protocol proto) const } std::vector -KeyCache::getEncryptionKeys (const char **recipients, GpgME::Protocol proto) const +KeyCache::getEncryptionKeys (const std::vector &recipients, GpgME::Protocol proto) const { return d->getEncryptionKeys (recipients, proto); } diff --git a/src/keycache.h b/src/keycache.h index 9a3aded..41e7255 100644 --- a/src/keycache.h +++ b/src/keycache.h @@ -53,7 +53,7 @@ public: are taken from the internal cache. If one recipient can't be resolved an empty list is returned. */ - std::vector getEncryptionKeys (const char **recipients, + std::vector getEncryptionKeys (const std::vector &recipients, GpgME::Protocol proto) const; /* Start a key location in a background thread filling commit 21893fa30aec87dc3ec25153490c41e00f1641b0 Author: Andre Heinecke Date: Thu Apr 5 14:04:38 2018 +0200 Add helper to convert carray to vector * src/cpphelp.cpp, src/cpphelp.h (cArray_to_vector): New. diff --git a/src/cpphelp.cpp b/src/cpphelp.cpp index 122703e..c09b16d 100644 --- a/src/cpphelp.cpp +++ b/src/cpphelp.cpp @@ -82,6 +82,23 @@ vector_to_cArray(const std::vector &vec) return ret; } +std::vector +cArray_to_vector(const char **cArray) +{ + std::vector ret; + + if (!cArray) + { + return ret; + } + + for (int i = 0; cArray[i]; i++) + { + ret.push_back (std::string (cArray[i])); + } + return ret; +} + bool in_de_vs_mode() { diff --git a/src/cpphelp.h b/src/cpphelp.h index c2f2983..953f861 100644 --- a/src/cpphelp.h +++ b/src/cpphelp.h @@ -38,6 +38,7 @@ void trim (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); /* Check if we are in de_vs mode. */ bool in_de_vs_mode (); ----------------------------------------------------------------------- Summary of changes: src/cpphelp.cpp | 17 +++++++++++++++++ src/cpphelp.h | 1 + src/cryptcontroller.cpp | 8 ++++++-- src/keycache.cpp | 20 ++++++++++---------- src/keycache.h | 2 +- 5 files changed, 35 insertions(+), 13 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 5 15:32:03 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 05 Apr 2018 15:32:03 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-45-gd27417d 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 d27417d3a571739329a86d9f25212f2da0c8ff72 (commit) from 870527df0dd704c994928348c8c2910030776680 (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 d27417d3a571739329a86d9f25212f2da0c8ff72 Author: Werner Koch Date: Thu Apr 5 15:25:13 2018 +0200 gpg: Add new OpenPGP card vendor. -- Signed-off-by: Werner Koch diff --git a/g10/card-util.c b/g10/card-util.c index 896ead0..1a249fb 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 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 Fri Apr 6 08:07:51 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Fri, 06 Apr 2018 08:07:51 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-46-g80b775b 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 80b775bdbb852aa4a80292c9357e5b1876110c00 (commit) from d27417d3a571739329a86d9f25212f2da0c8ff72 (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 80b775bdbb852aa4a80292c9357e5b1876110c00 Author: NIIBE Yutaka Date: Fri Apr 6 14:58:14 2018 +0900 agent: Support SSH signature flags. * agent/command-ssh.c (SSH_AGENT_RSA_SHA2_256): New. (SSH_AGENT_RSA_SHA2_512): New. (ssh_handler_sign_request): Override SPEC when FLAGS is specified. -- GnuPG-bug-id: 3880 Reported-by: Daniel Kahn Gillmor Signed-off-by: NIIBE Yutaka diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 517231a..d1158e7 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -83,6 +83,8 @@ /* Other constants. */ #define SSH_DSA_SIGNATURE_PADDING 20 #define SSH_DSA_SIGNATURE_ELEMS 2 +#define SSH_AGENT_RSA_SHA2_256 0x02 +#define SSH_AGENT_RSA_SHA2_512 0x04 #define SPEC_FLAG_USE_PKCS1V2 (1 << 0) #define SPEC_FLAG_IS_ECDSA (1 << 1) #define SPEC_FLAG_IS_EdDSA (1 << 2) /*(lowercase 'd' on purpose.)*/ @@ -2880,11 +2882,24 @@ ssh_handler_sign_request (ctrl_t ctrl, estream_t request, estream_t response) if (err) goto out; - /* FIXME? */ err = stream_read_uint32 (request, &flags); if (err) goto out; + if (spec.algo == GCRY_PK_RSA) + { + if ((flags & SSH_AGENT_RSA_SHA2_256)) + { + spec.ssh_identifier = "rsa-sha2-256"; + spec.hash_algo = GCRY_MD_SHA256; + } + else if ((flags & SSH_AGENT_RSA_SHA2_512)) + { + spec.ssh_identifier = "rsa-sha2-512"; + spec.hash_algo = GCRY_MD_SHA512; + } + } + hash_algo = spec.hash_algo; if (!hash_algo) hash_algo = GCRY_MD_SHA1; /* Use the default. */ ----------------------------------------------------------------------- Summary of changes: agent/command-ssh.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Apr 6 10:25:45 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 06 Apr 2018 10:25:45 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-47-g5ba74a1 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 5ba74a134db431530884f03eea5410a68dbfe0f5 (commit) from 80b775bdbb852aa4a80292c9357e5b1876110c00 (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 5ba74a134db431530884f03eea5410a68dbfe0f5 Author: Werner Koch Date: Fri Apr 6 10:18:53 2018 +0200 gpg: Re-indent sig-check.c and use signature class macros. * g10/keydb.h (IS_BACK_SIG): New. * g10/sig-check.c: Re-indent and use macros. -- This makes the code easier to understand. Signed-off-by: Werner Koch diff --git a/g10/keydb.h b/g10/keydb.h index 7393768..627564c 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -33,6 +33,7 @@ #define IS_KEY_SIG(s) ((s)->sig_class == 0x1f) #define IS_UID_SIG(s) (((s)->sig_class & ~3) == 0x10) #define IS_SUBKEY_SIG(s) ((s)->sig_class == 0x18) +#define IS_BACK_SIG(s) ((s)->sig_class == 0x19) #define IS_KEY_REV(s) ((s)->sig_class == 0x20) #define IS_UID_REV(s) ((s)->sig_class == 0x30) #define IS_SUBKEY_REV(s) ((s)->sig_class == 0x28) diff --git a/g10/sig-check.c b/g10/sig-check.c index 23af12b..1a90fd3 100644 --- a/g10/sig-check.c +++ b/g10/sig-check.c @@ -115,174 +115,177 @@ check_signature2 (ctrl_t ctrl, PKT_signature *sig, gcry_md_hd_t digest, u32 *r_expiredate, int *r_expired, int *r_revoked, PKT_public_key **r_pk) { - int rc=0; - PKT_public_key *pk; - - if (r_expiredate) - *r_expiredate = 0; - if (r_expired) - *r_expired = 0; - if (r_revoked) - *r_revoked = 0; - if (r_pk) - *r_pk = NULL; - - pk = xtrycalloc (1, sizeof *pk); - if (!pk) - return gpg_error_from_syserror (); - - if ( (rc=openpgp_md_test_algo(sig->digest_algo)) ) - ; /* We don't have this digest. */ - else if (! gnupg_digest_is_allowed (opt.compliance, 0, sig->digest_algo)) - { - /* Compliance failure. */ - log_info (_("digest algorithm '%s' may not be used in %s mode\n"), - gcry_md_algo_name (sig->digest_algo), - gnupg_compliance_option_string (opt.compliance)); - rc = gpg_error (GPG_ERR_DIGEST_ALGO); - } - else if ((rc=openpgp_pk_test_algo(sig->pubkey_algo))) - ; /* We don't have this pubkey algo. */ - else if (!gcry_md_is_enabled (digest,sig->digest_algo)) - { - /* Sanity check that the md has a context for the hash that the - sig is expecting. This can happen if a onepass sig header does - not match the actual sig, and also if the clearsign "Hash:" - header is missing or does not match the actual sig. */ + int rc=0; + PKT_public_key *pk; - log_info(_("WARNING: signature digest conflict in message\n")); - rc = gpg_error (GPG_ERR_GENERAL); - } - else if( get_pubkey (ctrl, pk, sig->keyid ) ) - rc = gpg_error (GPG_ERR_NO_PUBKEY); - else if (! gnupg_pk_is_allowed (opt.compliance, PK_USE_VERIFICATION, - pk->pubkey_algo, pk->pkey, - nbits_from_pk (pk), - NULL)) - { - /* Compliance failure. */ - log_error (_("key %s may not be used for signing in %s mode\n"), - keystr_from_pk (pk), - gnupg_compliance_option_string (opt.compliance)); - rc = gpg_error (GPG_ERR_PUBKEY_ALGO); - } - else if(!pk->flags.valid) - { - /* You cannot have a good sig from an invalid key. */ - rc = gpg_error (GPG_ERR_BAD_PUBKEY); - } - else - { - if(r_expiredate) - *r_expiredate = pk->expiredate; - - rc = check_signature_end (pk, sig, digest, r_expired, r_revoked, NULL); - - /* Check the backsig. This is a 0x19 signature from the - subkey on the primary key. The idea here is that it should - not be possible for someone to "steal" subkeys and claim - them as their own. The attacker couldn't actually use the - subkey, but they could try and claim ownership of any - signatures issued by it. */ - if (!rc && !pk->flags.primary && pk->flags.backsig < 2) - { - if (!pk->flags.backsig) - { - log_info(_("WARNING: signing subkey %s is not" - " cross-certified\n"),keystr_from_pk(pk)); - log_info(_("please see %s for more information\n"), - "https://gnupg.org/faq/subkey-cross-certify.html"); - /* --require-cross-certification makes this warning an - error. TODO: change the default to require this - after more keys have backsigs. */ - if(opt.flags.require_cross_cert) - rc = gpg_error (GPG_ERR_GENERAL); - } - else if(pk->flags.backsig == 1) - { - log_info(_("WARNING: signing subkey %s has an invalid" - " cross-certification\n"),keystr_from_pk(pk)); - rc = gpg_error (GPG_ERR_GENERAL); - } - } + if (r_expiredate) + *r_expiredate = 0; + if (r_expired) + *r_expired = 0; + if (r_revoked) + *r_revoked = 0; + if (r_pk) + *r_pk = NULL; - } + pk = xtrycalloc (1, sizeof *pk); + if (!pk) + return gpg_error_from_syserror (); - if( !rc && sig->sig_class < 2 && is_status_enabled() ) { - /* This signature id works best with DLP algorithms because - * they use a random parameter for every signature. Instead of - * this sig-id we could have also used the hash of the document - * and the timestamp, but the drawback of this is, that it is - * not possible to sign more than one identical document within - * one second. Some remote batch processing applications might - * like this feature here. - * - * Note that before 2.0.10, we used RIPE-MD160 for the hash - * and accidentally didn't include the timestamp and algorithm - * information in the hash. Given that this feature is not - * commonly used and that a replay attacks detection should - * not solely be based on this feature (because it does not - * work with RSA), we take the freedom and switch to SHA-1 - * with 2.0.10 to take advantage of hardware supported SHA-1 - * implementations. We also include the missing information - * in the hash. Note also the SIG_ID as computed by gpg 1.x - * and gpg 2.x didn't matched either because 2.x used to print - * MPIs not in PGP format. */ - u32 a = sig->timestamp; - int nsig = pubkey_get_nsig( sig->pubkey_algo ); - unsigned char *p, *buffer; - size_t n, nbytes; - int i; - char hashbuf[20]; - - nbytes = 6; - for (i=0; i < nsig; i++ ) - { - if (gcry_mpi_print (GCRYMPI_FMT_USG, NULL, 0, &n, sig->data[i])) - BUG(); - nbytes += n; - } + if ((rc=openpgp_md_test_algo(sig->digest_algo))) + { + /* We don't have this digest. */ + } + else if (!gnupg_digest_is_allowed (opt.compliance, 0, sig->digest_algo)) + { + /* Compliance failure. */ + log_info (_("digest algorithm '%s' may not be used in %s mode\n"), + gcry_md_algo_name (sig->digest_algo), + gnupg_compliance_option_string (opt.compliance)); + rc = gpg_error (GPG_ERR_DIGEST_ALGO); + } + else if ((rc=openpgp_pk_test_algo(sig->pubkey_algo))) + { + /* We don't have this pubkey algo. */ + } + else if (!gcry_md_is_enabled (digest,sig->digest_algo)) + { + /* Sanity check that the md has a context for the hash that the + * sig is expecting. This can happen if a onepass sig header + * does not match the actual sig, and also if the clearsign + * "Hash:" header is missing or does not match the actual sig. */ + log_info(_("WARNING: signature digest conflict in message\n")); + rc = gpg_error (GPG_ERR_GENERAL); + } + else if (get_pubkey (ctrl, pk, sig->keyid)) + rc = gpg_error (GPG_ERR_NO_PUBKEY); + else if (!gnupg_pk_is_allowed (opt.compliance, PK_USE_VERIFICATION, + pk->pubkey_algo, pk->pkey, + nbits_from_pk (pk), + NULL)) + { + /* Compliance failure. */ + log_error (_("key %s may not be used for signing in %s mode\n"), + keystr_from_pk (pk), + gnupg_compliance_option_string (opt.compliance)); + rc = gpg_error (GPG_ERR_PUBKEY_ALGO); + } + else if (!pk->flags.valid) + { + /* You cannot have a good sig from an invalid key. */ + rc = gpg_error (GPG_ERR_BAD_PUBKEY); + } + else + { + if (r_expiredate) + *r_expiredate = pk->expiredate; + + rc = check_signature_end (pk, sig, digest, r_expired, r_revoked, NULL); + + /* Check the backsig. This is a back signature (0x19) from + * the subkey on the primary key. The idea here is that it + * should not be possible for someone to "steal" subkeys and + * claim them as their own. The attacker couldn't actually + * use the subkey, but they could try and claim ownership of + * any signatures issued by it. */ + if (!rc && !pk->flags.primary && pk->flags.backsig < 2) + { + if (!pk->flags.backsig) + { + log_info (_("WARNING: signing subkey %s is not" + " cross-certified\n"),keystr_from_pk(pk)); + log_info (_("please see %s for more information\n"), + "https://gnupg.org/faq/subkey-cross-certify.html"); + /* The default option --require-cross-certification + * makes this warning an error. */ + if (opt.flags.require_cross_cert) + rc = gpg_error (GPG_ERR_GENERAL); + } + else if(pk->flags.backsig == 1) + { + log_info (_("WARNING: signing subkey %s has an invalid" + " cross-certification\n"), keystr_from_pk(pk)); + rc = gpg_error (GPG_ERR_GENERAL); + } + } - /* Make buffer large enough to be later used as output buffer. */ - if (nbytes < 100) - nbytes = 100; - nbytes += 10; /* Safety margin. */ - - /* Fill and hash buffer. */ - buffer = p = xmalloc (nbytes); - *p++ = sig->pubkey_algo; - *p++ = sig->digest_algo; - *p++ = (a >> 24) & 0xff; - *p++ = (a >> 16) & 0xff; - *p++ = (a >> 8) & 0xff; - *p++ = a & 0xff; - nbytes -= 6; - for (i=0; i < nsig; i++ ) - { - if (gcry_mpi_print (GCRYMPI_FMT_PGP, p, nbytes, &n, sig->data[i])) - BUG(); - p += n; - nbytes -= n; - } - gcry_md_hash_buffer (GCRY_MD_SHA1, hashbuf, buffer, p-buffer); - - p = make_radix64_string (hashbuf, 20); - sprintf (buffer, "%s %s %lu", - p, strtimestamp (sig->timestamp), (ulong)sig->timestamp); - xfree (p); - write_status_text (STATUS_SIG_ID, buffer); - xfree (buffer); } - if (r_pk) - *r_pk = pk; - else - { - release_public_key_parts (pk); - xfree (pk); - } + if (!rc && sig->sig_class < 2 && is_status_enabled ()) + { + /* This signature id works best with DLP algorithms because + * they use a random parameter for every signature. Instead of + * this sig-id we could have also used the hash of the document + * and the timestamp, but the drawback of this is, that it is + * not possible to sign more than one identical document within + * one second. Some remote batch processing applications might + * like this feature here. + * + * Note that before 2.0.10, we used RIPE-MD160 for the hash + * and accidentally didn't include the timestamp and algorithm + * information in the hash. Given that this feature is not + * commonly used and that a replay attacks detection should + * not solely be based on this feature (because it does not + * work with RSA), we take the freedom and switch to SHA-1 + * with 2.0.10 to take advantage of hardware supported SHA-1 + * implementations. We also include the missing information + * in the hash. Note also the SIG_ID as computed by gpg 1.x + * and gpg 2.x didn't matched either because 2.x used to print + * MPIs not in PGP format. */ + u32 a = sig->timestamp; + int nsig = pubkey_get_nsig (sig->pubkey_algo); + unsigned char *p, *buffer; + size_t n, nbytes; + int i; + char hashbuf[20]; + + nbytes = 6; + for (i=0; i < nsig; i++ ) + { + if (gcry_mpi_print (GCRYMPI_FMT_USG, NULL, 0, &n, sig->data[i])) + BUG(); + nbytes += n; + } - return rc; + /* Make buffer large enough to be later used as output buffer. */ + if (nbytes < 100) + nbytes = 100; + nbytes += 10; /* Safety margin. */ + + /* Fill and hash buffer. */ + buffer = p = xmalloc (nbytes); + *p++ = sig->pubkey_algo; + *p++ = sig->digest_algo; + *p++ = (a >> 24) & 0xff; + *p++ = (a >> 16) & 0xff; + *p++ = (a >> 8) & 0xff; + *p++ = a & 0xff; + nbytes -= 6; + for (i=0; i < nsig; i++ ) + { + if (gcry_mpi_print (GCRYMPI_FMT_PGP, p, nbytes, &n, sig->data[i])) + BUG(); + p += n; + nbytes -= n; + } + gcry_md_hash_buffer (GCRY_MD_SHA1, hashbuf, buffer, p-buffer); + + p = make_radix64_string (hashbuf, 20); + sprintf (buffer, "%s %s %lu", + p, strtimestamp (sig->timestamp), (ulong)sig->timestamp); + xfree (p); + write_status_text (STATUS_SIG_ID, buffer); + xfree (buffer); + } + + if (r_pk) + *r_pk = pk; + else + { + release_public_key_parts (pk); + xfree (pk); + } + + return rc; } @@ -307,87 +310,86 @@ static int check_signature_metadata_validity (PKT_public_key *pk, PKT_signature *sig, int *r_expired, int *r_revoked) { - u32 cur_time; + u32 cur_time; - if(r_expired) - *r_expired = 0; - if(r_revoked) - *r_revoked = 0; + if (r_expired) + *r_expired = 0; + if (r_revoked) + *r_revoked = 0; - if( pk->timestamp > sig->timestamp ) - { - ulong d = pk->timestamp - sig->timestamp; - if ( d < 86400 ) - { - log_info - (ngettext - ("public key %s is %lu second newer than the signature\n", - "public key %s is %lu seconds newer than the signature\n", - d), keystr_from_pk (pk), d); - } - else - { - d /= 86400; - log_info - (ngettext - ("public key %s is %lu day newer than the signature\n", - "public key %s is %lu days newer than the signature\n", - d), keystr_from_pk (pk), d); - } - if (!opt.ignore_time_conflict) - return GPG_ERR_TIME_CONFLICT; /* pubkey newer than signature. */ - } + if (pk->timestamp > sig->timestamp ) + { + ulong d = pk->timestamp - sig->timestamp; + if ( d < 86400 ) + { + log_info (ngettext + ("public key %s is %lu second newer than the signature\n", + "public key %s is %lu seconds newer than the signature\n", + d), keystr_from_pk (pk), d); + } + else + { + d /= 86400; + log_info (ngettext + ("public key %s is %lu day newer than the signature\n", + "public key %s is %lu days newer than the signature\n", + d), keystr_from_pk (pk), d); + } + if (!opt.ignore_time_conflict) + return GPG_ERR_TIME_CONFLICT; /* pubkey newer than signature. */ + } - cur_time = make_timestamp(); - if( pk->timestamp > cur_time ) - { - ulong d = pk->timestamp - cur_time; - if (d < 86400) - { - log_info (ngettext("key %s was created %lu second" - " in the future (time warp or clock problem)\n", - "key %s was created %lu seconds" - " in the future (time warp or clock problem)\n", - d), keystr_from_pk (pk), d); - } - else - { - d /= 86400; - log_info (ngettext("key %s was created %lu day" - " in the future (time warp or clock problem)\n", - "key %s was created %lu days" - " in the future (time warp or clock problem)\n", - d), keystr_from_pk (pk), d); - } - if (!opt.ignore_time_conflict) - return GPG_ERR_TIME_CONFLICT; - } + cur_time = make_timestamp (); + if (pk->timestamp > cur_time) + { + ulong d = pk->timestamp - cur_time; + if (d < 86400) + { + log_info (ngettext("key %s was created %lu second" + " in the future (time warp or clock problem)\n", + "key %s was created %lu seconds" + " in the future (time warp or clock problem)\n", + d), keystr_from_pk (pk), d); + } + else + { + d /= 86400; + log_info (ngettext("key %s was created %lu day" + " in the future (time warp or clock problem)\n", + "key %s was created %lu days" + " in the future (time warp or clock problem)\n", + d), keystr_from_pk (pk), d); + } + if (!opt.ignore_time_conflict) + return GPG_ERR_TIME_CONFLICT; + } - /* Check whether the key has expired. We check the has_expired - flag which is set after a full evaluation of the key (getkey.c) - as well as a simple compare to the current time in case the - merge has for whatever reasons not been done. */ - if( pk->has_expired || (pk->expiredate && pk->expiredate < cur_time)) { - char buf[11]; - if (opt.verbose) - log_info(_("Note: signature key %s expired %s\n"), - keystr_from_pk(pk), asctimestamp( pk->expiredate ) ); - sprintf(buf,"%lu",(ulong)pk->expiredate); - write_status_text(STATUS_KEYEXPIRED,buf); - if(r_expired) - *r_expired = 1; + /* Check whether the key has expired. We check the has_expired + * flag which is set after a full evaluation of the key (getkey.c) + * as well as a simple compare to the current time in case the + * merge has for whatever reasons not been done. */ + if (pk->has_expired || (pk->expiredate && pk->expiredate < cur_time)) + { + char buf[11]; + if (opt.verbose) + log_info (_("Note: signature key %s expired %s\n"), + keystr_from_pk(pk), asctimestamp( pk->expiredate ) ); + snprintf (buf, sizeof buf, "%lu",(ulong)pk->expiredate); + write_status_text (STATUS_KEYEXPIRED, buf); + if (r_expired) + *r_expired = 1; } - if (pk->flags.revoked) - { - if (opt.verbose) - log_info (_("Note: signature key %s has been revoked\n"), - keystr_from_pk(pk)); - if (r_revoked) - *r_revoked=1; - } + if (pk->flags.revoked) + { + if (opt.verbose) + log_info (_("Note: signature key %s has been revoked\n"), + keystr_from_pk(pk)); + if (r_revoked) + *r_revoked=1; + } - return 0; + return 0; } @@ -425,150 +427,165 @@ check_signature_end (PKT_public_key *pk, PKT_signature *sig, gcry_md_hd_t digest, int *r_expired, int *r_revoked, PKT_public_key *ret_pk) { - int rc = 0; + int rc = 0; - if ((rc = check_signature_metadata_validity (pk, sig, - r_expired, r_revoked))) - return rc; + if ((rc = check_signature_metadata_validity (pk, sig, + r_expired, r_revoked))) + return rc; - if ((rc = check_signature_end_simple (pk, sig, digest))) - return rc; + if ((rc = check_signature_end_simple (pk, sig, digest))) + return rc; - if(!rc && ret_pk) - copy_public_key(ret_pk,pk); + if (!rc && ret_pk) + copy_public_key(ret_pk,pk); - return rc; + return rc; } + /* This function is similar to check_signature_end, but it only checks - whether the signature was generated by PK. It does not check - expiration, revocation, etc. */ + * whether the signature was generated by PK. It does not check + * expiration, revocation, etc. */ static int check_signature_end_simple (PKT_public_key *pk, PKT_signature *sig, gcry_md_hd_t digest) { - gcry_mpi_t result = NULL; - int rc = 0; - const struct weakhash *weak; + gcry_mpi_t result = NULL; + int rc = 0; + const struct weakhash *weak; - if (!opt.flags.allow_weak_digest_algos) + if (!opt.flags.allow_weak_digest_algos) + { for (weak = opt.weak_digests; weak; weak = weak->next) if (sig->digest_algo == weak->algo) { print_digest_rejected_note(sig->digest_algo); return GPG_ERR_DIGEST_ALGO; } + } + + /* Make sure the digest algo is enabled (in case of a detached + * signature). */ + gcry_md_enable (digest, sig->digest_algo); + + /* Complete the digest. */ + if (sig->version >= 4) + gcry_md_putc (digest, sig->version); - /* Make sure the digest algo is enabled (in case of a detached - signature). */ - gcry_md_enable (digest, sig->digest_algo); - - /* Complete the digest. */ - if( sig->version >= 4 ) - gcry_md_putc( digest, sig->version ); - gcry_md_putc( digest, sig->sig_class ); - if( sig->version < 4 ) { - u32 a = sig->timestamp; - gcry_md_putc( digest, (a >> 24) & 0xff ); - gcry_md_putc( digest, (a >> 16) & 0xff ); - gcry_md_putc( digest, (a >> 8) & 0xff ); - gcry_md_putc( digest, a & 0xff ); + gcry_md_putc( digest, sig->sig_class ); + if (sig->version < 4) + { + u32 a = sig->timestamp; + gcry_md_putc (digest, ((a >> 24) & 0xff)); + gcry_md_putc (digest, ((a >> 16) & 0xff)); + gcry_md_putc (digest, ((a >> 8) & 0xff)); + gcry_md_putc (digest, ( a & 0xff)); } - else { - byte buf[6]; - size_t n; - gcry_md_putc( digest, sig->pubkey_algo ); - gcry_md_putc( digest, sig->digest_algo ); - if( sig->hashed ) { - n = sig->hashed->len; - gcry_md_putc (digest, (n >> 8) ); - gcry_md_putc (digest, n ); - gcry_md_write (digest, sig->hashed->data, n); - n += 6; + else + { + byte buf[6]; + size_t n; + gcry_md_putc (digest, sig->pubkey_algo); + gcry_md_putc (digest, sig->digest_algo); + if (sig->hashed) + { + n = sig->hashed->len; + gcry_md_putc (digest, (n >> 8) ); + gcry_md_putc (digest, n ); + gcry_md_write (digest, sig->hashed->data, n); + n += 6; } - else { + else + { /* Two octets for the (empty) length of the hashed - section. */ + * section. */ gcry_md_putc (digest, 0); gcry_md_putc (digest, 0); 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 ); + /* 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 ); } - gcry_md_final( digest ); + gcry_md_final( digest ); - /* Convert the digest to an MPI. */ - result = encode_md_value (pk, digest, sig->digest_algo ); - if (!result) - return GPG_ERR_GENERAL; + /* Convert the digest to an MPI. */ + result = encode_md_value (pk, digest, sig->digest_algo ); + if (!result) + return GPG_ERR_GENERAL; - /* Verify the signature. */ - rc = pk_verify( pk->pubkey_algo, result, sig->data, pk->pkey ); - gcry_mpi_release (result); + /* Verify the signature. */ + rc = pk_verify (pk->pubkey_algo, result, sig->data, pk->pkey); + gcry_mpi_release (result); - if( !rc && sig->flags.unknown_critical ) - { - log_info(_("assuming bad signature from key %s" - " due to an unknown critical bit\n"),keystr_from_pk(pk)); - rc = GPG_ERR_BAD_SIGNATURE; - } + if (!rc && sig->flags.unknown_critical) + { + log_info(_("assuming bad signature from key %s" + " due to an unknown critical bit\n"),keystr_from_pk(pk)); + rc = GPG_ERR_BAD_SIGNATURE; + } - return rc; + return rc; } /* Add a uid node to a hash context. See section 5.2.4, paragraph 4 - of RFC 4880. */ + * of RFC 4880. */ static void hash_uid_packet (PKT_user_id *uid, gcry_md_hd_t md, PKT_signature *sig ) { - if( uid->attrib_data ) { - if( sig->version >=4 ) { - byte buf[5]; - buf[0] = 0xd1; /* packet of type 17 */ - buf[1] = uid->attrib_len >> 24; /* always use 4 length bytes */ - buf[2] = uid->attrib_len >> 16; - buf[3] = uid->attrib_len >> 8; - buf[4] = uid->attrib_len; - gcry_md_write( md, buf, 5 ); + if (uid->attrib_data) + { + if (sig->version >=4) + { + byte buf[5]; + buf[0] = 0xd1; /* packet of type 17 */ + buf[1] = uid->attrib_len >> 24; /* always use 4 length bytes */ + buf[2] = uid->attrib_len >> 16; + buf[3] = uid->attrib_len >> 8; + buf[4] = uid->attrib_len; + gcry_md_write( md, buf, 5 ); } - gcry_md_write( md, uid->attrib_data, uid->attrib_len ); + gcry_md_write( md, uid->attrib_data, uid->attrib_len ); } - else { - if( sig->version >=4 ) { - byte buf[5]; - buf[0] = 0xb4; /* indicates a userid packet */ - buf[1] = uid->len >> 24; /* always use 4 length bytes */ - buf[2] = uid->len >> 16; - buf[3] = uid->len >> 8; - buf[4] = uid->len; - gcry_md_write( md, buf, 5 ); + else + { + if (sig->version >=4) + { + byte buf[5]; + buf[0] = 0xb4; /* indicates a userid packet */ + buf[1] = uid->len >> 24; /* always use 4 length bytes */ + buf[2] = uid->len >> 16; + buf[3] = uid->len >> 8; + buf[4] = uid->len; + gcry_md_write( md, buf, 5 ); } - gcry_md_write( md, uid->name, uid->len ); + gcry_md_write( md, uid->name, uid->len ); } } static void cache_sig_result ( PKT_signature *sig, int result ) { - if ( !result ) { - sig->flags.checked = 1; - sig->flags.valid = 1; + if (!result) + { + sig->flags.checked = 1; + sig->flags.valid = 1; } - else if ( gpg_err_code (result) == GPG_ERR_BAD_SIGNATURE ) { - sig->flags.checked = 1; - sig->flags.valid = 0; + else if (gpg_err_code (result) == GPG_ERR_BAD_SIGNATURE) + { + sig->flags.checked = 1; + sig->flags.valid = 0; } - else { - sig->flags.checked = 0; - sig->flags.valid = 0; + else + { + sig->flags.checked = 0; + sig->flags.valid = 0; } } @@ -686,14 +703,14 @@ check_revocation_keys (ctrl_t ctrl, PKT_public_key *pk, PKT_signature *sig) } /* Check that the backsig BACKSIG from the subkey SUB_PK to its - primary key MAIN_PK is valid. - - Backsigs (0x19) have the same format as binding sigs (0x18), but - this function is simpler than check_key_signature in a few ways. - For example, there is no support for expiring backsigs since it is - questionable what such a thing actually means. Note also that the - sig cache check here, unlike other sig caches in GnuPG, is not - persistent. */ + * primary key MAIN_PK is valid. + * + * Backsigs (0x19) have the same format as binding sigs (0x18), but + * this function is simpler than check_key_signature in a few ways. + * For example, there is no support for expiring backsigs since it is + * questionable what such a thing actually means. Note also that the + * sig cache check here, unlike other sig caches in GnuPG, is not + * persistent. */ int check_backsig (PKT_public_key *main_pk,PKT_public_key *sub_pk, PKT_signature *backsig) @@ -789,32 +806,18 @@ check_signature_over_key_or_uid (ctrl_t ctrl, PKT_public_key *signer, /* A signature's class indicates the type of packet that it signs. */ - if (/* Primary key binding (made by a subkey). */ - sig->sig_class == 0x19 - /* Direct key signature. */ - || sig->sig_class == 0x1f - /* Primary key revocation. */ - || sig->sig_class == 0x20) + if (IS_BACK_SIG (sig) || IS_KEY_SIG (sig) || IS_KEY_REV (sig)) { /* Key revocations can only be over primary keys. */ if (packet->pkttype != PKT_PUBLIC_KEY) return gpg_error (GPG_ERR_SIG_CLASS); } - else if (/* Subkey binding. */ - sig->sig_class == 0x18 - /* Subkey revocation. */ - || sig->sig_class == 0x28) + else if (IS_SUBKEY_SIG (sig) || IS_SUBKEY_REV (sig)) { if (packet->pkttype != PKT_PUBLIC_SUBKEY) return gpg_error (GPG_ERR_SIG_CLASS); } - else if (/* Certification. */ - sig->sig_class == 0x10 - || sig->sig_class == 0x11 - || sig->sig_class == 0x12 - || sig->sig_class == 0x13 - /* Certification revocation. */ - || sig->sig_class == 0x30) + else if (IS_UID_SIG (sig) || IS_UID_REV (sig)) { if (packet->pkttype != PKT_USER_ID) return gpg_error (GPG_ERR_SIG_CLASS); @@ -849,7 +852,7 @@ check_signature_over_key_or_uid (ctrl_t ctrl, PKT_public_key *signer, else { /* See if one of the subkeys was the signer (although this - is extremely unlikely). */ + * is extremely unlikely). */ kbnode_t ctx = NULL; kbnode_t n; @@ -909,40 +912,27 @@ check_signature_over_key_or_uid (ctrl_t ctrl, PKT_public_key *signer, /* Hash the relevant data. */ - if (/* Direct key signature. */ - sig->sig_class == 0x1f - /* Primary key revocation. */ - || sig->sig_class == 0x20) + if (IS_KEY_SIG (sig) || IS_KEY_REV (sig)) { log_assert (packet->pkttype == PKT_PUBLIC_KEY); hash_public_key (md, packet->pkt.public_key); rc = check_signature_end_simple (signer, sig, md); } - else if (/* Primary key binding (made by a subkey). */ - sig->sig_class == 0x19) + else if (IS_BACK_SIG (sig)) { log_assert (packet->pkttype == PKT_PUBLIC_KEY); hash_public_key (md, packet->pkt.public_key); hash_public_key (md, signer); rc = check_signature_end_simple (signer, sig, md); } - else if (/* Subkey binding. */ - sig->sig_class == 0x18 - /* Subkey revocation. */ - || sig->sig_class == 0x28) + else if (IS_SUBKEY_SIG (sig) || IS_SUBKEY_REV (sig)) { log_assert (packet->pkttype == PKT_PUBLIC_SUBKEY); hash_public_key (md, pripk); hash_public_key (md, packet->pkt.public_key); rc = check_signature_end_simple (signer, sig, md); } - else if (/* Certification. */ - sig->sig_class == 0x10 - || sig->sig_class == 0x11 - || sig->sig_class == 0x12 - || sig->sig_class == 0x13 - /* Certification revocation. */ - || sig->sig_class == 0x30) + else if (IS_UID_SIG (sig) || IS_UID_REV (sig)) { log_assert (packet->pkttype == PKT_USER_ID); hash_public_key (md, pripk); @@ -1073,7 +1063,7 @@ check_key_signature2 (ctrl_t ctrl, if (rc) return rc; - if (sig->sig_class == 0x20) /* key revocation */ + if (IS_KEY_REV (sig)) { u32 keyid[2]; keyid_from_pk( pk, keyid ); @@ -1091,8 +1081,7 @@ check_key_signature2 (ctrl_t ctrl, is_selfsig, ret_pk); } } - else if (sig->sig_class == 0x28 /* subkey revocation */ - || sig->sig_class == 0x18) /* key binding */ + else if (IS_SUBKEY_REV (sig) || IS_SUBKEY_SIG (sig)) { kbnode_t snode = find_prev_kbnode (root, node, PKT_PUBLIC_SUBKEY); @@ -1102,9 +1091,10 @@ check_key_signature2 (ctrl_t ctrl, r_expired, NULL); if (! rc) { - /* 0x28 must be a self-sig, but 0x18 needn't be. */ + /* A subkey revocation (0x28) must be a self-sig, but a + * subkey signature (0x18) needn't be. */ rc = check_signature_over_key_or_uid (ctrl, - sig->sig_class == 0x18 + IS_SUBKEY_SIG (sig) ? NULL : pk, sig, root, snode->pkt, is_selfsig, ret_pk); @@ -1114,7 +1104,7 @@ check_key_signature2 (ctrl_t ctrl, { if (opt.verbose) { - if (sig->sig_class == 0x28) + if (IS_SUBKEY_REV (sig)) log_info (_("key %s: no subkey for subkey" " revocation signature\n"), keystr_from_pk(pk)); else if (sig->sig_class == 0x18) @@ -1124,7 +1114,7 @@ check_key_signature2 (ctrl_t ctrl, rc = GPG_ERR_SIG_CLASS; } } - else if (sig->sig_class == 0x1f) /* direct key signature */ + else if (IS_KEY_SIG (sig)) /* direct key signature */ { rc = check_signature_metadata_validity (pk, sig, r_expired, NULL); @@ -1132,13 +1122,7 @@ check_key_signature2 (ctrl_t ctrl, rc = check_signature_over_key_or_uid (ctrl, pk, sig, root, root->pkt, is_selfsig, ret_pk); } - else if (/* Certification. */ - sig->sig_class == 0x10 - || sig->sig_class == 0x11 - || sig->sig_class == 0x12 - || sig->sig_class == 0x13 - /* Certification revocation. */ - || sig->sig_class == 0x30) + else if (IS_UID_SIG (sig) || IS_UID_REV (sig)) { kbnode_t unode = find_prev_kbnode (root, node, PKT_USER_ID); ----------------------------------------------------------------------- Summary of changes: g10/keydb.h | 1 + g10/sig-check.c | 758 +++++++++++++++++++++++++++----------------------------- 2 files changed, 372 insertions(+), 387 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Apr 6 11:08:38 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 06 Apr 2018 11:08:38 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-48-gcfd0779 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 cfd07798087f671c134eef056229bb30e08cc77c (commit) from 5ba74a134db431530884f03eea5410a68dbfe0f5 (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 cfd07798087f671c134eef056229bb30e08cc77c Author: Werner Koch Date: Fri Apr 6 11:01:46 2018 +0200 doc: Add a code comment about back signatures. -- diff --git a/g10/keydb.h b/g10/keydb.h index 627564c..cc99241 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -26,7 +26,9 @@ #include "../common/util.h" #include "packet.h" -/* What qualifies as a certification (rather than a signature?) */ +/* What qualifies as a certification (key-signature in contrast to a + * data signature)? Note that a back signature is special and can be + * made by key and data signatures capable subkeys.) */ #define IS_CERT(s) (IS_KEY_SIG(s) || IS_UID_SIG(s) || IS_SUBKEY_SIG(s) \ || IS_KEY_REV(s) || IS_UID_REV(s) || IS_SUBKEY_REV(s)) #define IS_SIG(s) (!IS_CERT(s)) ----------------------------------------------------------------------- Summary of changes: g10/keydb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Apr 6 17:41:50 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 06 Apr 2018 17:41:50 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-49-g0336e5d 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 0336e5d1a7b9d46e06c838e6a98aecfcc9542882 (commit) from cfd07798087f671c134eef056229bb30e08cc77c (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 0336e5d1a7b9d46e06c838e6a98aecfcc9542882 Author: Werner Koch Date: Fri Apr 6 17:32:08 2018 +0200 gpg: Emit FAILURE stati now in almost all cases. * g10/cpr.c (write_status_failure): Make it print only once. * g10/gpg.c (wrong_args): Bump error counter. (g10_exit): Print a FAILURE status if we ever did a log_error etc. (main): Use log_error instead of log_fatal at one place. Print a FAILURE status for a bad option. Ditto for certain exit points so that we can see different error locations. -- This makes it easier to detect errors by tools which have no way to get the exit code (e.g. due to double forking). GnuPG-bug-id: 3872 Signed-off-by: Werner Koch diff --git a/g10/cpr.c b/g10/cpr.c index a7fd1aa..4354426 100644 --- a/g10/cpr.c +++ b/g10/cpr.c @@ -245,9 +245,13 @@ write_status_errcode (const char *where, int errcode) void write_status_failure (const char *where, gpg_error_t err) { + static int any_failure_printed; + if (!statusfp || !status_currently_allowed (STATUS_FAILURE)) return; /* Not enabled or allowed. */ - + if (any_failure_printed) + return; + any_failure_printed = 1; es_fprintf (statusfp, "[GNUPG:] %s %s %u\n", get_status_string (STATUS_FAILURE), where, err); if (es_fflush (statusfp) && opt.exit_on_status_write_error) diff --git a/g10/gpg.c b/g10/gpg.c index bfff7a5..2c93a83 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -1166,6 +1166,7 @@ static void wrong_args( const char *text) { es_fprintf (es_stderr, _("usage: %s [options] %s\n"), GPG_NAME, text); + log_inc_errorcount (); g10_exit(2); } @@ -3107,7 +3108,7 @@ main (int argc, char **argv) case oCommandFD: opt.command_fd = translate_sys2libc_fd_int (pargs.r.ret_int, 0); if (! gnupg_fd_valid (opt.command_fd)) - log_fatal ("command-fd is invalid: %s\n", strerror (errno)); + log_error ("command-fd is invalid: %s\n", strerror (errno)); break; case oCommandFile: opt.command_fd = open_info_file (pargs.r.ret_str, 0, 1); @@ -3563,7 +3564,16 @@ main (int argc, char **argv) case oNoop: break; default: - pargs.err = configfp? ARGPARSE_PRINT_WARNING:ARGPARSE_PRINT_ERROR; + if (configfp) + pargs.err = ARGPARSE_PRINT_WARNING; + else + { + pargs.err = ARGPARSE_PRINT_ERROR; + /* The argparse fucntion calls a plain exit and thus + * we need to print a status here. */ + write_status_failure ("option-parser", + gpg_error(GPG_ERR_GENERAL)); + } break; } } @@ -3582,7 +3592,10 @@ main (int argc, char **argv) } xfree(configname); configname = NULL; if (log_get_errorcount (0)) - g10_exit(2); + { + write_status_failure ("option-parser", gpg_error(GPG_ERR_GENERAL)); + g10_exit(2); + } /* The command --gpgconf-list is pretty simple and may be called directly after the option parsing. */ @@ -3603,7 +3616,10 @@ main (int argc, char **argv) "--print-pks-records", "--export-options export-pka"); if (log_get_errorcount (0)) - g10_exit(2); + { + write_status_failure ("option-checking", gpg_error(GPG_ERR_GENERAL)); + g10_exit(2); + } if( nogreeting ) @@ -3704,6 +3720,7 @@ main (int argc, char **argv) { log_info(_("will not run with insecure memory due to %s\n"), "--require-secmem"); + write_status_failure ("option-checking", gpg_error(GPG_ERR_GENERAL)); g10_exit(2); } @@ -3844,7 +3861,11 @@ main (int argc, char **argv) } if( log_get_errorcount(0) ) - g10_exit(2); + { + write_status_failure ("option-postprocessing", + gpg_error(GPG_ERR_GENERAL)); + g10_exit (2); + } if(opt.compress_level==0) opt.compress_algo=COMPRESS_ALGO_NONE; @@ -3945,7 +3966,10 @@ main (int argc, char **argv) /* Fail hard. */ if (log_get_errorcount (0)) + { + write_status_failure ("option-checking", gpg_error(GPG_ERR_GENERAL)); g10_exit (2); + } /* Set the random seed file. */ if( use_random_seed ) { @@ -4929,7 +4953,10 @@ main (int argc, char **argv) hd = keydb_new (); if (! hd) - g10_exit (1); + { + write_status_failure ("tofu-driver", gpg_error(GPG_ERR_GENERAL)); + g10_exit (1); + } tofu_begin_batch_update (ctrl); @@ -4943,6 +4970,7 @@ main (int argc, char **argv) { log_error (_("error parsing key specification '%s': %s\n"), argv[i], gpg_strerror (rc)); + write_status_failure ("tofu-driver", rc); g10_exit (1); } @@ -4956,6 +4984,8 @@ main (int argc, char **argv) log_error (_("'%s' does not appear to be a valid" " key ID, fingerprint or keygrip\n"), argv[i]); + write_status_failure ("tofu-driver", + gpg_error(GPG_ERR_GENERAL)); g10_exit (1); } @@ -4966,6 +4996,7 @@ main (int argc, char **argv) the string. */ log_error ("keydb_search_reset failed: %s\n", gpg_strerror (rc)); + write_status_failure ("tofu-driver", rc); g10_exit (1); } @@ -4974,6 +5005,7 @@ main (int argc, char **argv) { log_error (_("key \"%s\" not found: %s\n"), argv[i], gpg_strerror (rc)); + write_status_failure ("tofu-driver", rc); g10_exit (1); } @@ -4982,12 +5014,16 @@ main (int argc, char **argv) { log_error (_("error reading keyblock: %s\n"), gpg_strerror (rc)); + write_status_failure ("tofu-driver", rc); g10_exit (1); } merge_keys_and_selfsig (ctrl, kb); if (tofu_set_policy (ctrl, kb, policy)) - g10_exit (1); + { + write_status_failure ("tofu-driver", rc); + g10_exit (1); + } release_kbnode (kb); } @@ -5069,6 +5105,12 @@ emergency_cleanup (void) void g10_exit( int rc ) { + /* If we had an error but not printed an error message, do it now. + * Note that write_status_failure will never print a second failure + * status line. */ + if (log_get_errorcount (0)) + write_status_failure ("gpg-exit", gpg_error (GPG_ERR_GENERAL)); + gcry_control (GCRYCTL_UPDATE_RANDOM_SEED_FILE); if (DBG_CLOCK) log_clock ("stop"); diff --git a/sm/gpgsm.c b/sm/gpgsm.c index b81e3b6..da1783d 100644 --- a/sm/gpgsm.c +++ b/sm/gpgsm.c @@ -1464,7 +1464,7 @@ main ( int argc, char **argv) DIM (compliance_options), opt.quiet); if (compliance < 0) - gpgsm_exit (1); + log_inc_errorcount (); /* Force later termination. */ opt.compliance = compliance; } break; @@ -1493,7 +1493,11 @@ main ( int argc, char **argv) NULL); if (log_get_errorcount(0)) - gpgsm_exit(2); + { + gpgsm_status_with_error (&ctrl, STATUS_FAILURE, + "option-parser", gpg_error (GPG_ERR_GENERAL)); + gpgsm_exit(2); + } if (pwfd != -1) /* Read the passphrase now. */ read_passphrase_from_fd (pwfd); @@ -1660,7 +1664,11 @@ main ( int argc, char **argv) gnupg_compliance_option_string (opt.compliance)); if (log_get_errorcount(0)) - gpgsm_exit(2); + { + gpgsm_status_with_error (&ctrl, STATUS_FAILURE, "option-postprocessing", + gpg_error (GPG_ERR_GENERAL)); + gpgsm_exit (2); + } /* Set the random seed file. */ if (use_random_seed) ----------------------------------------------------------------------- Summary of changes: g10/cpr.c | 6 +++++- g10/gpg.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++------- sm/gpgsm.c | 14 +++++++++++--- 3 files changed, 65 insertions(+), 11 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Apr 9 10:28:36 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 09 Apr 2018 10:28:36 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-50-g1a5d95e 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 1a5d95e7319e7e6f0dd11064a26cbbc371b05214 (commit) from 0336e5d1a7b9d46e06c838e6a98aecfcc9542882 (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 1a5d95e7319e7e6f0dd11064a26cbbc371b05214 Author: Werner Koch Date: Fri Apr 6 11:04:04 2018 +0200 gpg: Check that a key may do certifications. * g10/sig-check.c (check_signature_end_simple): Check key usage for certifications. (check_signature_over_key_or_uid): Request usage certification. -- GnuPG-bug-id: 3844 Signed-off-by: Werner Koch diff --git a/g10/sig-check.c b/g10/sig-check.c index 1a90fd3..e5de025 100644 --- a/g10/sig-check.c +++ b/g10/sig-check.c @@ -464,6 +464,24 @@ check_signature_end_simple (PKT_public_key *pk, PKT_signature *sig, } } + /* For key signatures check that the key has a cert usage. We may + * do this only for subkeys because the primary may always issue key + * signature. The latter may not be reflected in the pubkey_usage + * field because we need to check the key signatures to extract the + * key usage. */ + if (!pk->flags.primary + && IS_CERT (sig) && !(pk->pubkey_usage & PUBKEY_USAGE_CERT)) + { + rc = gpg_error (GPG_ERR_WRONG_KEY_USAGE); + if (!opt.quiet) + log_info (_("bad key signature from key %s: %s (0x%02x, 0x%x)\n"), + keystr_from_pk (pk), gpg_strerror (rc), + sig->sig_class, pk->pubkey_usage); + return rc; + } + /* Fixme: Should we also check the signing capability here for data + * signature? */ + /* Make sure the digest algo is enabled (in case of a detached * signature). */ gcry_md_enable (digest, sig->digest_algo); @@ -893,6 +911,9 @@ check_signature_over_key_or_uid (ctrl_t ctrl, PKT_public_key *signer, signer_alloced = 2; } + if (IS_CERT (sig)) + signer->req_usage = PUBKEY_USAGE_CERT; + rc = get_pubkey (ctrl, signer, sig->keyid); if (rc) { ----------------------------------------------------------------------- Summary of changes: g10/sig-check.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Apr 9 10:58:39 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 09 Apr 2018 10:58:39 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-52-g519e456 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 519e4560e821e4c41432626b241bca7d37143e01 (commit) via a4e26f2ee852003707857ab0635b783acb89a2f8 (commit) from 1a5d95e7319e7e6f0dd11064a26cbbc371b05214 (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 519e4560e821e4c41432626b241bca7d37143e01 Author: Werner Koch Date: Mon Apr 9 10:44:44 2018 +0200 doc: Add an example for --default-new-key-algo -- diff --git a/doc/examples/vsnfd.prf b/doc/examples/vsnfd.prf index 1dc21e0..061e069 100644 --- a/doc/examples/vsnfd.prf +++ b/doc/examples/vsnfd.prf @@ -1,12 +1,16 @@ # vsnfd.prf - Configure options for the VS-NfD mode -*- conf -*- +# +# The options for each tool are configured in a section ("[TOOL]"); +# see the respective man page for a description of these options and +# the gpgconf manpage for a description of this file's syntax. [gpg] compliance de-vs default-new-key-algo rsa3072/cert,sign+rsa3072/encr [gpgsm] -enable-crl-checks compliance de-vs +enable-crl-checks [gpg-agent] enable-extended-key-format diff --git a/doc/gpg.texi b/doc/gpg.texi index 3c505c9..6537acd 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -1014,7 +1014,7 @@ signing. Encrypt) are set during key creation. Sometimes it is useful to have the opportunity to change them (for example to add Authenticate) after they have been created. Please take care when - doing this, the possible usage flags depend on the key algorithm. + doing this; the allowed usage flags depend on the key algorithm. @item cross-certify @opindex keyedit:cross-certify @@ -3338,9 +3338,14 @@ absolute date in the form YYYY-MM-DD. Defaults to "0". @item --default-new-key-algo @var{string} @opindex default-new-key-algo @var{string} This option can be used to change the default algorithms for key -generation. Note that the advanced key generation commands can always -be used to specify a key algorithm directly. Please consult the -source code to learn the syntax of @var{string}. +generation. The @var{string} is similar to the arguments required for +the command @option{--quick-add-key} but slighly different. For +example the current default of @code{"rsa2048/cert,sign+rsa2048/encr"} +(or @code{"rsa3072"}) can be changed to the value of what we currently +call future default, which is @code{"ed25519/cert,sign+cv25519/encr"}. +You need to consult the source code to learn the details. Note that +the advanced key generation commands can always be used to specify a +key algorithm directly. @item --allow-secret-key-import @opindex allow-secret-key-import commit a4e26f2ee852003707857ab0635b783acb89a2f8 Author: Werner Koch Date: Mon Apr 9 10:36:02 2018 +0200 doc: Document --key-edit:change-usage * g10/keyedit.c (menu_changeusage): Make strings translatable. -- GnuPG-bug-id: 3816 Signed-off-by: Werner Koch diff --git a/doc/gpg.texi b/doc/gpg.texi index d840b85..3c505c9 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -1007,6 +1007,15 @@ signing. Make the key as small as possible. This removes all signatures from each user ID except for the most recent self-signature. + @item change-usage + @opindex keyedit:change-usage + Change the usage flags (capabilities) of the primary key or of + subkeys. These usage flags (e.g. Certify, Sign, Authenticate, + Encrypt) are set during key creation. Sometimes it is useful to + have the opportunity to change them (for example to add + Authenticate) after they have been created. Please take care when + doing this, the possible usage flags depend on the key algorithm. + @item cross-certify @opindex keyedit:cross-certify Add cross-certification signatures to signing subkeys that may not diff --git a/g10/keyedit.c b/g10/keyedit.c index 4ade5cd..7cd883d 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -4535,10 +4535,10 @@ menu_changeusage (ctrl_t ctrl, kbnode_t keyblock) return 0; } else if (n1) - tty_printf ("Changing usage of a subkey.\n"); + tty_printf (_("Changing usage of a subkey.\n")); else { - tty_printf ("Changing usage of the primary key.\n"); + tty_printf (_("Changing usage of the primary key.\n")); mainkey = 1; } @@ -4578,6 +4578,8 @@ menu_changeusage (ctrl_t ctrl, kbnode_t keyblock) if ((mainkey && main_pk->version < 4) || (!mainkey && sub_pk->version < 4)) { + /* Note: This won't happen because we don't support + * v3 keys anymore. */ log_info ("You can't change the capabilities of a v3 key\n"); return 0; } @@ -4602,7 +4604,7 @@ menu_changeusage (ctrl_t ctrl, kbnode_t keyblock) if (rc) { log_error ("make_keysig_packet failed: %s\n", - gpg_strerror (rc)); + gpg_strerror (rc)); return 0; } ----------------------------------------------------------------------- Summary of changes: doc/examples/vsnfd.prf | 6 +++++- doc/gpg.texi | 20 +++++++++++++++++--- g10/keyedit.c | 8 +++++--- 3 files changed, 27 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Apr 9 14:55:13 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 09 Apr 2018 14:55:13 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-53-g6da7aa1 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 6da7aa1e7c80d214bd9dccb21744919ae191f2c8 (commit) from 519e4560e821e4c41432626b241bca7d37143e01 (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 6da7aa1e7c80d214bd9dccb21744919ae191f2c8 Author: Werner Koch Date: Mon Apr 9 14:44:21 2018 +0200 gpg,w32: Fix empty homedir when only a drive letter is used. * common/homedir.c (copy_dir_with_fixup): New. (default_homedir): Use here. (gnupg_set_homedir): And here . -- This actually fixes a couple of cases for Windows. Both --home-dir and GNUPGHOME. The interpretation of "c:" -> "c:/" might not be the correct one but because we need an absolute dir anyway it is the less surprising one. Note that this does not include a full syntax check and fixup and thus it is very well possible that the result is not an absolute directory. GnuPG-bug-id: 3720 Signed-off-by: Werner Koch diff --git a/common/homedir.c b/common/homedir.c index 65cf50f..e9e75d0 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -171,6 +171,62 @@ is_gnupg_default_homedir (const char *dir) } +/* Helper to remove trailing slashes from NEWDIR. Return a new + * allocated string if that has been done or NULL if there are no + * slashes to remove. Also inserts a missing slash after a Windows + * drive letter. */ +static char * +copy_dir_with_fixup (const char *newdir) +{ + char *result = NULL; + char *p; + + if (!*newdir) + return NULL; + +#ifdef HAVE_W32_SYSTEM + if (newdir[0] && newdir[1] == ':' + && !(newdir[2] == '/' || newdir[2] == '\\')) + { + /* Drive letter with missing leading slash. */ + p = result = xmalloc (strlen (newdir) + 1 + 1); + *p++ = newdir[0]; + *p++ = newdir[1]; + *p++ = '\\'; + strcpy (p, newdir+2); + + /* Remove trailing slashes. */ + p = result + strlen (result) - 1; + while (p > result+2 && (*p == '/' || *p == '\\')) + *p-- = 0; + } + else if (newdir[strlen (newdir)-1] == '/' + || newdir[strlen (newdir)-1] == '\\' ) + { + result = xstrdup (newdir); + p = result + strlen (result) - 1; + while (p > result + && (*p == '/' || *p == '\\') + && (p-1 > result && p[-1] != ':')) /* We keep "c:/". */ + *p-- = 0; + } + +#else /*!HAVE_W32_SYSTEM*/ + + if (newdir[strlen (newdir)-1] == '/') + { + result = xstrdup (newdir); + p = result + strlen (result) - 1; + while (p > result && *p == '/') + *p-- = 0; + } + +#endif /*!HAVE_W32_SYSTEM*/ + + return result; +} + + /* Get the standard home directory. In general this function should not be used as it does not consider a registry value (under W32) or the GNUPGHOME environment variable. It is better to use @@ -278,18 +334,11 @@ default_homedir (void) dir = GNUPG_DEFAULT_HOMEDIR; else { - /* Strip trailing slashes if any. */ - if (dir[strlen (dir)-1] == '/') - { - char *tmp, *p; - - tmp = xstrdup (dir); - p = tmp + strlen (tmp) - 1; - while (p > tmp && *p == '/') - *p-- = 0; + char *p; - dir = tmp; - } + p = copy_dir_with_fixup (dir); + if (p) + dir = p; if (!is_gnupg_default_homedir (dir)) non_default_homedir = 1; @@ -432,28 +481,10 @@ gnupg_set_homedir (const char *newdir) newdir = default_homedir (); else { - /* Remove trailing slashes from NEWSDIR. */ - if (newdir[strlen (newdir)-1] == '/' -#ifdef HAVE_W32_SYSTEM - || newdir[strlen (newdir)-1] == '\\' -#endif - ) - { - char *p; + tmp = copy_dir_with_fixup (newdir); + if (tmp) + newdir = tmp; - tmp = xstrdup (newdir); - p = tmp + strlen (tmp) - 1; - while (p > tmp - && (*p == '/' -#ifdef HAVE_W32_SYSTEM - || *p == '\\' -#endif - ) - ) - *p-- = 0; - - newdir = tmp; - } if (!is_gnupg_default_homedir (newdir)) non_default_homedir = 1; } ----------------------------------------------------------------------- Summary of changes: common/homedir.c | 95 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 63 insertions(+), 32 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Apr 9 19:55:18 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 09 Apr 2018 19:55:18 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.5-54-g7fa6f14 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 7fa6f1481454ab8b4d166ac2d055abdba5f8baab (commit) from 6da7aa1e7c80d214bd9dccb21744919ae191f2c8 (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 7fa6f1481454ab8b4d166ac2d055abdba5f8baab Author: Werner Koch Date: Mon Apr 9 19:46:54 2018 +0200 doc: Typo fix in gpg.texi -- Reported-by: Cody Brownstein diff --git a/doc/gpg.texi b/doc/gpg.texi index 6537acd..086b4fc 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -306,7 +306,7 @@ List the specified secret keys. If no keys are specified, then all known secret keys are listed. A @code{#} after the initial tags @code{sec} or @code{ssb} means that the secret key or subkey is currently not usable. We also say that this key has been taken -offline (for example, a primary key can be taken offline by exported +offline (for example, a primary key can be taken offline by exporting the key using the command @option{--export-secret-subkeys}). A @code{>} after these tags indicate that the key is stored on a smartcard. See also @option{--list-keys}. ----------------------------------------------------------------------- Summary of changes: doc/gpg.texi | 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 Mon Apr 9 22:39:26 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 09 Apr 2018 22:39:26 +0200 Subject: [git] gnupg-doc - branch, master, updated. 2094fc1631aca2659732e0b28e03012e2dc67127 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 2094fc1631aca2659732e0b28e03012e2dc67127 (commit) from 377a56b4db99d4c3efa9df4ffc615640f3d76532 (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 2094fc1631aca2659732e0b28e03012e2dc67127 Author: Werner Koch Date: Mon Apr 9 22:32:31 2018 +0200 swdb: Release GnuPG 2.2.6 Also removes the temporary used gnupg21_ tags. diff --git a/web/swdb.mac b/web/swdb.mac index 1c6bebf..5dc612a 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -10,32 +10,17 @@ # # GnuPG-2.2 # -#+macro: gnupg22_ver 2.2.5 -#+macro: gnupg22_date 2018-02-22 -#+macro: gnupg22_size 6430k -#+macro: gnupg22_sha1 9dec110397e460b3950943e18f5873a4f277f216 -#+macro: gnupg22_sha2 3fa189a32d4fb62147874eb1389047c267d9ba088f57ab521cb0df46f08aef57 +#+macro: gnupg22_ver 2.2.6 +#+macro: gnupg22_date 2018-04-09 +#+macro: gnupg22_size 6450k +#+macro: gnupg22_sha1 295298debcc2c12f02a2f2fdf04aecb6d6aae396 +#+macro: gnupg22_sha2 e64d8c5fa2d05938a5080cb784a98ac21be0812f2a26f844b18f0d6a0e711984 #+macro: gnupg22_branch STABLE-BRANCH-2-2 -#+macro: gnupg22_w32_ver 2.2.5_20180222 -#+macro: gnupg22_w32_date 2018-02-22 -#+macro: gnupg22_w32_size 3819k -#+macro: gnupg22_w32_sha1 080f801e833c7a9e0441d55cd19d4bdb5bb261f9 -#+macro: gnupg22_w32_sha2 9fea4add738a373b3c1a304f74eec2d24a8f5fe7ccdf1d8ee090d99de8f51257 - - -# temporary keep it as "gnupg21". In the future we will use the name of -# the stable branch even for the development versions. -#+macro: gnupg21_ver 2.2.5 -#+macro: gnupg21_date 2018-02-22 -#+macro: gnupg21_size 6430k -#+macro: gnupg21_sha1 9dec110397e460b3950943e18f5873a4f277f216 -#+macro: gnupg21_sha2 3fa189a32d4fb62147874eb1389047c267d9ba088f57ab521cb0df46f08aef57 -#+macro: gnupg21_branch STABLE-BRANCH-2-2 -#+macro: gnupg21_w32_ver 2.2.5_20180222 -#+macro: gnupg21_w32_date 2018-02-22 -#+macro: gnupg21_w32_size 3819k -#+macro: gnupg21_w32_sha1 080f801e833c7a9e0441d55cd19d4bdb5bb261f9 -#+macro: gnupg21_w32_sha2 9fea4add738a373b3c1a304f74eec2d24a8f5fe7ccdf1d8ee090d99de8f51257 +#+macro: gnupg22_w32_ver 2.2.6_20180409 +#+macro: gnupg22_w32_date 2018-04-09 +#+macro: gnupg22_w32_size 3837k +#+macro: gnupg22_w32_sha1 c9fe66788ea40bc57a189aa13e7c83add9baec40 +#+macro: gnupg22_w32_sha2 5d426b19d9cc3d7d3c0db0dfb58af1b6a36f4ea1cfd55901bb6864e865fcccc6 # ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 00:12:13 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Tue, 10 Apr 2018 00:12:13 +0200 Subject: [git] GnuPG - branch, T3880, created. gnupg-2.2.6-3-g381c468 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, T3880 has been created at 381c46818ffa4605d0ca39818fe317de445eb6de (commit) - Log ----------------------------------------------------------------- commit 381c46818ffa4605d0ca39818fe317de445eb6de Author: Daniel Kahn Gillmor Date: Mon Apr 9 18:06:38 2018 -0400 agent: unknown flags on ssh signing requests cause an error. * agent/command-ssh.c (ssh_handler_sign_request): if a flag is passed during an signature request that we do not know how to apply, return GPG_ERR_UNKNOWN_OPTION. -- https://tools.ietf.org/html/draft-miller-ssh-agent-02#section-4.5 says: If the agent does not support the requested flags, or is otherwise unable or unwilling to generate the signature (e.g. because it doesn't have the specified key, or the user refused confirmation of a constrained key), it must reply with a SSH_AGENT_FAILURE message. Signed-off-by: Daniel Kahn Gillmor GnuPG-bug-id: 3880 diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 5317df5..ac67dd0 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -2864,7 +2864,7 @@ ssh_handler_sign_request (ctrl_t ctrl, estream_t request, estream_t response) unsigned char *sig = NULL; size_t sig_n; u32 data_size; - u32 flags; + u32 flags, known_flags = 0; gpg_error_t err; gpg_error_t ret_err; int hash_algo; @@ -2890,6 +2890,7 @@ ssh_handler_sign_request (ctrl_t ctrl, estream_t request, estream_t response) if (spec.algo == GCRY_PK_RSA) { + known_flags = SSH_AGENT_RSA_SHA2_256 | SSH_AGENT_RSA_SHA2_512; if ((flags & SSH_AGENT_RSA_SHA2_256)) { spec.ssh_identifier = "rsa-sha2-256"; @@ -2902,6 +2903,13 @@ ssh_handler_sign_request (ctrl_t ctrl, estream_t request, estream_t response) } } + /* some flag is present that we do not know about. */ + if (flags & ~known_flags) + { + err = gpg_error (GPG_ERR_UNKNOWN_OPTION); + goto out; + } + hash_algo = spec.hash_algo; if (!hash_algo) hash_algo = GCRY_MD_SHA1; /* Use the default. */ commit 55435cdd4fe4fbfbcba1098bb715ecd6171ba2d8 Author: Daniel Kahn Gillmor Date: Thu Apr 5 11:49:44 2018 -0400 agent: change documentation reference for ssh-agent protocol. * agent/command-ssh.c: repoint documentation reference. -- Damien Miller is now documenting the ssh-agent protocol via the IETF. Signed-off-by: Daniel Kahn Gillmor diff --git a/agent/command-ssh.c b/agent/command-ssh.c index d1158e7..5317df5 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -27,8 +27,10 @@ RFC-4253 - Transport Layer Protocol RFC-5656 - ECC support - The protocol for the agent is defined in OpenSSH's PROTOCL.agent - file. + The protocol for the agent is defined in: + + https://tools.ietf.org/html/draft-miller-ssh-agent + */ #include ----------------------------------------------------------------------- hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 00:13:07 2018 From: cvs at cvs.gnupg.org (by Daniel Kahn Gillmor) Date: Tue, 10 Apr 2018 00:13:07 +0200 Subject: [git] GnuPG - branch, T3880-fix, created. gnupg-2.2.6-3-g381c468 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, T3880-fix has been created at 381c46818ffa4605d0ca39818fe317de445eb6de (commit) - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 04:03:49 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Tue, 10 Apr 2018 04:03:49 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-60-g0de2a22 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 0de2a22fcf6607d0aecb550feefa414cee3731b2 (commit) from 9b58e4a03ba3aeff7bae3f40da706977870c9649 (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 0de2a22fcf6607d0aecb550feefa414cee3731b2 Author: NIIBE Yutaka Date: Tue Apr 10 11:01:57 2018 +0900 random: Protect another use of jent_rng_collector. * random/rndjent.c (_gcry_rndjent_get_version): Lock the access. Signed-off-by: NIIBE Yutaka diff --git a/random/rndjent.c b/random/rndjent.c index 6e56c8a..0c5a820 100644 --- a/random/rndjent.c +++ b/random/rndjent.c @@ -334,11 +334,13 @@ _gcry_rndjent_get_version (int *r_active) { if (r_active) { + lock_rng (); /* Make sure the RNG is initialized. */ _gcry_rndjent_poll (NULL, 0, 0); /* To ease debugging we store 2 for a clock_gettime based * implementation and 1 for a rdtsc based code. */ *r_active = jent_rng_collector? is_rng_available () : 0; + unlock_rng (); } return jent_version (); } ----------------------------------------------------------------------- Summary of changes: random/rndjent.c | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 08:07:00 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 10 Apr 2018 08:07:00 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-4-g9f69dbe 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 9f69dbeb902ac447adbc92937cd451c4e909f234 (commit) via 381c46818ffa4605d0ca39818fe317de445eb6de (commit) via 55435cdd4fe4fbfbcba1098bb715ecd6171ba2d8 (commit) from 30081d2851e06944a892a66b8f2d983a495a5686 (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 9f69dbeb902ac447adbc92937cd451c4e909f234 Author: Werner Koch Date: Tue Apr 10 07:59:52 2018 +0200 agent: Improve the unknown ssh flag detection. * agent/command-ssh.c (ssh_handler_sign_request): Simplify detection of flags. -- Signed-off-by: Werner Koch diff --git a/agent/command-ssh.c b/agent/command-ssh.c index ac67dd0..20dc3fe 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -2864,7 +2864,6 @@ ssh_handler_sign_request (ctrl_t ctrl, estream_t request, estream_t response) unsigned char *sig = NULL; size_t sig_n; u32 data_size; - u32 flags, known_flags = 0; gpg_error_t err; gpg_error_t ret_err; int hash_algo; @@ -2884,31 +2883,39 @@ ssh_handler_sign_request (ctrl_t ctrl, estream_t request, estream_t response) if (err) goto out; - err = stream_read_uint32 (request, &flags); - if (err) - goto out; - - if (spec.algo == GCRY_PK_RSA) - { - known_flags = SSH_AGENT_RSA_SHA2_256 | SSH_AGENT_RSA_SHA2_512; - if ((flags & SSH_AGENT_RSA_SHA2_256)) - { - spec.ssh_identifier = "rsa-sha2-256"; - spec.hash_algo = GCRY_MD_SHA256; - } - else if ((flags & SSH_AGENT_RSA_SHA2_512)) - { - spec.ssh_identifier = "rsa-sha2-512"; - spec.hash_algo = GCRY_MD_SHA512; - } - } + /* Flag processing. */ + { + u32 flags; - /* some flag is present that we do not know about. */ - if (flags & ~known_flags) - { - err = gpg_error (GPG_ERR_UNKNOWN_OPTION); + err = stream_read_uint32 (request, &flags); + if (err) goto out; - } + + if (spec.algo == GCRY_PK_RSA) + { + if ((flags & SSH_AGENT_RSA_SHA2_512)) + { + flags &= ~SSH_AGENT_RSA_SHA2_512; + spec.ssh_identifier = "rsa-sha2-512"; + spec.hash_algo = GCRY_MD_SHA512; + } + if ((flags & SSH_AGENT_RSA_SHA2_256)) + { + /* Note: We prefer SHA256 over SHA512. */ + flags &= ~SSH_AGENT_RSA_SHA2_256; + spec.ssh_identifier = "rsa-sha2-256"; + spec.hash_algo = GCRY_MD_SHA256; + } + } + + /* Some flag is present that we do not know about. Note that + * processed or known flags have been cleared at this point. */ + if (flags) + { + err = gpg_error (GPG_ERR_UNKNOWN_OPTION); + goto out; + } + } hash_algo = spec.hash_algo; if (!hash_algo) ----------------------------------------------------------------------- Summary of changes: agent/command-ssh.c | 55 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 19 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 09:37:53 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 10 Apr 2018 09:37:53 +0200 Subject: [git] GpgEX - branch, master, updated. gpgex-1.0.5-4-g5baafc2 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 the Windows Explorer". The branch, master has been updated via 5baafc20c8900d515fd73cc94a33f5c156251c09 (commit) from 4fbbd134b865b1203b1914eb1623fa65aab8cb75 (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 5baafc20c8900d515fd73cc94a33f5c156251c09 Author: Andre Heinecke Date: Tue Apr 10 09:28:48 2018 +0200 Update NEWS for todays release diff --git a/NEWS b/NEWS index 2f61ffc..abb5e42 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ -Noteworthy changes for version 1.0.6 (unreleased) +Noteworthy changes for version 1.0.6 (2018-04-11) ------------------------------------------------- +* Updated portugese translation. + +* Nicer PNG based Icon. + Noteworthy changes for version 1.0.5 (2017-09-12) ------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: NEWS | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- GnupG extension for the Windows Explorer http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 09:41:11 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 10 Apr 2018 09:41:11 +0200 Subject: [git] GpgEX - branch, master, updated. gpgex-1.0.6-1-g9cd9389 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 the Windows Explorer". The branch, master has been updated via 9cd9389fc4bdfdd111c9894a7fc7e30817befa4b (commit) from 5baafc20c8900d515fd73cc94a33f5c156251c09 (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 9cd9389fc4bdfdd111c9894a7fc7e30817befa4b Author: Andre Heinecke Date: Tue Apr 10 09:41:01 2018 +0200 Post release version bump -- diff --git a/NEWS b/NEWS index abb5e42..ca95112 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Noteworthy changes for version 1.0.7 (unreleased) +------------------------------------------------- + + Noteworthy changes for version 1.0.6 (2018-04-11) ------------------------------------------------- diff --git a/configure.ac b/configure.ac index a9f3157..3c11099 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ min_automake_version="1.10" # (git tag -s gnupg-2.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], [1.0.6]) +m4_define([mym4_version], [1.0.7]) # 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 the Windows Explorer http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 09:43:53 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 10 Apr 2018 09:43:53 +0200 Subject: [git] gnupg-doc - branch, master, updated. dc9ddd844590d9ad4986203c56fcb6449088bca0 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 dc9ddd844590d9ad4986203c56fcb6449088bca0 (commit) from 2094fc1631aca2659732e0b28e03012e2dc67127 (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 dc9ddd844590d9ad4986203c56fcb6449088bca0 Author: Andre Heinecke Date: Tue Apr 10 09:43:05 2018 +0200 swdb: Release GpgEX 1.0.6 -- diff --git a/web/swdb.mac b/web/swdb.mac index 5dc612a..12bc401 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -166,11 +166,12 @@ # # GpgEX # -#+macro: gpgex_ver 1.0.4 -#+macro: gpgex_date 2016-03-30 -#+macro: gpgex_size 286k -#+macro: gpgex_sha1 a1521fd86b6a1c5d5865d864e5700e98f4e99dcb -#+macro: gpgex_sha2 aea2232d026219072491f1bf5b2f189a15552f66377ff4dd3b11c0f069379206 +#+macro: gpgex_ver 1.0.6 +#+macro: gpgex_date 2018-04-10 +#+macro: gpgex_size 297k +#+macro: gpgex_sha1 9994f89b466cb2098099aedbda259479a1484485 +#+macro: gpgex_sha2 8cb429bfcf1e938fa4ef8953e0eb2eff88848d883afcf66fdf5fa67ef01ed424 + # # GpgOL ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 10:38:21 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 10 Apr 2018 10:38:21 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.2.6-122-g1793f2c 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 1793f2c46a1ae8befb4d2046c9f3da6e2c685e43 (commit) via 36373798c0955241288fb4aec103830106dd7e1f (commit) via 9f69dbeb902ac447adbc92937cd451c4e909f234 (commit) via 381c46818ffa4605d0ca39818fe317de445eb6de (commit) via 55435cdd4fe4fbfbcba1098bb715ecd6171ba2d8 (commit) via 30081d2851e06944a892a66b8f2d983a495a5686 (commit) via 6fbe2ddbaf5123ae444c95fdf8da67840f794c76 (commit) via f1f072c501cd6124f9193e00f0debc4685ff0851 (commit) via b46b14392540aec7726c8882c424e6d466c51c97 (commit) via 7fa6f1481454ab8b4d166ac2d055abdba5f8baab (commit) via 6da7aa1e7c80d214bd9dccb21744919ae191f2c8 (commit) via 519e4560e821e4c41432626b241bca7d37143e01 (commit) via a4e26f2ee852003707857ab0635b783acb89a2f8 (commit) via 1a5d95e7319e7e6f0dd11064a26cbbc371b05214 (commit) via 0336e5d1a7b9d46e06c838e6a98aecfcc9542882 (commit) via cfd07798087f671c134eef056229bb30e08cc77c (commit) via 5ba74a134db431530884f03eea5410a68dbfe0f5 (commit) via 80b775bdbb852aa4a80292c9357e5b1876110c00 (commit) via d27417d3a571739329a86d9f25212f2da0c8ff72 (commit) via 870527df0dd704c994928348c8c2910030776680 (commit) via 83529e1bd14a6d39f2a8ecab9fb6aa4c1f344c73 (commit) via cb1731c23cddfa524d3f51cfd82029bff853a073 (commit) via a17d2d1f690ebe5d005b4589a5fe378b6487c657 (commit) via 6705ee42a4bd89eea3f959f75d3c14a69c1249a3 (commit) via 130ad98240c066383fa0a99bcf5e0ec72bc0dff9 (commit) via 0c097575a9cd923f648fb5bb695893d46400c3ad (commit) via 820380335a20391e0998fb1ba32ebfb9accedc5b (commit) via 29692718768c28c524be6306081ab1852e75fe07 (commit) via a1515b3bbc10a210040dda3b482bcdb933fa8d7c (commit) via 02d7bb819ff44cc90212568dd6ce24ae1dc5d17f (commit) via e610d51f0de11154050915b951bcc5c53c940f5e (commit) via 96918346beeca7a46de9f03f19502373994c21bc (commit) from d4dc4245bf0221d2db4118718fc2528ecf43b97b (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 1793f2c46a1ae8befb4d2046c9f3da6e2c685e43 Author: Werner Koch Date: Tue Apr 10 08:37:27 2018 +0200 doc: Include release info from 2.2.6 -- diff --git a/NEWS b/NEWS index 6f5137d..d10d52b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,51 @@ Noteworthy changes in version 2.3.0 (unreleased) ------------------------------------------------ + Changes also found in 2.2.6: + + * gpg,gpgsm: New option --request-origin to pretend requests coming + from a browser or a remote site. + + * gpg: Fix race condition on trustdb.gpg updates due to too early + released lock. [#3839] + + * gpg: Emit FAILURE status lines in almost all cases. [#3872] + + * gpg: Implement --dry-run for --passwd to make checking a key's + passphrase straightforward. + + * gpg: Make sure to only accept a certification capable key for key + signatures. [#3844] + + * gpg: Better user interaction in --card-edit for the factory-reset + sub-command. + + * gpg: Improve changing key attributes in --card-edit by adding an + explicit "key-attr" sub-command. [#3781] + + * gpg: Print the keygrips in the --card-status. + + * scd: Support KDF DO setup. [#3823] + + * scd: Fix some issues with PC/SC on Windows. [#3825] + + * scd: Fix suspend/resume handling in the CCID driver. + + * agent: Evict cached passphrases also via a timer. [#3829] + + * agent: Use separate passphrase caches depending on the request + origin. [#3858] + + * ssh: Support signature flags. [#3880] + + * dirmngr: Handle failures related to missing IPv6 support + gracefully. [#3331] + + * Fix corner cases related to specified home directory with + drive letter on Windows. [#3720] + + * Allow the use of UNC directory names as homedir. [#3818] + Changes also found in 2.2.5: * gpg: Allow the use of the "cv25519" and "ed25519" short names in @@ -162,6 +207,8 @@ Noteworthy changes in version 2.3.0 (unreleased) Version 2.2.2 (2017-11-07) Version 2.2.3 (2017-11-20) Version 2.2.4 (2017-12-20) + Version 2.2.5 (2018-02-22) + Version 2.2.6 (2018-04-09) Noteworthy changes in version 2.2.0 (2017-08-28) commit 36373798c0955241288fb4aec103830106dd7e1f Merge: d4dc424 9f69dbe Author: Werner Koch Date: Tue Apr 10 10:14:30 2018 +0200 Merge branch 'STABLE-BRANCH-2-2' into master -- Fixed conflicts: NEWS - keep master configure.ac - merge g10/card-util.c - mostly 2.2 g10/sig-check.c - 2.2 diff --cc configure.ac index 3096aee,7b373a4..540dffc --- a/configure.ac +++ b/configure.ac @@@ -614,8 -602,9 +614,9 @@@ AC_PROG_RANLI AC_CHECK_TOOL(AR, ar, :) AC_PATH_PROG(PERL,"perl") AC_CHECK_TOOL(WINDRES, windres, :) -AC_PATH_PROG(YAT2M, "yat2m") +AC_PATH_PROG(YAT2M, "yat2m", "./yat2m" ) AC_ARG_VAR(YAT2M, [tool to convert texi to man pages]) + AM_CONDITIONAL(HAVE_YAT2M, test -n "$ac_cv_path_YAT2M") AC_ISC_POSIX AC_SYS_LARGEFILE GNUPG_CHECK_USTAR diff --cc g10/sig-check.c index f8e366b,e5de025..fc69839 --- a/g10/sig-check.c +++ b/g10/sig-check.c @@@ -115,174 -115,177 +115,176 @@@ check_signature2 (ctrl_t ctrl PKT_signature *sig, gcry_md_hd_t digest, u32 *r_expiredate, int *r_expired, int *r_revoked, PKT_public_key **r_pk) { - int rc=0; - PKT_public_key *pk; - - if (r_expiredate) - *r_expiredate = 0; - if (r_expired) - *r_expired = 0; - if (r_revoked) - *r_revoked = 0; - if (r_pk) - *r_pk = NULL; - - pk = xtrycalloc (1, sizeof *pk); - if (!pk) - return gpg_error_from_syserror (); - - if ( (rc=openpgp_md_test_algo(sig->digest_algo)) ) - ; /* We don't have this digest. */ - else if (! gnupg_digest_is_allowed (opt.compliance, 0, sig->digest_algo)) - { - /* Compliance failure. */ - log_info (_("digest algorithm '%s' may not be used in %s mode\n"), - gcry_md_algo_name (sig->digest_algo), - gnupg_compliance_option_string (opt.compliance)); - rc = gpg_error (GPG_ERR_DIGEST_ALGO); - } - else if ((rc=openpgp_pk_test_algo(sig->pubkey_algo))) - ; /* We don't have this pubkey algo. */ - else if (!gcry_md_is_enabled (digest,sig->digest_algo)) - { - /* Sanity check that the md has a context for the hash that the - sig is expecting. This can happen if a onepass sig header does - not match the actual sig, and also if the clearsign "Hash:" - header is missing or does not match the actual sig. */ + int rc=0; + PKT_public_key *pk; - log_info(_("WARNING: signature digest conflict in message\n")); - rc = gpg_error (GPG_ERR_GENERAL); - } - else if( get_pubkey (ctrl, pk, sig->keyid ) ) - rc = gpg_error (GPG_ERR_NO_PUBKEY); - else if (! gnupg_pk_is_allowed (opt.compliance, PK_USE_VERIFICATION, - pk->pubkey_algo, pk->pkey, - nbits_from_pk (pk), - NULL)) - { - /* Compliance failure. */ - log_error (_("key %s may not be used for signing in %s mode\n"), - keystr_from_pk (pk), - gnupg_compliance_option_string (opt.compliance)); - rc = gpg_error (GPG_ERR_PUBKEY_ALGO); - } - else if(!pk->flags.valid) - { - /* You cannot have a good sig from an invalid key. */ - rc = gpg_error (GPG_ERR_BAD_PUBKEY); - } - else - { - if(r_expiredate) - *r_expiredate = pk->expiredate; - - rc = check_signature_end (pk, sig, digest, r_expired, r_revoked, NULL); - - /* Check the backsig. This is a 0x19 signature from the - subkey on the primary key. The idea here is that it should - not be possible for someone to "steal" subkeys and claim - them as their own. The attacker couldn't actually use the - subkey, but they could try and claim ownership of any - signatures issued by it. */ - if (!rc && !pk->flags.primary && pk->flags.backsig < 2) - { - if (!pk->flags.backsig) - { - log_info(_("WARNING: signing subkey %s is not" - " cross-certified\n"),keystr_from_pk(pk)); - log_info(_("please see %s for more information\n"), - "https://gnupg.org/faq/subkey-cross-certify.html"); - /* --require-cross-certification makes this warning an - error. TODO: change the default to require this - after more keys have backsigs. */ - if(opt.flags.require_cross_cert) - rc = gpg_error (GPG_ERR_GENERAL); - } - else if(pk->flags.backsig == 1) - { - log_info(_("WARNING: signing subkey %s has an invalid" - " cross-certification\n"),keystr_from_pk(pk)); - rc = gpg_error (GPG_ERR_GENERAL); - } - } + if (r_expiredate) + *r_expiredate = 0; + if (r_expired) + *r_expired = 0; + if (r_revoked) + *r_revoked = 0; + if (r_pk) + *r_pk = NULL; - } + pk = xtrycalloc (1, sizeof *pk); + if (!pk) + return gpg_error_from_syserror (); + + if ((rc=openpgp_md_test_algo(sig->digest_algo))) + { + /* We don't have this digest. */ + } + else if (!gnupg_digest_is_allowed (opt.compliance, 0, sig->digest_algo)) + { + /* Compliance failure. */ + log_info (_("digest algorithm '%s' may not be used in %s mode\n"), + gcry_md_algo_name (sig->digest_algo), + gnupg_compliance_option_string (opt.compliance)); + rc = gpg_error (GPG_ERR_DIGEST_ALGO); + } + else if ((rc=openpgp_pk_test_algo(sig->pubkey_algo))) + { + /* We don't have this pubkey algo. */ + } + else if (!gcry_md_is_enabled (digest,sig->digest_algo)) + { + /* Sanity check that the md has a context for the hash that the + * sig is expecting. This can happen if a onepass sig header + * does not match the actual sig, and also if the clearsign + * "Hash:" header is missing or does not match the actual sig. */ + log_info(_("WARNING: signature digest conflict in message\n")); + rc = gpg_error (GPG_ERR_GENERAL); + } + else if (get_pubkey (ctrl, pk, sig->keyid)) + rc = gpg_error (GPG_ERR_NO_PUBKEY); + else if (!gnupg_pk_is_allowed (opt.compliance, PK_USE_VERIFICATION, + pk->pubkey_algo, pk->pkey, + nbits_from_pk (pk), + NULL)) + { + /* Compliance failure. */ + log_error (_("key %s may not be used for signing in %s mode\n"), + keystr_from_pk (pk), + gnupg_compliance_option_string (opt.compliance)); + rc = gpg_error (GPG_ERR_PUBKEY_ALGO); + } + else if (!pk->flags.valid) + { + /* You cannot have a good sig from an invalid key. */ + rc = gpg_error (GPG_ERR_BAD_PUBKEY); + } + else + { + if (r_expiredate) + *r_expiredate = pk->expiredate; + + rc = check_signature_end (pk, sig, digest, r_expired, r_revoked, NULL); + + /* Check the backsig. This is a back signature (0x19) from + * the subkey on the primary key. The idea here is that it + * should not be possible for someone to "steal" subkeys and + * claim them as their own. The attacker couldn't actually + * use the subkey, but they could try and claim ownership of + * any signatures issued by it. */ + if (!rc && !pk->flags.primary && pk->flags.backsig < 2) + { + if (!pk->flags.backsig) + { + log_info (_("WARNING: signing subkey %s is not" + " cross-certified\n"),keystr_from_pk(pk)); + log_info (_("please see %s for more information\n"), + "https://gnupg.org/faq/subkey-cross-certify.html"); + /* The default option --require-cross-certification + * makes this warning an error. */ + if (opt.flags.require_cross_cert) + rc = gpg_error (GPG_ERR_GENERAL); + } + else if(pk->flags.backsig == 1) + { + log_info (_("WARNING: signing subkey %s has an invalid" + " cross-certification\n"), keystr_from_pk(pk)); + rc = gpg_error (GPG_ERR_GENERAL); + } + } + + } - if (!rc && sig->sig_class < 2 && is_status_enabled ()) - { - /* This signature id works best with DLP algorithms because - * they use a random parameter for every signature. Instead of - * this sig-id we could have also used the hash of the document - * and the timestamp, but the drawback of this is, that it is - * not possible to sign more than one identical document within - * one second. Some remote batch processing applications might - * like this feature here. - * - * Note that before 2.0.10, we used RIPE-MD160 for the hash - * and accidentally didn't include the timestamp and algorithm - * information in the hash. Given that this feature is not - * commonly used and that a replay attacks detection should - * not solely be based on this feature (because it does not - * work with RSA), we take the freedom and switch to SHA-1 - * with 2.0.10 to take advantage of hardware supported SHA-1 - * implementations. We also include the missing information - * in the hash. Note also the SIG_ID as computed by gpg 1.x - * and gpg 2.x didn't matched either because 2.x used to print - * MPIs not in PGP format. */ - u32 a = sig->timestamp; - int nsig = pubkey_get_nsig (sig->pubkey_algo); - unsigned char *p, *buffer; - size_t n, nbytes; - int i; - char hashbuf[20]; + if( !rc && sig->sig_class < 2 && is_status_enabled() ) { + /* This signature id works best with DLP algorithms because + * they use a random parameter for every signature. Instead of + * this sig-id we could have also used the hash of the document + * and the timestamp, but the drawback of this is, that it is + * not possible to sign more than one identical document within + * one second. Some remote batch processing applications might + * like this feature here. + * + * Note that before 2.0.10, we used RIPE-MD160 for the hash + * and accidentally didn't include the timestamp and algorithm + * information in the hash. Given that this feature is not + * commonly used and that a replay attacks detection should + * not solely be based on this feature (because it does not + * work with RSA), we take the freedom and switch to SHA-1 + * with 2.0.10 to take advantage of hardware supported SHA-1 + * implementations. We also include the missing information + * in the hash. Note also the SIG_ID as computed by gpg 1.x + * and gpg 2.x didn't matched either because 2.x used to print + * MPIs not in PGP format. */ + u32 a = sig->timestamp; + int nsig = pubkey_get_nsig( sig->pubkey_algo ); + unsigned char *p, *buffer; + size_t n, nbytes; + int i; + char hashbuf[20]; /* We use SHA-1 here. */ - nbytes = 6; - for (i=0; i < nsig; i++ ) - { - if (gcry_mpi_print (GCRYMPI_FMT_USG, NULL, 0, &n, sig->data[i])) - BUG(); - nbytes += n; - } + nbytes = 6; + for (i=0; i < nsig; i++ ) + { + if (gcry_mpi_print (GCRYMPI_FMT_USG, NULL, 0, &n, sig->data[i])) + BUG(); + nbytes += n; + } - /* Make buffer large enough to be later used as output buffer. */ - if (nbytes < 100) - nbytes = 100; - nbytes += 10; /* Safety margin. */ - - /* Fill and hash buffer. */ - buffer = p = xmalloc (nbytes); - *p++ = sig->pubkey_algo; - *p++ = sig->digest_algo; - *p++ = (a >> 24) & 0xff; - *p++ = (a >> 16) & 0xff; - *p++ = (a >> 8) & 0xff; - *p++ = a & 0xff; - nbytes -= 6; - for (i=0; i < nsig; i++ ) - { - if (gcry_mpi_print (GCRYMPI_FMT_PGP, p, nbytes, &n, sig->data[i])) - BUG(); - p += n; - nbytes -= n; - } - gcry_md_hash_buffer (GCRY_MD_SHA1, hashbuf, buffer, p-buffer); - - p = make_radix64_string (hashbuf, 20); - sprintf (buffer, "%s %s %lu", - p, strtimestamp (sig->timestamp), (ulong)sig->timestamp); - xfree (p); - write_status_text (STATUS_SIG_ID, buffer); - xfree (buffer); + /* Make buffer large enough to be later used as output buffer. */ + if (nbytes < 100) + nbytes = 100; + nbytes += 10; /* Safety margin. */ + + /* Fill and hash buffer. */ + buffer = p = xmalloc (nbytes); + *p++ = sig->pubkey_algo; + *p++ = sig->digest_algo; + *p++ = (a >> 24) & 0xff; + *p++ = (a >> 16) & 0xff; + *p++ = (a >> 8) & 0xff; + *p++ = a & 0xff; + nbytes -= 6; + for (i=0; i < nsig; i++ ) + { + if (gcry_mpi_print (GCRYMPI_FMT_PGP, p, nbytes, &n, sig->data[i])) + BUG(); + p += n; + nbytes -= n; + } + gcry_md_hash_buffer (GCRY_MD_SHA1, hashbuf, buffer, p-buffer); + + p = make_radix64_string (hashbuf, 20); + sprintf (buffer, "%s %s %lu", + p, strtimestamp (sig->timestamp), (ulong)sig->timestamp); + xfree (p); + write_status_text (STATUS_SIG_ID, buffer); + xfree (buffer); } - if (r_pk) - *r_pk = pk; - else - { - release_public_key_parts (pk); - xfree (pk); - } + if (r_pk) + *r_pk = pk; + else + { + release_public_key_parts (pk); + xfree (pk); + } - return rc; + return rc; } @@@ -493,38 -521,34 +520,38 @@@ check_signature_end_simple (PKT_public_ gcry_md_putc (digest, 0); 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 ); + /* 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 ); } - gcry_md_final( digest ); - - /* Convert the digest to an MPI. */ - result = encode_md_value (pk, digest, sig->digest_algo ); - if (!result) - return GPG_ERR_GENERAL; - - /* Verify the signature. */ - rc = pk_verify (pk->pubkey_algo, result, sig->data, pk->pkey); - gcry_mpi_release (result); + gcry_md_final( digest ); + + /* Convert the digest to an MPI. */ + result = encode_md_value (pk, digest, sig->digest_algo ); + if (!result) + return GPG_ERR_GENERAL; + + /* Verify the signature. */ + if (DBG_CLOCK && sig->sig_class <= 0x01) + log_clock ("enter pk_verify"); + rc = pk_verify( pk->pubkey_algo, result, sig->data, pk->pkey ); + if (DBG_CLOCK && sig->sig_class <= 0x01) + log_clock ("leave pk_verify"); + gcry_mpi_release (result); - if( !rc && sig->flags.unknown_critical ) - { - log_info(_("assuming bad signature from key %s" - " due to an unknown critical bit\n"),keystr_from_pk(pk)); - rc = GPG_ERR_BAD_SIGNATURE; - } + if (!rc && sig->flags.unknown_critical) + { + log_info(_("assuming bad signature from key %s" + " due to an unknown critical bit\n"),keystr_from_pk(pk)); + rc = GPG_ERR_BAD_SIGNATURE; + } - return rc; + return rc; } ----------------------------------------------------------------------- Summary of changes: NEWS | 47 +++ agent/call-scd.c | 4 +- agent/command-ssh.c | 46 ++- common/homedir.c | 95 +++-- configure.ac | 1 + doc/examples/vsnfd.prf | 6 +- doc/gpg.texi | 22 +- g10/call-agent.h | 15 +- g10/card-util.c | 370 +++++++++++------ g10/cpr.c | 6 +- g10/getkey.c | 2 + g10/gpg.c | 56 ++- g10/keydb.h | 5 +- g10/keyedit.c | 8 +- g10/keygen.c | 53 ++- g10/main.h | 1 + g10/sig-check.c | 690 ++++++++++++++++---------------- po/ca.po | 124 ++++-- po/cs.po | 135 +++++-- po/da.po | 137 +++++-- po/de.po | 123 ++++-- po/el.po | 124 ++++-- po/eo.po | 124 ++++-- po/es.po | 139 +++++-- po/et.po | 124 ++++-- po/fi.po | 124 ++++-- po/fr.po | 145 +++++-- po/gl.po | 124 ++++-- po/hu.po | 124 ++++-- po/id.po | 124 ++++-- po/it.po | 124 ++++-- po/ja.po | 125 ++++-- po/nb.po | 135 +++++-- po/pl.po | 137 +++++-- po/pt.po | 124 ++++-- po/ro.po | 134 +++++-- po/ru.po | 131 ++++-- po/sk.po | 124 ++++-- po/sv.po | 143 +++++-- po/tr.po | 134 +++++-- po/uk.po | 135 +++++-- po/zh_CN.po | 132 ++++-- po/zh_TW.po | 139 +++++-- scd/app-openpgp.c | 61 ++- scd/command.c | 16 +- sm/gpgsm.c | 14 +- tests/gpgscm/gnupg.scm | 13 +- tests/gpgsm/export.scm | 2 +- tests/gpgsm/gpgsm-defs.scm | 6 + tests/migrations/common.scm | 2 +- tests/openpgp/decrypt-session-key.scm | 2 +- tests/openpgp/decrypt-unwrap-verify.scm | 2 +- tests/openpgp/defs.scm | 14 +- 53 files changed, 3382 insertions(+), 1565 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 15:54:03 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Tue, 10 Apr 2018 15:54:03 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.0.6-125-g7cb3fea 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 7cb3feaf64d3098a5bc56cad62576bb67e5d74bf (commit) via 11ed13c4ee60b5f2b6ed8c46591f60ce92125f0b (commit) via be8a7af4db06f5f8c479b550a84f96145e239030 (commit) via 6219c5bb703e680eaff2b15e1f1cb262117b4927 (commit) from 1441f6710db976c76b5cb64073be05b318df84ce (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 7cb3feaf64d3098a5bc56cad62576bb67e5d74bf Author: Andre Heinecke Date: Tue Apr 10 15:49:21 2018 +0200 Make S/MIME compatible with Exchange 2016 patched * src/oomhelp.h (PR_PIDNameContentType_DASL): New. * src/mimemaker.cpp (create_top_encryption_header): We no longer create the header ourself. * src/mail.cpp (Mail::update_crypt_oom): Here we set the header values now. * src/cryptcontroller.h (CryptController::get_protocol) (CryptController::is_encrypter): New accessors. * src/cryptcontroller.cpp (create_encrypt_attach): Write binary data for S/MIME. Outlook will do the base64 conversion. -- This fixes a lot of interop issues. Otherwise we would either have weirdly structured mails or mails without smime-type header or mails where the pkcs7-mime part was doubly base64 encoded with the inner encoding containing the headers. Hope this works with older Exchanges and Outlooks. GnuPG-Bug-Id: T3884 diff --git a/src/cryptcontroller.cpp b/src/cryptcontroller.cpp index 1065f6e..5aa1022 100644 --- a/src/cryptcontroller.cpp +++ b/src/cryptcontroller.cpp @@ -838,15 +838,8 @@ create_encrypt_attach (sink_t sink, protocol_t protocol, return rc; } - if (protocol == PROTOCOL_OPENPGP) - { - rc = write_data (sink, encryptedData); - } - else - { - const auto encStr = encryptedData.toString(); - rc = write_b64 (sink, encStr.c_str(), encStr.size()); - } + rc = write_data (sink, encryptedData); + if (rc) { log_error ("%s:%s: Failed to create top header.", diff --git a/src/cryptcontroller.h b/src/cryptcontroller.h index 67b67c4..8bcf1d4 100644 --- a/src/cryptcontroller.h +++ b/src/cryptcontroller.h @@ -64,6 +64,12 @@ public: /** @brief Get an inline body as std::string. */ std::string get_inline_data (); + /** @brief Get the protocol. Valid after do_crypto. */ + GpgME::Protocol get_protocol () const { return m_proto; } + + /** @brief check weather something was encrypted. */ + bool is_encrypter () const { return m_encrypt; } + private: int resolve_keys (); int resolve_keys_cached (); diff --git a/src/mail.cpp b/src/mail.cpp index df7d0f2..ea2f65a 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -2613,6 +2613,21 @@ Mail::update_crypt_oom() return; } } + + if (m_crypter->get_protocol () == GpgME::CMS && m_crypter->is_encrypter ()) + { + /* We put the PIDNameContentType headers here for exchange + because this is the only way we found to inject the + smime-type. */ + if (put_pa_string (m_mailitem, + PR_PIDNameContentType_DASL, + "application/pkcs7-mime;smime-type=\"enveloped-data\";name=smime.p7m")) + { + log_debug ("%s:%s: Failed to put PIDNameContentType for %p.", + SRCNAME, __func__, this); + } + } + /** When doing async update_crypt_mapi follows and needs the crypter. */ if (async_crypt_disabled ()) diff --git a/src/mimemaker.cpp b/src/mimemaker.cpp index a7e9959..ed961f7 100644 --- a/src/mimemaker.cpp +++ b/src/mimemaker.cpp @@ -1915,6 +1915,16 @@ create_top_encryption_header (sink_t sink, protocol_t protocol, char *boundary, else if (protocol == PROTOCOL_SMIME) { *boundary = 0; + rc = 0; + /* + For S/MIME encrypted mails we do not use the S/MIME conversion + code anymore. With Exchange 2016 this no longer works. Instead + we set an override mime tag, the extended headers in OOM in + Mail::update_crypt_oom and let outlook convert the attachment + to base64. + + A bit more details can be found in T3853 / T3884 + rc = write_multistring (sink, "Content-Type: application/pkcs7-mime; " "smime-type=enveloped-data;\r\n" @@ -1924,6 +1934,7 @@ create_top_encryption_header (sink_t sink, protocol_t protocol, char *boundary, "MIME-Version: 1.0\r\n" "\r\n", NULL); + */ } else { diff --git a/src/oomhelp.h b/src/oomhelp.h index cbc36ca..3bf86a6 100644 --- a/src/oomhelp.h +++ b/src/oomhelp.h @@ -117,6 +117,8 @@ DEFINE_OLEGUID(IID_IOleWindow, 0x00000114, 0, 0); "http://schemas.microsoft.com/mapi/proptag/0x5D01001F" #define PR_TAG_RECEIVED_REPRESENTING_SMTP_ADDRESS \ "http://schemas.microsoft.com/mapi/proptag/0x5D08001F" +#define PR_PIDNameContentType_DASL \ + "http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/content-type/0x0000001F" #ifdef __cplusplus extern "C" { commit 11ed13c4ee60b5f2b6ed8c46591f60ce92125f0b Author: Andre Heinecke Date: Tue Apr 10 15:48:08 2018 +0200 Improve acceptance of the parser * src/mimedataprovider.cpp (MimeDataProvider::collect_data): Relax. If a message starts with Content-Type it's probably a mime structure. diff --git a/src/mimedataprovider.cpp b/src/mimedataprovider.cpp index ff6538c..6b761b1 100644 --- a/src/mimedataprovider.cpp +++ b/src/mimedataprovider.cpp @@ -804,6 +804,19 @@ MimeDataProvider::collect_data(LPSTREAM stream) SRCNAME, __func__); } + else if (bRead > 12 && !strncmp ("Content-Type:", buf, 13)) + { + /* Similar as above but we messed with the order of the headers + for some s/mime mails. So also check for content type. + + Want some cheese with that hack? + */ + m_collect_everything = false; + log_debug ("%s:%s: Found Content-Type header." + "Expecting headers even if type suggested not to.", + SRCNAME, __func__); + + } /* check for the PGP MESSAGE marker to see if we have it. */ if (bRead && m_collect_everything) { commit be8a7af4db06f5f8c479b550a84f96145e239030 Author: Andre Heinecke Date: Tue Apr 10 13:14:42 2018 +0200 Handle error in mapi update * src/mail.cpp (do_crypt): Handle error in mapi update. diff --git a/src/mail.cpp b/src/mail.cpp index bd28cc3..df7d0f2 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -854,7 +854,19 @@ do_crypt (LPVOID arg) { mail->set_crypt_state (Mail::NeedsUpdateInMAPI); mail->update_crypt_mapi (); - mail->set_crypt_state (Mail::NeedsUpdateInOOM); + if (mail->crypt_state () == Mail::WantsSendMIME) + { + // For sync crypto we need to switch this. + mail->set_crypt_state (Mail::NeedsUpdateInOOM); + } + else + { + // A bug! + log_debug ("%s:%s: Resetting crypter because of state mismatch. %p", + SRCNAME, __func__, arg); + crypter = nullptr; + mail->reset_crypter (); + } gpgrt_lock_unlock (&dtor_lock); } /* This works around a bug in pinentry that it might commit 6219c5bb703e680eaff2b15e1f1cb262117b4927 Author: Andre Heinecke Date: Tue Apr 10 13:12:35 2018 +0200 Sleep a bit before bringing window to front * src/common.c (bring_to_front): log when done. * src/windowmessages.cpp (gpgol_window_proc): Sleep a bit before bring to front. -- This might resolve an observed deadlock where setforegroundwindow would block the UI thread as it tried to bring the disabled mail window to front. Might also help with: GnuPG-Bug-Id: T3889 diff --git a/src/common.c b/src/common.c index 6f1ac56..a9ac04b 100644 --- a/src/common.c +++ b/src/common.c @@ -260,6 +260,7 @@ bring_to_front (HWND wid) } } } + log_debug ("%s:%s: done", SRCNAME, __func__); } void diff --git a/src/windowmessages.cpp b/src/windowmessages.cpp index 9d96956..73292d1 100644 --- a/src/windowmessages.cpp +++ b/src/windowmessages.cpp @@ -159,6 +159,9 @@ gpgol_window_proc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } case (BRING_TO_FRONT): { + // We want to avoid a race where the mail window + // was still the active window. + Sleep (250); HWND wnd = get_active_hwnd (); if (wnd) { ----------------------------------------------------------------------- Summary of changes: src/common.c | 1 + src/cryptcontroller.cpp | 11 ++--------- src/cryptcontroller.h | 6 ++++++ src/mail.cpp | 29 ++++++++++++++++++++++++++++- src/mimedataprovider.cpp | 13 +++++++++++++ src/mimemaker.cpp | 11 +++++++++++ src/oomhelp.h | 2 ++ src/windowmessages.cpp | 3 +++ 8 files changed, 66 insertions(+), 10 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 16:54:59 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 10 Apr 2018 16:54:59 +0200 Subject: [git] gnupg-doc - branch, master, updated. da16bd25fc9461cda562504de4e80cfcf75ecf37 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 da16bd25fc9461cda562504de4e80cfcf75ecf37 (commit) from dc9ddd844590d9ad4986203c56fcb6449088bca0 (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 da16bd25fc9461cda562504de4e80cfcf75ecf37 Author: Werner Koch Date: Tue Apr 10 16:44:55 2018 +0200 web: Remove one mirror. According to a mail from James Miller (jmiller@) the mirror will be shutdown in a week. diff --git a/web/mirrors.org b/web/mirrors.org index 99d7727..b3f9df6 100644 --- a/web/mirrors.org +++ b/web/mirrors.org @@ -18,7 +18,6 @@ are seeking mirrors for source or binary packages, please consult the |----------------+-----------------------+-----------+--------| | Canada | [[http://www.gnupg.ca/][GnuPG.ca]] | [[http://www.gnupg.ca/][http]] | 2/day | | | [[http://www.raffsoftware.com/][RaffSoftware]] | [[http://gnupg.raffsoftware.com/][http]] | daily | - | | [[http://www.parentinginformed.com/][parentinginformed]] | [[http://gnupg.parentinginformed.com/][http]] | 2/day | | | | | | |----------------+-----------------------+-----------+--------| | Asia | | | | ----------------------------------------------------------------------- Summary of changes: web/mirrors.org | 1 - 1 file changed, 1 deletion(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 18:55:33 2018 From: cvs at cvs.gnupg.org (by raimund.renkert@intevation.de) Date: Tue, 10 Apr 2018 18:55:33 +0200 Subject: [git] GPGME - branch, javascript-binding, updated. gpgme-1.10.0-184-geef3a50 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, javascript-binding has been updated via eef3a509fa5744e5f09ec8084985e6070b78226b (commit) via 5eb261d6028ab2c0ddd9af8e3e1f82e479c6109c (commit) via fed024eff1091056647296ac589a0c88c2be41bb (commit) via 60d7a1e8f625ea0db455bff989534dd52f0650c7 (commit) via 75a1a1c33efe952986bba56494b81e2f4835b8c4 (commit) via 3b91f6af378ccc37dcf8924cbc157894c35b5192 (commit) via d65864989c0560b5f51cb8d05d9ea9f1957b453e (commit) via 56bbfd39acea90eb87a28b11a515b0314cdda54c (commit) via 5a553f5a317e5ad5ab0274d58854df1ecf390e0d (commit) via 2f507b045909d32bf29d23da04db02b078e5fb9d (commit) via 5cd419341807d8ae23fec7bd9bb7025a8a2dcb3c (commit) via 3345a17dda2222e3c1592235e8a1cd9493192777 (commit) via 4b2fa657d195382d14ac99be40b66327e0fc855c (commit) via 7c220e387d511b0cf66f99370759c36b729cc444 (commit) via a2eedef630891397f8eccb5bb426a0728588bf41 (commit) via f9159b1d75d3209b1c22bbb0ed4472800b60a522 (commit) via 1b5da37a47ceef41545e0b2474738613f36be949 (commit) via 5b32efbaf37920b2e99d4bb87cb383b2809b1688 (commit) via 40a9dea5d56506400b67b0c11f6e55a1629dc6fe (commit) via 3b724aae423f2de01812165d54df2a7b524c82f6 (commit) via dde1aae312958776fab475d6c0cdfa19cc255863 (commit) via 22247f658ce2f8e527c26746358cfc2643c4832f (commit) via d0bb4ec4ecdfae4dfd9dd84aef905afb490013d5 (commit) via e6180f2b36cc8a6c6154e5f3d702324af573132a (commit) via 4763974ef6932c503e35c3d14fe47a66a5323f48 (commit) via e5abf4827aead50437bbdff8cfdd5e9fdc6ed72d (commit) via b9000bc293164ff62efa7e91e5cf6d5fc19d482f (commit) via eee68c1b13fbe21c123f469712817e0c81f16383 (commit) via c7bb12da5297a7e188766d9759f700dd771faff8 (commit) via 65ed4ac82598734551b87fc89deab3cee010bd37 (commit) via 5722148bacab5862b40a027861d64683a0f214ea (commit) via 76055dd5c7d755c6f8a242b701aeadba621fbc0f (commit) via 05e59933056ee8ef8ba7579351a58ed25dd7f754 (commit) via 61a988036bd3f0d43f7d55bfa43f5f05bec978c4 (commit) via 7ddff71908a85111c8e0da41312197b3b1a77da6 (commit) via c6a0395f0a3a57071f0c943f7815f58a02f9d2f3 (commit) via 0a0d57fd41380cd797d29e11cec8a77c7404e960 (commit) via 0ccc57c9512246d82d46e7732bfb0f95c18ca9d3 (commit) via 8b401bfc76eac762553f76faab53c2f4cd117a8d (commit) via 6c6af9a7b0ae4e7182d669bec282c6edaaa7eaa1 (commit) via a4e3f827652c59d850b4e5506a92c1ecd190c1bb (commit) via ad6cb4f9b8b97a2bc501c17fc542a84b725dedea (commit) via ae2767eb27b6a76284ee4403e575869afe2e80a8 (commit) via e57388a69f61d14e3df3c842d227fb450c96c807 (commit) via ac6a552c37147a000de74f49d1bff34dad52252e (commit) via af6cbba18ba5e2bbecce5f8268c146282cd12367 (commit) via 6fa2a344282e369e6aca8155bc77dd2c12a29414 (commit) via 1fdd1f306d45f6aeee91c7f016f7c37286ee3b3b (commit) via 1d2746433c9632fc0c7bc10b59280fca15895545 (commit) via 0390ede18696520be9cc1a42f628e23159b7c2eb (commit) via 52e262991f1fdf7da93882c3b22c05537376cf49 (commit) via 96d0395bccbbff91f73c06cb7bd6c131f04b8a9a (commit) via 51258975d763c9471859d635e6080c2ec02e8647 (commit) via 29e918171f352c71a90a16c04d4a3dcafa5db682 (commit) via 7221bb67642eb01a07957d66d0cbcd4ef8aadbf8 (commit) via f3fe47e8fd2e7bc748016befcae494421223368c (commit) via f0790f224d7af9521efe96e69a8f719fb89a5af2 (commit) via 7ab42e79ade89f28507ea42d51148a40b4bfc736 (commit) via cfbdcb7fb3fa438cafba82e4fb8f327df596f98e (commit) via b30ebf89725641018b3b08f77876530f9b983fa2 (commit) via 8f7672ad1b267f122f647bb5f984734d0ff66a5c (commit) via 6950a63e63d60685ddb6f4cbff7b826b8acb5b13 (commit) via 3e0f68fdff1998dae9cb6f8510a3e945a268d1f6 (commit) via d5f6dec048d3d4d94f1fcdb3f4249cf6e71c4b92 (commit) via 0fb8a5d45c1c77a5928d6e356271da055aa55994 (commit) via bf67cf433fe82924ed40e79785e95403c07cc068 (commit) via 1779d7b9d6769b2e47f1e90260290e25c8c3aa02 (commit) via 64c5886132aceefc9d9600a3a6dbbbf404b95b81 (commit) via 4811ff7b6c8ef97c7d4858ce235e9bf8227f4917 (commit) via 82c5af225f2bdf3acc6fc652a96ee61c9b057395 (commit) via b549f69d0520bb74957b95cec9ea918dba2374f6 (commit) via 431897a4c48fe1bc9d37f655097aabaf5b685d11 (commit) via 22e2445beee46ed1e527a98e635153c7cf03786f (commit) via 94a95ac12364989db7f4be333107f3c023551857 (commit) via 3d0c7a2202c8e9bd4f284fd00069d34b8d3d3d4c (commit) via 961aea212ef48914ecbfa169addf951b0854b0b4 (commit) via 7ac65b10837740caf68cdade791b8c5ce4eb1b03 (commit) via 9e3e4a835c64f5d06de821b1fd648af37827ff26 (commit) via b02d9d0a7b96b186eb3063d94bde369339181461 (commit) via 5432e5f9d1dfc02812d0b181f8d88cdf4a2bfbfb (commit) via 5d1dd2abe5cf787875d12afe46c78c75385d7b31 (commit) via 1d05e6aa4ea467c8c5926b827cfcfba357d03312 (commit) via b35aaef7a3b793b8f6f5b42596c0a6a51e87f78c (commit) via 6bc12a0eeb20409770cb8b923d08c18c2b730cb8 (commit) via e5c85fba25de1187949697e2dae0e89345b71e89 (commit) via ada059b07178147821b1598c935aa70ae45e3e6c (commit) via ef27f3781a37e264d0eb7d1745eb2c804ec062c4 (commit) via 423fdcd4653cb01f07f2b0e72cfcf49554930f70 (commit) via a71205dc3b58970adf591b4e4553824a33f353db (commit) via a10dcb4f138eb5a21881cdbc4806c25129d4ae4e (commit) via 952b6042f78017c476452088261af8d352cfa729 (commit) via c92da2c7eb148ce9fb06495a8470dd9caf662f9a (commit) via e489ddd08af29fdad8db8aa0aec0c314daa3678c (commit) via f29bda8d7146b4bc0bf73d6e613131545ff86b73 (commit) via c27a7a3f994dad0eccee890185582f4350fbf233 (commit) via f81adeba992a9fd3b5a199e9a2e242a0f53cf639 (commit) via 36dfbdffea60c529a6d1e1ff3e507be016b6a0f6 (commit) via 484e9a6229ac9c80c6be4df638bce711f08a74c6 (commit) via a8f48b6f577d562c25fd0191c0cc2cc8e96078c1 (commit) via 83b1336ceebb86e13a55bbf220df2d750f6b3ec6 (commit) via 0e1300ce777dd0c87f31ac8bc49846b9df242df9 (commit) via 7ebc5a357057d01b7ef965521ab68b7cb7e20a8f (commit) via 172baaf4d3e4ed03a4d3437be9efa3dfe6a847bc (commit) via f2c1e8d8d54068a7f072efa178fc30460821eff3 (commit) via 01686463948ac6096dd8579a110c478d3a1f9a83 (commit) via 93252df9dc4c9932467814745655350a8cab900e (commit) via ab81c2d868bba79fdb8f8d7f576b6bd88c6bdf3c (commit) via f685cda281c6148072e8a6cd139c990cb041ea3d (commit) via fa4927146b68dd045903285f1c45fb64deb2e361 (commit) via c767a4a3590bd8a224d0268746df443942cb28c2 (commit) via 75463d589522cba427f9e5a3a408192ffad8bb21 (commit) via a98f2c556fe6e33a9cd38279e64e4b09f05cc675 (commit) via e8adab68f8c0cd865ff220f06dfaff7fe183e8a1 (commit) via 47d401d159852ea08e90af21d91bb4b93be9000d (commit) via 8a76deb11efd7dadfde6e8e7e69fbcd92577982f (commit) via 5215d58ae2521d81c3db0b45dfbdce01a679acab (commit) via 8f2c0f4534ea2a07f071f360a63e877f60dc52f2 (commit) via d4778bb23d0817ee6fbcbe4f0ff0ff0429bf3669 (commit) via 3a746d5d46ffd7d332dc24fd6a4d24efc5fc1230 (commit) via 13d2164cd9f313b409b2210d9e63465681cccc99 (commit) via 1516c56ee4da28eb720bbacb026892393d10b24a (commit) via f61d4f585f27c13fabf7a23ad295bdc8bea7c838 (commit) from d83482a1d768fc5afd3aa4836f2fefe5c549d02e (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 eef3a509fa5744e5f09ec8084985e6070b78226b Author: raimund.renkert at intevation.de Date: Tue Apr 10 11:33:14 2018 +0200 js: Initial commit for JavaScript Native Messaging API -- Note this code misses all the legal boilerplate; please add this as soon as possible and provide a DCO so we can merge it into master. I also removed the dist/ directory because that was not source code. diff --git a/lang/README b/lang/README index ee99f0f..afd7b08 100644 --- a/lang/README +++ b/lang/README @@ -13,4 +13,4 @@ cl Common Lisp cpp C++ qt Qt-Framework API python Python 2 and 3 (module name: gpg) -javascript Native messaging client for the gpgme-json server. +js Native messaging client for the gpgme-json server. diff --git a/lang/js/CHECKLIST b/lang/js/CHECKLIST new file mode 100644 index 0000000..79a35cb --- /dev/null +++ b/lang/js/CHECKLIST @@ -0,0 +1,30 @@ +NativeConnection: + + [X] nativeConnection: successfully sending an encrypt request, +receiving an answer + [X] nativeConnection successfull on Chromium, chrome and firefox + [ ] nativeConnection successfull on Windows, macOS, Linux + [ ] nativeConnection with delayed, multipart (> 1MB) answer + +replicating Openpgpjs API: + + [*] Message handling (encrypt, verify, sign) + [ ] Key handling (import/export, modifying, status queries) + [ ] Configuration handling + [ ] check for completeness + [ ] handling of differences to openpgpjs + +Communication with other implementations + + [ ] option to export SECRET Key into localstore used by e.g. mailvelope + +Management: + [*] Define the gpgme interface + [ ] check Permissions (e.g. csp) for the different envs + [ ] agree on license + [ ] tests + + +Problems: + [X] gpgme-json: interactive mode vs. bytelength; filename + [X] nativeApp chokes on arrays. We will get rid of that bnativeapp anyhow diff --git a/lang/js/CHECKLIST_build b/lang/js/CHECKLIST_build new file mode 100644 index 0000000..fa162a1 --- /dev/null +++ b/lang/js/CHECKLIST_build @@ -0,0 +1,9 @@ +- Checklist for build/install: + +browsers' manifests (see README) need allowedextension added, and the path set + +manifest.json/ csp needs adaption + +/dist contains a current build which is used by example app. +We may either want to update it on every commit, or never at all, but not +inconsistently. diff --git a/lang/js/README b/lang/js/README new file mode 100644 index 0000000..3ca0743 --- /dev/null +++ b/lang/js/README @@ -0,0 +1,52 @@ +This is an example app for gpgme-json. +As of now, it only encrypts a given text. + +Installation +------------- + +gpgmejs uses webpack, the builds can be found in dist/ +(the testapplication uses that script at that location). To create a new +package, the command is npx webpack --config webpack.conf.js. +If you want a more debuggable (i.e. not minified) build, just change the mode +in webpack.conf.js. + +Demo WebExtension: +As soon as a bundled webpack is in dist/ (TODO: .gitignore or not?), +the gpgmejs folder can just be included in the extensions tab of the browser in +questions (extension debug mode needs to be active). For chrome, selecting the +folder is sufficient, for firefox, the manifest.json needs to be selected. + +In the browsers' nativeMessaging configuration folder a file 'gpgmejs.json' +is needed, with the following content: + +(The path to the native app gpgme-json may need adaption) + +Chromium: +~/.config/chromium/NativeMessagingHosts/gpgmejson.json + +{ + "name": "gpgmejson", + "description": "This is a test application for gpgmejs", + "path": "/usr/bin/gpgme-json", + "type": "stdio", + "allowed_origins": ["chrome-extension://ExtensionIdentifier/"] +} +The ExtensionIdentifier can be seen on the chrome://extensions page, and +changes on each reinstallation. Note the slashes in allowed_origins. + + +Firefox: +~/.mozilla/native-messaging-hosts/gpgmejson.json +{ + "name": "gpgmejson", + "description": "This is a test application for gpgmejs", + "path": "/usr/bin/gpgme-json", + "type": "stdio", + "allowed_extensions": ["ExtensionIdentifier at temporary-addon"] +} +The ExtensionIdentifier can be seen as Extension ID on the about:addons page if +addon-debugging is active. In firefox, the temporary addon is removed once +firefox exits, and the identifier will need to be changed more often. + +For testing purposes, it could be a good idea to change the keyID in the +ui.html, to not having to type it every time. diff --git a/lang/js/manifest.json b/lang/js/manifest.json new file mode 100644 index 0000000..8bb5c58 --- /dev/null +++ b/lang/js/manifest.json @@ -0,0 +1,18 @@ +{ + "manifest_version": 2, + + "name": "gpgme-json with native Messaging", + "description": "This should be able to encrypt a text using gpgme-json", + "version": "0.1", + "content_security_policy": "default-src 'self' 'unsafe-eval' filesystem", + "browser_action": { + "default_icon": "testicon.png", + "default_title": "gpgme.js", + "default_popup": "ui.html" + }, + "permissions": ["nativeMessaging", "activeTab"], + + "background": { + "scripts": [ "dist/gpgmejs.bundle.js"] + } +} diff --git a/lang/js/package.json b/lang/js/package.json new file mode 100644 index 0000000..46b60fd --- /dev/null +++ b/lang/js/package.json @@ -0,0 +1,17 @@ +{ + "name": "gpgmejs", + "version": "0.0.1", + "description": "javascript part of a nativeMessaging gnupg integration", + "main": "src/gpgmejs.js", + "private": true, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "", + "devDependencies": { + "webpack": "^4.3.0", + "webpack-cli": "^2.0.13" + } +} diff --git a/lang/js/src/Connection.js b/lang/js/src/Connection.js new file mode 100644 index 0000000..e8fea54 --- /dev/null +++ b/lang/js/src/Connection.js @@ -0,0 +1,76 @@ +/** + * A connection port will be opened for each communication between gpgmejs and + * gnupg. It should be alive as long as there are additional messages to be + * expected. + */ + +export function Connection(){ + if (!this.connection){ + this.connection = connect(); + this._msg = { + 'always-trust': true, + // 'no-encrypt-to': false, + // 'no-compress': true, + // 'throw-keyids': false, + // 'wrap': false, + 'armor': true, + 'base64': false + }; + }; + + this.disconnect = function () { + if (this.connection){ + this.connection.disconnect(); + } + }; + + /** + * Sends a message and resolves with the answer. + * @param {*} operation The interaction requested from gpgme + * @param {*} message A json-capable object to pass the operation details. + * TODO: _msg should contain configurable parameters + */ + this.post = function(operation, message){ + let timeout = 5000; + let me = this; + if (!message || !operation){ + return Promise.reject('no message'); // TBD + } + + let keys = Object.keys(message); + for (let i=0; i < keys.length; i++){ + let property = keys[i]; + me._msg[property] = message[property]; + } + me._msg['op'] = operation; + // TODO fancier checks if what we want is consistent with submitted content + return new Promise(function(resolve, reject){ + me.connection.onMessage.addListener(function(msg) { + if (!msg){ + reject('empty answer.'); + } + if (msg.type === "error"){ + reject(msg.msg); + } + resolve(msg); + }); + + me.connection.postMessage(me._msg); + setTimeout( + function(){ + me.disconnect(); + reject('Timeout'); + }, timeout); + }); + }; +}; + + +function connect(){ + let connection = chrome.runtime.connectNative('gpgmejson'); + if (!connection){ + let msg = chrome.runtime.lastError || 'no message'; //TBD + throw(msg); + } + return connection; +}; diff --git a/lang/js/src/gpgmejs.js b/lang/js/src/gpgmejs.js new file mode 100644 index 0000000..dedbf80 --- /dev/null +++ b/lang/js/src/gpgmejs.js @@ -0,0 +1,187 @@ +import {Connection} from "./Connection" + +export function encrypt(data, publicKeys, privateKeys, passwords=null, + sessionKey, filename, compression, armor=true, detached=false, + signature=null, returnSessionKey=false, wildcard=false, date=new Date()){ + // gpgme_op_encrypt ( <-gpgme doc on this operation + // gpgme_ctx_t ctx, + // gpgme_key_t recp[], + // gpgme_encrypt_flags_t flags, + // gpgme_data_t plain, + // gpgme_data_t cipher) + // flags: + // GPGME_ENCRYPT_ALWAYS_TRUST + // GPGME_ENCRYPT_NO_ENCRYPT_TO + // GPGME_ENCRYPT_NO_COMPRESS + // GPGME_ENCRYPT_PREPARE + // GPGME_ENCRYPT_EXPECT_SIGN + // GPGME_ENCRYPT_SYMMETRIC + // GPGME_ENCRYPT_THROW_KEYIDS + // GPGME_ENCRYPT_WRAP + if (passwords !== null){ + throw('Password!'); // TBD + } + + let pubkeys = toKeyIdArray(publicKeys); + let privkeys = toKeyIdArray(privateKeys); + + // TODO filename: data is supposed to be empty, file is provided + // TODO config compression detached signature + // TODO signature to add to the encrypted message (?) || privateKeys: signature is desired + // gpgme_op_encrypt_sign (gpgme_ctx_t ctx, gpgme_key_t recp[], gpgme_encrypt_flags_t flags, gpgme_data_t plain, gpgme_data_t cipher) + + // TODO sign date overwriting implemented in gnupg? + + let conn = new Connection(); + if (wildcard){ + // Connection.set('throw-keyids', true); TODO Connection.set not yet existant + } + return conn.post('encrypt', { + 'data': data, + 'keys': publicKeys, + 'armor': armor}); +}; + +export function decrypt(message, privateKeys, passwords, sessionKeys, publicKeys, + format='utf8', signature=null, date=new Date()) { + if (passwords !== null){ + throw('Password!'); // TBD + } + if (format === 'binary'){ + // Connection.set('base64', true); + } + if (publicKeys || signature){ + // Connection.set('signature', signature); + // request verification, too + } + //privateKeys optionally if keyId was thrown? + // gpgme_op_decrypt (gpgme_ctx_t ctx, gpgme_data_t cipher, gpgme_data_t plain) + // response is gpgme_op_decrypt_result (gpgme_ctx_t ctx) (next available?) + return conn.post('decrypt', { + 'data': message + }); +} + +// BIG TODO. +export function generateKey({userIds=[], passphrase, numBits=2048, unlocked=false, keyExpirationTime=0, curve="", date=new Date()}){ + throw('not implemented here'); + // gpgme_op_createkey (gpgme_ctx_t ctx, const char *userid, const char *algo, unsigned long reserved, unsigned long expires, gpgme_key_t extrakey, unsigned int flags); + return false; +} + +export function sign({ data, privateKeys, armor=true, detached=false, date=new Date() }) { + //TODO detached GPGME_SIG_MODE_DETACH | GPGME_SIG_MODE_NORMAL + // gpgme_op_sign (gpgme_ctx_t ctx, gpgme_data_t plain, gpgme_data_t sig, gpgme_sig_mode_t mode) + // TODO date not supported + + let conn = new Connection(); + let privkeys = toKeyIdArray(privateKeys); + return conn.post('sign', { + 'data': data, + 'keys': privkeys, + 'armor': armor}); +}; + +export function verify({ message, publicKeys, signature=null, date=new Date() }) { + //TODO extra signature: sig, signed_text, plain: null + // inline sig: signed_text:null, plain as writable (?) + // date not supported + //gpgme_op_verify (gpgme_ctx_t ctx, gpgme_data_t sig, gpgme_data_t signed_text, gpgme_data_t plain) + let conn = new Connection(); + let privkeys = toKeyIdArray(privateKeys); + return conn.post('sign', { + 'data': data, + 'keys': privkeys, + 'armor': armor}); +} + + +export function reformatKey(privateKey, userIds=[], passphrase="", unlocked=false, keyExpirationTime=0){ + let privKey = toKeyIdArray(privateKey); + if (privKey.length !== 1){ + return false; //TODO some error handling. There is not exactly ONE key we are editing + } + let conn = new Connection(); + // TODO key management needs to be changed somewhat + return conn.post('TODO', { + 'key': privKey[0], + 'keyExpirationTime': keyExpirationTime, //TODO check if this is 0 or a positive and plausible number + 'userIds': userIds //TODO check if empty or plausible strings + }); + // unlocked will be ignored +} + +export function decryptKey({ privateKey, passphrase }) { + throw('not implemented here'); + return false; +}; + +export function encryptKey({ privateKey, passphrase }) { + throw('not implemented here'); + return false; +}; + +export function encryptSessionKey({data, algorithm, publicKeys, passwords, wildcard=false }) { + //openpgpjs: + // Encrypt a symmetric session key with public keys, passwords, or both at + // once. At least either public keys or passwords must be specified. + throw('not implemented here'); + return false; +}; + +export function decryptSessionKeys({ message, privateKeys, passwords }) { + throw('not implemented here'); + return false; +}; + +// //TODO worker handling + +// //TODO key representation +// //TODO: keyring handling + + +/** + * Helper functions and checks + */ + +/** + * Checks if the submitted value is a keyID. + * TODO: should accept all strings that are accepted as keyID by gnupg + * TODO: See if Key becomes an object later on + * @param {*} key input value. Is expected to be a string of 8,16 or 40 chars + * representing hex values. Will return false if that expectation is not met + */ +function isKeyId(key){ + if (!key || typeof(key) !== "string"){ + return false; + } + if ([8,16,40].indexOf(key.length) < 0){ + return false; + } + let regexp= /^[0-9a-fA-F]*$/i; + return regexp.test(key); +}; + +/** + * Tries to return an array of keyID values, either from a string or an array. + * Filters out those that do not meet the criteria. (TODO: silently for now) + * @param {*} array Input value. + */ +function toKeyIdArray(array){ + let result = []; + if (!array){ + return result; + } + if (!Array.isArray(array)){ + if (isKeyId(array) === true){ + return [keyId]; + } + return result; + } + for (let i=0; i < array.length; i++){ + if (isKeyId(array[i]) === true){ + result.push(array[i]); + } + } + return result; +}; diff --git a/lang/js/src/index.js b/lang/js/src/index.js new file mode 100644 index 0000000..02dc919 --- /dev/null +++ b/lang/js/src/index.js @@ -0,0 +1,14 @@ +import * as gpgmejs from'./gpgmejs' +export default gpgmejs; + +/** + * Export each high level api function separately. + * Usage: + * + * import { encryptMessage } from 'gpgme.js' + * encryptMessage(keys, text) + */ +export { + encrypt, decrypt, sign, verify, + generateKey, reformatKey + } from './gpgmejs'; diff --git a/lang/js/testapplication.js b/lang/js/testapplication.js new file mode 100644 index 0000000..d01aca9 --- /dev/null +++ b/lang/js/testapplication.js @@ -0,0 +1,21 @@ +/** +* Testing nativeMessaging. This is a temporary plugin using the gpgmejs + implemetation as contained in src/ +*/ +function buttonclicked(event){ + let data = document.getElementById("text0").value; + let keyId = document.getElementById("key").value; + let enc = Gpgmejs.encrypt(data, [keyId]).then(function(answer){ + console.log(answer); + console.log(answer.type); + console.log(answer.data); + alert(answer.data); + }, function(errormsg){ + alert('Error: '+ errormsg); + }); +}; + +document.addEventListener('DOMContentLoaded', function() { + document.getElementById("button0").addEventListener("click", + buttonclicked); + }); diff --git a/lang/js/testicon.png b/lang/js/testicon.png new file mode 100644 index 0000000..12c3f5d Binary files /dev/null and b/lang/js/testicon.png differ diff --git a/lang/js/ui.css b/lang/js/ui.css new file mode 100644 index 0000000..9c88698 --- /dev/null +++ b/lang/js/ui.css @@ -0,0 +1,10 @@ +ul { + list-style-type: none; + padding-left: 0px; +} + +ul li span { + float: left; + width: 120px; + margin-top: 6px; +} diff --git a/lang/js/ui.html b/lang/js/ui.html new file mode 100644 index 0000000..9c56c2e --- /dev/null +++ b/lang/js/ui.html @@ -0,0 +1,24 @@ + + + + + + + + + + +
    +
  • + Text: + +
  • +
  • + Public key ID: + +
  • +
+
+
+ + diff --git a/lang/js/webpack.conf.js b/lang/js/webpack.conf.js new file mode 100644 index 0000000..71b7116 --- /dev/null +++ b/lang/js/webpack.conf.js @@ -0,0 +1,13 @@ +const path = require('path'); + +module.exports = { + entry: './src/index.js', + // mode: 'development', + mode: 'production', + output: { + path: path.resolve(__dirname, 'dist'), + filename: 'gpgmejs.bundle.js', + libraryTarget: 'var', + library: 'Gpgmejs' + } +}; ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 - TODO | 157 ++- doc/gpgme.texi | 5 + lang/README | 2 +- lang/js/CHECKLIST | 30 + lang/js/CHECKLIST_build | 9 + lang/js/README | 52 + lang/js/manifest.json | 18 + lang/js/package.json | 17 + lang/js/src/Connection.js | 76 ++ lang/js/src/gpgmejs.js | 187 +++ lang/js/src/index.js | 14 + lang/js/testapplication.js | 21 + lang/js/testicon.png | Bin 0 -> 16192 bytes lang/js/ui.css | 10 + lang/js/ui.html | 24 + lang/js/webpack.conf.js | 13 + lang/python/docs/GPGMEpythonHOWTOen.org | 1406 ++++++++++++++++++++ lang/python/docs/TODO.org | 77 +- lang/python/examples/howto/README.org | 58 + lang/python/examples/howto/add-userid.py | 62 + lang/python/examples/howto/clear-sign-file.py | 56 + lang/python/examples/howto/create-key.py | 95 ++ lang/python/examples/howto/decrypt-file.py | 44 + lang/python/examples/howto/detach-sign-file.py | 64 + lang/python/examples/howto/encrypt-file.py | 71 + lang/python/examples/howto/encrypt-sign-file.py | 70 + lang/python/examples/howto/groups.py | 50 + lang/python/examples/howto/keycount.py | 42 + lang/python/examples/howto/revoke-userid.py | 62 + lang/python/examples/howto/sign-file.py | 64 + lang/python/examples/howto/sign-key.py | 63 + lang/python/examples/howto/temp-homedir-config.py | 126 ++ lang/python/examples/howto/verify-signatures.py | 64 + lang/python/examples/howto/verify-signed-file.py | 61 + ...crypt-to-all.py => low_level-encrypt_to_all.py} | 0 lang/qt/tests/t-config.cpp | 34 +- src/context.h | 3 + src/engine-assuan.c | 35 + src/engine-backend.h | 1 + src/engine-g13.c | 1 + src/engine-gpg.c | 36 +- src/engine-gpgconf.c | 1 + src/engine-gpgsm.c | 35 + src/engine-spawn.c | 1 + src/engine-uiserver.c | 1 + src/engine.c | 20 + src/engine.h | 1 + src/gpgme-json.c | 61 +- src/gpgme-tool.c | 2 +- src/gpgme.c | 21 +- src/keylist.c | 2 + src/op-support.c | 2 + tests/run-decrypt.c | 23 +- 54 files changed, 3392 insertions(+), 59 deletions(-) create mode 100644 lang/js/CHECKLIST create mode 100644 lang/js/CHECKLIST_build create mode 100644 lang/js/README create mode 100644 lang/js/manifest.json create mode 100644 lang/js/package.json create mode 100644 lang/js/src/Connection.js create mode 100644 lang/js/src/gpgmejs.js create mode 100644 lang/js/src/index.js create mode 100644 lang/js/testapplication.js create mode 100644 lang/js/testicon.png create mode 100644 lang/js/ui.css create mode 100644 lang/js/ui.html create mode 100644 lang/js/webpack.conf.js create mode 100644 lang/python/docs/GPGMEpythonHOWTOen.org create mode 100644 lang/python/examples/howto/README.org create mode 100755 lang/python/examples/howto/add-userid.py create mode 100755 lang/python/examples/howto/clear-sign-file.py create mode 100755 lang/python/examples/howto/create-key.py create mode 100755 lang/python/examples/howto/decrypt-file.py create mode 100755 lang/python/examples/howto/detach-sign-file.py create mode 100755 lang/python/examples/howto/encrypt-file.py create mode 100755 lang/python/examples/howto/encrypt-sign-file.py create mode 100644 lang/python/examples/howto/groups.py create mode 100755 lang/python/examples/howto/keycount.py create mode 100755 lang/python/examples/howto/revoke-userid.py create mode 100755 lang/python/examples/howto/sign-file.py create mode 100755 lang/python/examples/howto/sign-key.py create mode 100755 lang/python/examples/howto/temp-homedir-config.py create mode 100755 lang/python/examples/howto/verify-signatures.py create mode 100755 lang/python/examples/howto/verify-signed-file.py rename lang/python/examples/{encrypt-to-all.py => low_level-encrypt_to_all.py} (100%) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 21:15:29 2018 From: cvs at cvs.gnupg.org (by Jussi Kivilinna) Date: Tue, 10 Apr 2018 21:15:29 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-64-g5e01705 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 5e01705ca90830c27a4cbd8bad41243915f4538a (commit) via 634a85412a4073aa1890589ce5e97eac7b0f3ca3 (commit) via 35b59d0ea52e8a1c30c43554dc4dbca97da4bf87 (commit) via 52e52eb0e3e5541cfc86e04c5047500db5d538b7 (commit) from 0de2a22fcf6607d0aecb550feefa414cee3731b2 (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 5e01705ca90830c27a4cbd8bad41243915f4538a Author: Jussi Kivilinna Date: Tue Apr 10 22:14:39 2018 +0300 basic_all_hwfeature_combinations.sh: use $njobs to limit parallel tasks * tests/basic_all_hwfeature_combinations.sh: Use $njobs to limit parallel tasks instead of fixed number "8". -- Signed-off-by: Jussi Kivilinna diff --git a/tests/basic_all_hwfeature_combinations.sh b/tests/basic_all_hwfeature_combinations.sh index 8ec97bf..1387190 100755 --- a/tests/basic_all_hwfeature_combinations.sh +++ b/tests/basic_all_hwfeature_combinations.sh @@ -68,7 +68,7 @@ done | sort | ( while read opts; do currn=$nbasic curr_jobs=($(jobs -p)) - while [ "${#curr_jobs[@]}" -ge "8" ]; do + while [ "${#curr_jobs[@]}" -ge "$njobs" ]; do # Wait for one job to complete wait ${retcodes[$nwait]} retval=$? commit 634a85412a4073aa1890589ce5e97eac7b0f3ca3 Author: Jussi Kivilinna Date: Tue Apr 10 22:03:49 2018 +0300 Faster look-up for spec by algo for digests, ciphers and MAC * cipher/cipher.c (cipher_list_algo0, cipher_list_algo301): New cipher spec lists with same order and spacing as 'gcry_cipher_algos' enumeration. (spec_from_algo): Use new spec lists for faster look-up. * cipher/mac.c (mac_list_algo101, mac_list_algo201, mac_list_algo401) (mac_list_algo501): New MAC spec lists with same order and spacing as 'gcry_mac_algos' enumeration. (spec_from_algo): Use new spec lists for faster look-up. * cipher/md.c (digest_list_algo0, digest_list_algo301): New digest spec lists with same order and spacing as 'gcry_md_algos' enumeration. (spec_from_algo): Use new spec lists for faster look-up. -- Signed-off-by: Jussi Kivilinna diff --git a/cipher/cipher.c b/cipher/cipher.c index 1bef766..d6cd0b4 100644 --- a/cipher/cipher.c +++ b/cipher/cipher.c @@ -90,6 +90,114 @@ static gcry_cipher_spec_t * const cipher_list[] = NULL }; +/* Cipher implementations starting with index 0 (enum gcry_cipher_algos) */ +static gcry_cipher_spec_t * const cipher_list_algo0[] = + { + NULL, /* GCRY_CIPHER_NONE */ +#ifdef USE_IDEA + &_gcry_cipher_spec_idea, +#else + NULL, +#endif +#if USE_DES + &_gcry_cipher_spec_tripledes, +#else + NULL, +#endif +#if USE_CAST5 + &_gcry_cipher_spec_cast5, +#else + NULL, +#endif +#if USE_BLOWFISH + &_gcry_cipher_spec_blowfish, +#else + NULL, +#endif + NULL, /* GCRY_CIPHER_SAFER_SK128 */ + NULL, /* GCRY_CIPHER_DES_SK */ +#if USE_AES + &_gcry_cipher_spec_aes, + &_gcry_cipher_spec_aes192, + &_gcry_cipher_spec_aes256, +#else + NULL, + NULL, + NULL, +#endif +#if USE_TWOFISH + &_gcry_cipher_spec_twofish +#else + NULL +#endif + }; + +/* Cipher implementations starting with index 301 (enum gcry_cipher_algos) */ +static gcry_cipher_spec_t * const cipher_list_algo301[] = + { +#if USE_ARCFOUR + &_gcry_cipher_spec_arcfour, +#else + NULL, +#endif +#if USE_DES + &_gcry_cipher_spec_des, +#else + NULL, +#endif +#if USE_TWOFISH + &_gcry_cipher_spec_twofish128, +#else + NULL, +#endif +#if USE_SERPENT + &_gcry_cipher_spec_serpent128, + &_gcry_cipher_spec_serpent192, + &_gcry_cipher_spec_serpent256, +#else + NULL, + NULL, + NULL, +#endif +#if USE_RFC2268 + &_gcry_cipher_spec_rfc2268_40, + &_gcry_cipher_spec_rfc2268_128, +#else + NULL, + NULL, +#endif +#if USE_SEED + &_gcry_cipher_spec_seed, +#else + NULL, +#endif +#if USE_CAMELLIA + &_gcry_cipher_spec_camellia128, + &_gcry_cipher_spec_camellia192, + &_gcry_cipher_spec_camellia256, +#else + NULL, + NULL, + NULL, +#endif +#if USE_SALSA20 + &_gcry_cipher_spec_salsa20, + &_gcry_cipher_spec_salsa20r12, +#else + NULL, + NULL, +#endif +#if USE_GOST28147 + &_gcry_cipher_spec_gost28147, +#else + NULL, +#endif +#if USE_CHACHA20 + &_gcry_cipher_spec_chacha20 +#else + NULL, +#endif + }; @@ -105,15 +213,19 @@ map_algo (int algo) static gcry_cipher_spec_t * spec_from_algo (int algo) { - int idx; - gcry_cipher_spec_t *spec; + gcry_cipher_spec_t *spec = NULL; algo = map_algo (algo); - for (idx = 0; (spec = cipher_list[idx]); idx++) - if (algo == spec->algo) - return spec; - return NULL; + if (algo >= 0 && algo < DIM(cipher_list_algo0)) + spec = cipher_list_algo0[algo]; + else if (algo >= 301 && algo < 301 + DIM(cipher_list_algo301)) + spec = cipher_list_algo301[algo - 301]; + + if (spec) + gcry_assert (spec->algo == algo); + + return spec; } diff --git a/cipher/mac.c b/cipher/mac.c index e8e7ceb..1b79bf3 100644 --- a/cipher/mac.c +++ b/cipher/mac.c @@ -130,6 +130,236 @@ static gcry_mac_spec_t * const mac_list[] = { NULL, }; +/* HMAC implementations start with index 101 (enum gcry_mac_algos) */ +static gcry_mac_spec_t * const mac_list_algo101[] = + { +#if USE_SHA256 + &_gcry_mac_type_spec_hmac_sha256, + &_gcry_mac_type_spec_hmac_sha224, +#else + NULL, + NULL, +#endif +#if USE_SHA512 + &_gcry_mac_type_spec_hmac_sha512, + &_gcry_mac_type_spec_hmac_sha384, +#else + NULL, + NULL, +#endif +#if USE_SHA1 + &_gcry_mac_type_spec_hmac_sha1, +#else + NULL, +#endif +#if USE_MD5 + &_gcry_mac_type_spec_hmac_md5, +#else + NULL, +#endif +#if USE_MD4 + &_gcry_mac_type_spec_hmac_md4, +#else + NULL, +#endif +#if USE_RMD160 + &_gcry_mac_type_spec_hmac_rmd160, +#else + NULL, +#endif +#if USE_TIGER + &_gcry_mac_type_spec_hmac_tiger1, +#else + NULL, +#endif +#if USE_WHIRLPOOL + &_gcry_mac_type_spec_hmac_whirlpool, +#else + NULL, +#endif +#ifdef USE_GOST_R_3411_94 + &_gcry_mac_type_spec_hmac_gost3411_94, +#else + NULL, +#endif +#ifdef USE_GOST_R_3411_12 + &_gcry_mac_type_spec_hmac_stribog256, + &_gcry_mac_type_spec_hmac_stribog512, +#else + NULL, + NULL, +#endif +#if USE_MD2 + &_gcry_mac_type_spec_hmac_md2, +#else + NULL, +#endif +#if USE_SHA3 + &_gcry_mac_type_spec_hmac_sha3_224, + &_gcry_mac_type_spec_hmac_sha3_256, + &_gcry_mac_type_spec_hmac_sha3_384, + &_gcry_mac_type_spec_hmac_sha3_512, +#else + NULL, + NULL, + NULL, + NULL, +#endif +#ifdef USE_GOST_R_3411_94 + &_gcry_mac_type_spec_hmac_gost3411_cp, +#else + NULL, +#endif +#if USE_BLAKE2 + &_gcry_mac_type_spec_hmac_blake2b_512, + &_gcry_mac_type_spec_hmac_blake2b_384, + &_gcry_mac_type_spec_hmac_blake2b_256, + &_gcry_mac_type_spec_hmac_blake2b_160, + &_gcry_mac_type_spec_hmac_blake2s_256, + &_gcry_mac_type_spec_hmac_blake2s_224, + &_gcry_mac_type_spec_hmac_blake2s_160, + &_gcry_mac_type_spec_hmac_blake2s_128, +#else + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#endif +#if USE_SM3 + &_gcry_mac_type_spec_hmac_sm3 +#else + NULL +#endif + }; + +/* CMAC implementations start with index 201 (enum gcry_mac_algos) */ +static gcry_mac_spec_t * const mac_list_algo201[] = + { +#if USE_AES + &_gcry_mac_type_spec_cmac_aes, +#else + NULL, +#endif +#if USE_DES + &_gcry_mac_type_spec_cmac_tripledes, +#else + NULL, +#endif +#if USE_CAMELLIA + &_gcry_mac_type_spec_cmac_camellia, +#else + NULL, +#endif +#if USE_CAST5 + &_gcry_mac_type_spec_cmac_cast5, +#else + NULL, +#endif +#if USE_BLOWFISH + &_gcry_mac_type_spec_cmac_blowfish, +#else + NULL, +#endif +#if USE_TWOFISH + &_gcry_mac_type_spec_cmac_twofish, +#else + NULL, +#endif +#if USE_SERPENT + &_gcry_mac_type_spec_cmac_serpent, +#else + NULL, +#endif +#if USE_SEED + &_gcry_mac_type_spec_cmac_seed, +#else + NULL, +#endif +#if USE_RFC2268 + &_gcry_mac_type_spec_cmac_rfc2268, +#else + NULL, +#endif +#ifdef USE_IDEA + &_gcry_mac_type_spec_cmac_idea, +#else + NULL, +#endif +#if USE_GOST28147 + &_gcry_mac_type_spec_cmac_gost28147 +#else + NULL +#endif + }; + +/* GMAC implementations start with index 401 (enum gcry_mac_algos) */ +static gcry_mac_spec_t * const mac_list_algo401[] = + { +#if USE_AES + &_gcry_mac_type_spec_gmac_aes, +#else + NULL, +#endif +#if USE_CAMELLIA + &_gcry_mac_type_spec_gmac_camellia, +#else + NULL, +#endif +#if USE_TWOFISH + &_gcry_mac_type_spec_gmac_twofish, +#else + NULL, +#endif +#if USE_SERPENT + &_gcry_mac_type_spec_gmac_serpent, +#else + NULL, +#endif +#if USE_SEED + &_gcry_mac_type_spec_gmac_seed +#else + NULL +#endif + }; + +/* Poly1305-MAC implementations start with index 501 (enum gcry_mac_algos) */ +static gcry_mac_spec_t * const mac_list_algo501[] = + { + &_gcry_mac_type_spec_poly1305mac, +#if USE_AES + &_gcry_mac_type_spec_poly1305mac_aes, +#else + NULL, +#endif +#if USE_CAMELLIA + &_gcry_mac_type_spec_poly1305mac_camellia, +#else + NULL, +#endif +#if USE_TWOFISH + &_gcry_mac_type_spec_poly1305mac_twofish, +#else + NULL, +#endif +#if USE_SERPENT + &_gcry_mac_type_spec_poly1305mac_serpent, +#else + NULL, +#endif +#if USE_SEED + &_gcry_mac_type_spec_poly1305mac_seed +#else + NULL +#endif + }; + + + + /* Explicitly initialize this module. */ gcry_err_code_t _gcry_mac_init (void) @@ -154,13 +384,21 @@ _gcry_mac_init (void) static gcry_mac_spec_t * spec_from_algo (int algo) { - gcry_mac_spec_t *spec; - int idx; + gcry_mac_spec_t *spec = NULL; - for (idx = 0; (spec = mac_list[idx]); idx++) - if (algo == spec->algo) - return spec; - return NULL; + if (algo >= 101 && algo < 101 + DIM(mac_list_algo101)) + spec = mac_list_algo101[algo - 101]; + else if (algo >= 201 && algo < 201 + DIM(mac_list_algo201)) + spec = mac_list_algo201[algo - 201]; + else if (algo >= 401 && algo < 401 + DIM(mac_list_algo401)) + spec = mac_list_algo401[algo - 401]; + else if (algo >= 501 && algo < 501 + DIM(mac_list_algo501)) + spec = mac_list_algo501[algo - 501]; + + if (spec) + gcry_assert (spec->algo == algo); + + return spec; } diff --git a/cipher/md.c b/cipher/md.c index f6c1954..47c8cec 100644 --- a/cipher/md.c +++ b/cipher/md.c @@ -101,6 +101,143 @@ static gcry_md_spec_t * const digest_list[] = NULL }; +/* Digest implementations starting with index 0 (enum gcry_md_algos) */ +static gcry_md_spec_t * const digest_list_algo0[] = + { + NULL, /* GCRY_MD_NONE */ +#if USE_MD5 + &_gcry_digest_spec_md5, +#else + NULL, +#endif +#if USE_SHA1 + &_gcry_digest_spec_sha1, +#else + NULL, +#endif +#if USE_RMD160 + &_gcry_digest_spec_rmd160, +#else + NULL, +#endif + NULL, /* Unused index 4 */ +#if USE_MD2 + &_gcry_digest_spec_md2, +#else + NULL, +#endif +#if USE_TIGER + &_gcry_digest_spec_tiger, +#else + NULL, +#endif + NULL, /* GCRY_MD_HAVAL */ +#if USE_SHA256 + &_gcry_digest_spec_sha256, +#else + NULL, +#endif +#if USE_SHA512 + &_gcry_digest_spec_sha384, + &_gcry_digest_spec_sha512, +#else + NULL, + NULL, +#endif +#if USE_SHA256 + &_gcry_digest_spec_sha224 +#else + NULL +#endif + }; + +/* Digest implementations starting with index 301 (enum gcry_md_algos) */ +static gcry_md_spec_t * const digest_list_algo301[] = + { +#if USE_MD4 + &_gcry_digest_spec_md4, +#else + NULL, +#endif +#if USE_CRC + &_gcry_digest_spec_crc32, + &_gcry_digest_spec_crc32_rfc1510, + &_gcry_digest_spec_crc24_rfc2440, +#else + NULL, + NULL, + NULL, +#endif +#if USE_WHIRLPOOL + &_gcry_digest_spec_whirlpool, +#else + NULL, +#endif +#if USE_TIGER + &_gcry_digest_spec_tiger1, + &_gcry_digest_spec_tiger2, +#else + NULL, + NULL, +#endif +#if USE_GOST_R_3411_94 + &_gcry_digest_spec_gost3411_94, +#else + NULL, +#endif +#if USE_GOST_R_3411_12 + &_gcry_digest_spec_stribog_256, + &_gcry_digest_spec_stribog_512, +#else + NULL, + NULL, +#endif +#if USE_GOST_R_3411_94 + &_gcry_digest_spec_gost3411_cp, +#else + NULL, +#endif +#if USE_SHA3 + &_gcry_digest_spec_sha3_224, + &_gcry_digest_spec_sha3_256, + &_gcry_digest_spec_sha3_384, + &_gcry_digest_spec_sha3_512, + &_gcry_digest_spec_shake128, + &_gcry_digest_spec_shake256, +#else + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#endif +#if USE_BLAKE2 + &_gcry_digest_spec_blake2b_512, + &_gcry_digest_spec_blake2b_384, + &_gcry_digest_spec_blake2b_256, + &_gcry_digest_spec_blake2b_160, + &_gcry_digest_spec_blake2s_256, + &_gcry_digest_spec_blake2s_224, + &_gcry_digest_spec_blake2s_160, + &_gcry_digest_spec_blake2s_128, +#else + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, +#endif +#if USE_SM3 + &_gcry_digest_spec_sm3 +#else + NULL +#endif + }; + typedef struct gcry_md_list { @@ -118,7 +255,7 @@ struct gcry_md_context size_t actual_handle_size; /* Allocated size of this handle. */ FILE *debug; struct { - unsigned int secure: 1; + unsigned int secure:1; unsigned int finalized:1; unsigned int bugemu1:1; unsigned int hmac:1; @@ -153,15 +290,19 @@ map_algo (int algo) static gcry_md_spec_t * spec_from_algo (int algo) { - int idx; - gcry_md_spec_t *spec; + gcry_md_spec_t *spec = NULL; algo = map_algo (algo); - for (idx = 0; (spec = digest_list[idx]); idx++) - if (algo == spec->algo) - return spec; - return NULL; + if (algo >= 0 && algo < DIM(digest_list_algo0)) + spec = digest_list_algo0[algo]; + else if (algo >= 301 && algo < 301 + DIM(digest_list_algo301)) + spec = digest_list_algo301[algo - 301]; + + if (spec) + gcry_assert (spec->algo == algo); + + return spec; } commit 35b59d0ea52e8a1c30c43554dc4dbca97da4bf87 Author: Jussi Kivilinna Date: Tue Apr 10 22:03:49 2018 +0300 Fix building with BLAKE2 disabled * cipher/md.c (md_setkey): Enclose Blake2 part with USE_BLAKE2. -- Signed-off-by: Jussi Kivilinna diff --git a/cipher/md.c b/cipher/md.c index efbffe1..f6c1954 100644 --- a/cipher/md.c +++ b/cipher/md.c @@ -703,6 +703,7 @@ md_setkey (gcry_md_hd_t h, const unsigned char *key, size_t keylen) { switch (r->spec->algo) { +#if USE_BLAKE2 /* TODO? add spec->init_with_key? */ case GCRY_MD_BLAKE2B_512: case GCRY_MD_BLAKE2B_384: @@ -719,6 +720,7 @@ md_setkey (gcry_md_hd_t h, const unsigned char *key, size_t keylen) ? GCRY_MD_FLAG_BUGEMU1:0, key, keylen, r->spec->algo); break; +#endif default: rc = GPG_ERR_DIGEST_ALGO; break; commit 52e52eb0e3e5541cfc86e04c5047500db5d538b7 Author: Jussi Kivilinna Date: Tue Apr 10 22:03:49 2018 +0300 Add missing BLAKE2, SM3 and GOSTR3411_CP to MAC-HMAC interface * cipher/mac-hmac.c (map_mac_algo_to_md): Add GOSTR3411_CP, BLAKE2 and SM3. (_gcry_mac_type_spec_hmac_gost3411_cp) (_gcry_mac_type_spec_hmac_blake2b_512) (_gcry_mac_type_spec_hmac_blake2b_384) (_gcry_mac_type_spec_hmac_blake2b_256) (_gcry_mac_type_spec_hmac_blake2b_160) (_gcry_mac_type_spec_hmac_blake2s_256) (_gcry_mac_type_spec_hmac_blake2s_224) (_gcry_mac_type_spec_hmac_blake2s_160) (_gcry_mac_type_spec_hmac_blake2s_128) (_gcry_mac_type_spec_hmac_sm3): New. * cipher/mac-internal.h (_gcry_mac_type_spec_hmac_gost3411_cp) (_gcry_mac_type_spec_hmac_blake2b_512) (_gcry_mac_type_spec_hmac_blake2b_384) (_gcry_mac_type_spec_hmac_blake2b_256) (_gcry_mac_type_spec_hmac_blake2b_160) (_gcry_mac_type_spec_hmac_blake2s_256) (_gcry_mac_type_spec_hmac_blake2s_224) (_gcry_mac_type_spec_hmac_blake2s_160) (_gcry_mac_type_spec_hmac_blake2s_128) (_gcry_mac_type_spec_hmac_sm3): New. * cipher/mac.c (mac_list): Add GOSTR3411_CP, BLAKE2 and SM3. * src/gcrypt.h.in (GCRY_MAC_HMAC_GOSTR3411_CP) (GCRY_MAC_HMAC_BLAKE2B_512, GCRY_MAC_HMAC_BLAKE2B_384) (GCRY_MAC_HMAC_BLAKE2B_256, GCRY_MAC_HMAC_BLAKE2B_160) (GCRY_MAC_HMAC_BLAKE2S_256, GCRY_MAC_HMAC_BLAKE2S_224) (GCRY_MAC_HMAC_BLAKE2S_160, GCRY_MAC_HMAC_BLAKE2S_128) (GCRY_MAC_HMAC_SM3): New. -- Signed-off-by: Jussi Kivilinna diff --git a/cipher/mac-hmac.c b/cipher/mac-hmac.c index 9379f4b..86281ac 100644 --- a/cipher/mac-hmac.c +++ b/cipher/mac-hmac.c @@ -67,10 +67,30 @@ map_mac_algo_to_md (int mac_algo) return GCRY_MD_WHIRLPOOL; case GCRY_MAC_HMAC_GOSTR3411_94: return GCRY_MD_GOSTR3411_94; + case GCRY_MAC_HMAC_GOSTR3411_CP: + return GCRY_MD_GOSTR3411_CP; case GCRY_MAC_HMAC_STRIBOG256: return GCRY_MD_STRIBOG256; case GCRY_MAC_HMAC_STRIBOG512: return GCRY_MD_STRIBOG512; + case GCRY_MAC_HMAC_BLAKE2B_512: + return GCRY_MD_BLAKE2B_512; + case GCRY_MAC_HMAC_BLAKE2B_384: + return GCRY_MD_BLAKE2B_384; + case GCRY_MAC_HMAC_BLAKE2B_256: + return GCRY_MD_BLAKE2B_256; + case GCRY_MAC_HMAC_BLAKE2B_160: + return GCRY_MD_BLAKE2B_160; + case GCRY_MAC_HMAC_BLAKE2S_256: + return GCRY_MD_BLAKE2S_256; + case GCRY_MAC_HMAC_BLAKE2S_224: + return GCRY_MD_BLAKE2S_224; + case GCRY_MAC_HMAC_BLAKE2S_160: + return GCRY_MD_BLAKE2S_160; + case GCRY_MAC_HMAC_BLAKE2S_128: + return GCRY_MD_BLAKE2S_128; + case GCRY_MAC_HMAC_SM3: + return GCRY_MD_SM3; } } @@ -267,6 +287,10 @@ gcry_mac_spec_t _gcry_mac_type_spec_hmac_gost3411_94 = { GCRY_MAC_HMAC_GOSTR3411_94, {0, 0}, "HMAC_GOSTR3411_94", &hmac_ops }; +gcry_mac_spec_t _gcry_mac_type_spec_hmac_gost3411_cp = { + GCRY_MAC_HMAC_GOSTR3411_CP, {0, 0}, "HMAC_GOSTR3411_CP", + &hmac_ops +}; #endif #ifdef USE_GOST_R_3411_12 gcry_mac_spec_t _gcry_mac_type_spec_hmac_stribog256 = { @@ -315,3 +339,43 @@ gcry_mac_spec_t _gcry_mac_type_spec_hmac_md2 = { &hmac_ops }; #endif +#if USE_BLAKE2 +gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_512 = { + GCRY_MAC_HMAC_BLAKE2B_512, {0, 0}, "HMAC_BLAKE2B_512", + &hmac_ops +}; +gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_384 = { + GCRY_MAC_HMAC_BLAKE2B_384, {0, 0}, "HMAC_BLAKE2B_384", + &hmac_ops +}; +gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_256 = { + GCRY_MAC_HMAC_BLAKE2B_256, {0, 0}, "HMAC_BLAKE2B_256", + &hmac_ops +}; +gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_160 = { + GCRY_MAC_HMAC_BLAKE2B_160, {0, 0}, "HMAC_BLAKE2B_160", + &hmac_ops +}; +gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_256 = { + GCRY_MAC_HMAC_BLAKE2S_256, {0, 0}, "HMAC_BLAKE2S_256", + &hmac_ops +}; +gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_224 = { + GCRY_MAC_HMAC_BLAKE2S_224, {0, 0}, "HMAC_BLAKE2S_224", + &hmac_ops +}; +gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_160 = { + GCRY_MAC_HMAC_BLAKE2S_160, {0, 0}, "HMAC_BLAKE2S_160", + &hmac_ops +}; +gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_128 = { + GCRY_MAC_HMAC_BLAKE2S_128, {0, 0}, "HMAC_BLAKE2S_128", + &hmac_ops +}; +#endif +#if USE_SM3 +gcry_mac_spec_t _gcry_mac_type_spec_hmac_sm3 = { + GCRY_MAC_HMAC_SM3, {0, 0}, "HMAC_SM3", + &hmac_ops +}; +#endif diff --git a/cipher/mac-internal.h b/cipher/mac-internal.h index 2beb284..eb54673 100644 --- a/cipher/mac-internal.h +++ b/cipher/mac-internal.h @@ -142,6 +142,7 @@ extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_512; #endif #ifdef USE_GOST_R_3411_94 extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_gost3411_94; +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_gost3411_cp; #endif #ifdef USE_GOST_R_3411_12 extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_stribog256; @@ -162,6 +163,19 @@ extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_md5; #if USE_MD4 extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_md4; #endif +#if USE_BLAKE2 +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_512; +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_384; +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_256; +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_160; +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_256; +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_224; +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_160; +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_128; +#endif +#if USE_SM3 +extern gcry_mac_spec_t _gcry_mac_type_spec_hmac_sm3; +#endif /* * The CMAC algorithm specifications (mac-cmac.c). diff --git a/cipher/mac.c b/cipher/mac.c index 4a7a47d..e8e7ceb 100644 --- a/cipher/mac.c +++ b/cipher/mac.c @@ -49,6 +49,7 @@ static gcry_mac_spec_t * const mac_list[] = { #endif #ifdef USE_GOST_R_3411_94 &_gcry_mac_type_spec_hmac_gost3411_94, + &_gcry_mac_type_spec_hmac_gost3411_cp, #endif #ifdef USE_GOST_R_3411_12 &_gcry_mac_type_spec_hmac_stribog256, @@ -69,6 +70,19 @@ static gcry_mac_spec_t * const mac_list[] = { #if USE_MD4 &_gcry_mac_type_spec_hmac_md4, #endif +#if USE_BLAKE2 + &_gcry_mac_type_spec_hmac_blake2b_512, + &_gcry_mac_type_spec_hmac_blake2b_384, + &_gcry_mac_type_spec_hmac_blake2b_256, + &_gcry_mac_type_spec_hmac_blake2b_160, + &_gcry_mac_type_spec_hmac_blake2s_256, + &_gcry_mac_type_spec_hmac_blake2s_224, + &_gcry_mac_type_spec_hmac_blake2s_160, + &_gcry_mac_type_spec_hmac_blake2s_128, +#endif +#if USE_SM3 + &_gcry_mac_type_spec_hmac_sm3, +#endif #if USE_BLOWFISH &_gcry_mac_type_spec_cmac_blowfish, #endif diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index 83f94b6..a1cb15a 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -1433,6 +1433,16 @@ enum gcry_mac_algos GCRY_MAC_HMAC_SHA3_256 = 116, GCRY_MAC_HMAC_SHA3_384 = 117, GCRY_MAC_HMAC_SHA3_512 = 118, + GCRY_MAC_HMAC_GOSTR3411_CP = 119, + GCRY_MAC_HMAC_BLAKE2B_512 = 120, + GCRY_MAC_HMAC_BLAKE2B_384 = 121, + GCRY_MAC_HMAC_BLAKE2B_256 = 122, + GCRY_MAC_HMAC_BLAKE2B_160 = 123, + GCRY_MAC_HMAC_BLAKE2S_256 = 124, + GCRY_MAC_HMAC_BLAKE2S_224 = 125, + GCRY_MAC_HMAC_BLAKE2S_160 = 126, + GCRY_MAC_HMAC_BLAKE2S_128 = 127, + GCRY_MAC_HMAC_SM3 = 128, GCRY_MAC_CMAC_AES = 201, GCRY_MAC_CMAC_3DES = 202, ----------------------------------------------------------------------- Summary of changes: cipher/cipher.c | 124 +++++++++++++- cipher/mac-hmac.c | 64 ++++++++ cipher/mac-internal.h | 14 ++ cipher/mac.c | 264 +++++++++++++++++++++++++++++- cipher/md.c | 157 +++++++++++++++++- src/gcrypt.h.in | 10 ++ tests/basic_all_hwfeature_combinations.sh | 2 +- 7 files changed, 615 insertions(+), 20 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 01:52:18 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Wed, 11 Apr 2018 01:52:18 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.8.1-65-g3e3b520 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 3e3b520fb32a37c5c23762531a7b3168e112ac36 (commit) from 5e01705ca90830c27a4cbd8bad41243915f4538a (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 3e3b520fb32a37c5c23762531a7b3168e112ac36 Author: NIIBE Yutaka Date: Wed Apr 11 08:45:22 2018 +0900 hmac: Use xtrymalloc. * src/hmac256.c (_gcry_hmac256_new): Use xtrymalloc. (_gcry_hmac256_file): Likewise. -- Don't require config.h but stdint.h for STANDALONE. Drop STANDALONE support for WindowsCE. GnuPG-bug-id: 3877 Signed-off-by: NIIBE Yutaka diff --git a/src/hmac256.c b/src/hmac256.c index ca1eb75..2d66079 100644 --- a/src/hmac256.c +++ b/src/hmac256.c @@ -24,8 +24,7 @@ internal consistency checks. It should not be used for sensitive data because no mechanisms to clear the stack etc are used. - This module may be used standalone and requires only a few - standard definitions to be provided in a config.h file. + This module may be used standalone. Types: @@ -46,7 +45,19 @@ for testing this included module. */ +#ifdef STANDALONE +#include +#define HAVE_U32_TYPEDEF 1 +typedef uint32_t u32; +#define VERSION "standalone" +/* For GCC, we can detect endianness. If not GCC, please define manually. */ +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#define WORDS_BIGENDIAN 1 +#endif +#else #include +#endif + #include #include #include @@ -56,13 +67,11 @@ # include /* We need setmode(). */ #endif -/* For a native WindowsCE binary we need to include gpg-error.h to - provide a replacement for strerror. In other cases we need a - replacement macro for gpg_err_set_errno. */ -#ifdef __MINGW32CE__ -# include +#ifdef STANDALONE +#define xtrymalloc(a) malloc((a)) +#define gpg_err_set_errno(a) (errno = (a)) #else -# define gpg_err_set_errno(a) (errno = (a)) +#include "g10lib.h" #endif #include "hmac256.h" @@ -296,7 +305,7 @@ _gcry_hmac256_new (const void *key, size_t keylen) { hmac256_context_t hd; - hd = malloc (sizeof *hd); + hd = xtrymalloc (sizeof *hd); if (!hd) return NULL; @@ -469,7 +478,7 @@ _gcry_hmac256_file (void *result, size_t resultsize, const char *filename, } buffer_size = 32768; - buffer = malloc (buffer_size); + buffer = xtrymalloc (buffer_size); if (!buffer) { fclose (fp); ----------------------------------------------------------------------- Summary of changes: src/hmac256.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 09:47:37 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 11 Apr 2018 09:47:37 +0200 Subject: [git] GPG-ERROR - branch, master, updated. gpgrt-1.28-29-g253ca17 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 253ca177055e23617b14e0934b09ef50253f29eb (commit) via c3825327da826e434ada9abde34e6bbd7ef61737 (commit) via f4c4592a15f9ec997c82c3d3d25656e0c2982d97 (commit) via e901c9fb04f5a96ba2bd49225b396ce7857a3782 (commit) from 99e976be723ebbf7fe5c73671dd916bd4a067727 (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 253ca177055e23617b14e0934b09ef50253f29eb Author: Werner Koch Date: Wed Apr 11 09:40:17 2018 +0200 Post release updates -- diff --git a/NEWS b/NEWS index 7b024f7..9c1459f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Noteworthy changes in version 1.30 (unreleased) [C24/A24/R_] +----------------------------------------------- + + Noteworthy changes in version 1.29 (2018-04-11) [C24/A24/R0] ----------------------------------------------- diff --git a/configure.ac b/configure.ac index 5328af4..e1f8858 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,7 @@ min_automake_version="1.14" # See below for the LT versions. m4_define([mym4_package],[libgpg-error]) m4_define([mym4_major], [1]) -m4_define([mym4_minor], [29]) +m4_define([mym4_minor], [30]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag commit c3825327da826e434ada9abde34e6bbd7ef61737 Author: Werner Koch Date: Wed Apr 11 09:24:03 2018 +0200 Release 1.29 * configure.ac: Bump LT version to C24/A24/R0. Signed-off-by: Werner Koch diff --git a/NEWS b/NEWS index 44da9ee..7b024f7 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.29 (unreleased) [C23/A23/R_] +Noteworthy changes in version 1.29 (2018-04-11) [C24/A24/R0] ----------------------------------------------- * The yat2m tool is during cross-compile now also installed on the diff --git a/README b/README index 9cc5de0..bab9c95 100644 --- a/README +++ b/README @@ -22,6 +22,10 @@ components are - Log functions + - Option parser + + - BAse-64 encoder and decoder. + More components will be added over time. Most functions are prefixed with "gpgrt" (GnuPG Run Time) instead of "gpg_err" to indicate the long term plan to rename this library to gpgrt. @@ -106,13 +110,8 @@ To build for Windows you you may use the convenience command: ./autogen.sh --build-w32 -which runs configure with suitable options. For WindowsCE the command -is: - - ./autogen.sh --build-w32ce - -There is also _experimental_ support for building a 64 bit Windows -version: +which runs configure with suitable options. There is also basic +support for building a 64 bit Windows version: ./autogen.sh --build-w64 diff --git a/configure.ac b/configure.ac index 0214fb6..5328af4 100644 --- a/configure.ac +++ b/configure.ac @@ -49,8 +49,8 @@ AC_INIT([mym4_package],[mym4_version], [https://bugs.gnupg.org]) # (Interfaces added: AGE++) # (Interfaces removed: AGE=0) # Note that added error codes don't constitute an interface change. -LIBGPG_ERROR_LT_CURRENT=23 -LIBGPG_ERROR_LT_AGE=23 +LIBGPG_ERROR_LT_CURRENT=24 +LIBGPG_ERROR_LT_AGE=24 LIBGPG_ERROR_LT_REVISION=0 ################################################ commit f4c4592a15f9ec997c82c3d3d25656e0c2982d97 Author: Werner Koch Date: Wed Apr 11 09:12:39 2018 +0200 doc: Beautify comments in gpg-error.h. -- Signed-off-by: Werner Koch diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index f585808..ce7d278 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -1,7 +1,7 @@ -/* gpg-error.h or gpgrt.h - Public interface to libgpg-error. -*- c -*- +/* gpg-error.h or gpgrt.h - Common code for GnuPG and others. -*- c -*- * Copyright (C) 2001-2018 g10 Code GmbH * - * This file is part of libgpg-error. + * This file is part of libgpg-error (aka libgpgrt). * * libgpg-error is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -20,6 +20,41 @@ * @configure_input@ */ +/* The GnuPG project consists of many components. Error codes are + * exchanged between all components. The common error codes and their + * user-presentable descriptions are kept into a shared library to + * allow adding new error codes and components without recompiling any + * of the other components. In addition to error codes this library + * also features several other groups of functions which are common to + * all GnuPG components. They may be used by independet project as + * well. The interfaces will not change in a backward incompatible way. + * + * An error code together with an error source build up an error + * value. As the error value is been passed from one component to + * another, it preserves the information about the source and nature + * of the error. + * + * A component of the GnuPG project can define the following macros to + * tune the behaviour of the library: + * + * GPG_ERR_SOURCE_DEFAULT: Define to an error source of type + * gpg_err_source_t to make that source the default for gpg_error(). + * Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default. + * + * GPG_ERR_ENABLE_GETTEXT_MACROS: Define to provide macros to map the + * internal gettext API to standard names. This has only an effect on + * Windows platforms. + * + * GPGRT_ENABLE_ES_MACROS: Define to provide "es_" macros for the + * estream functions. + * + * GPGRT_ENABLE_LOG_MACROS: Define to provide short versions of the + * log functions. + * + * GPGRT_ENABLE_ARGPARSE_MACROS: Needs to be defined to provide the + * mandatory macros of the argparse interface. + */ + #ifndef GPG_ERROR_H #define GPG_ERROR_H 1 #ifndef GPGRT_H @@ -57,50 +92,17 @@ extern "C" { #endif #endif /* __cplusplus */ -/* The GnuPG project consists of many components. Error codes are - exchanged between all components. The common error codes and their - user-presentable descriptions are kept into a shared library to - allow adding new error codes and components without recompiling any - of the other components. The interface will not change in a - backward incompatible way. - - An error code together with an error source build up an error - value. As the error value is been passed from one component to - another, it preserver the information about the source and nature - of the error. - - A component of the GnuPG project can define the following macros to - tune the behaviour of the library: - - GPG_ERR_SOURCE_DEFAULT: Define to an error source of type - gpg_err_source_t to make that source the default for gpg_error(). - Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default. - - GPG_ERR_ENABLE_GETTEXT_MACROS: Define to provide macros to map the - internal gettext API to standard names. This has only an effect on - Windows platforms. - - GPGRT_ENABLE_ES_MACROS: Define to provide "es_" macros for the - estream functions. - - GPGRT_ENABLE_LOG_MACROS: Define to provide short versions of the - log functions. - - GPGRT_ENABLE_ARGPARSE_MACROS: Needs to be defined to provide the - mandatory macros of the argparse interface. - - In addition to the error codes, Libgpg-error also provides a set of - functions used by most GnuPG components. */ /* The error source type gpg_err_source_t. - - Where as the Poo out of a welle small - Taketh his firste springing and his sours. - --Chaucer. */ + * + * Where as the Poo out of a welle small + * Taketh his firste springing and his sours. + * --Chaucer. + */ /* Only use free slots, never change or reorder the existing - entries. */ + * entries. */ typedef enum { @include:err-sources@ @@ -112,7 +114,7 @@ typedef enum /* The error code type gpg_err_code_t. */ /* Only use free slots, never change or reorder the existing - entries. */ + * entries. */ typedef enum { @include:err-codes@ @@ -127,13 +129,13 @@ typedef enum /* The error value type gpg_error_t. */ /* We would really like to use bit-fields in a struct, but using - structs as return values can cause binary compatibility issues, in - particular if you want to do it efficiently (also see - -freg-struct-return option to GCC). */ + * structs as return values can cause binary compatibility issues, in + * particular if you want to do it efficiently (also see + * -freg-struct-return option to GCC). */ typedef unsigned int gpg_error_t; /* We use the lowest 16 bits of gpg_error_t for error codes. The 16th - bit indicates system errors. */ + * bit indicates system errors. */ #define GPG_ERR_CODE_MASK (GPG_ERR_CODE_DIM - 1) /* Bits 17 to 24 are reserved. */ @@ -143,11 +145,13 @@ typedef unsigned int gpg_error_t; #define GPG_ERR_SOURCE_SHIFT 24 /* The highest bit is reserved. It shouldn't be used to prevent - potential negative numbers when transmitting error values as - text. */ + * potential negative numbers when transmitting error values as + * text. */ -/* GCC feature test. */ +/* + * GCC feature test. + */ #if __GNUC__ # define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ @@ -208,9 +212,9 @@ typedef unsigned int gpg_error_t; #endif /* The used and unused attributes. - I am not sure since when the unused attribute is really supported. - In any case it it only needed for gcc versions which print a - warning. Thus let us require gcc >= 3.5. */ + * I am not sure since when the unused attribute is really supported. + * In any case it it only needed for gcc versions which print a + * warning. Thus let us require gcc >= 3.5. */ #if _GPG_ERR_GCC_VERSION >= 40000 # define GPGRT_ATTR_USED __attribute__ ((used)) #else @@ -290,7 +294,9 @@ gpgrt_annotate_leaked_object (const void *p) } -/* Initialization function. */ +/* + * Initialization function. + */ /* Initialize the library. This function should be run early. */ gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR; @@ -320,10 +326,12 @@ void gpgrt_set_alloc_func (void *(*f)(void *a, size_t n)); -/* Constructor and accessor functions. */ +/* + * Constructor and accessor functions. + */ /* Construct an error value from an error code and source. Within a - subsystem, use gpg_error. */ + * subsystem, use gpg_error. */ static GPG_ERR_INLINE gpg_error_t gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) { @@ -334,7 +342,7 @@ gpg_err_make (gpg_err_source_t source, gpg_err_code_t code) /* The user should define GPG_ERR_SOURCE_DEFAULT before including this - file to specify a default source for gpg_error. */ + * file to specify a default source for gpg_error. */ #ifndef GPG_ERR_SOURCE_DEFAULT #define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_UNKNOWN #endif @@ -366,44 +374,44 @@ gpg_err_source (gpg_error_t err) /* String functions. */ /* Return a pointer to a string containing a description of the error - code in the error value ERR. This function is not thread-safe. */ + * code in the error value ERR. This function is not thread-safe. */ const char *gpg_strerror (gpg_error_t err); /* Return the error string for ERR in the user-supplied buffer BUF of - size BUFLEN. This function is, in contrast to gpg_strerror, - thread-safe if a thread-safe strerror_r() function is provided by - the system. If the function succeeds, 0 is returned and BUF - contains the string describing the error. If the buffer was not - large enough, ERANGE is returned and BUF contains as much of the - beginning of the error string as fits into the buffer. */ + * size BUFLEN. This function is, in contrast to gpg_strerror, + * thread-safe if a thread-safe strerror_r() function is provided by + * the system. If the function succeeds, 0 is returned and BUF + * contains the string describing the error. If the buffer was not + * large enough, ERANGE is returned and BUF contains as much of the + * beginning of the error string as fits into the buffer. */ int gpg_strerror_r (gpg_error_t err, char *buf, size_t buflen); /* Return a pointer to a string containing a description of the error - source in the error value ERR. */ + * source in the error value ERR. */ const char *gpg_strsource (gpg_error_t err); -/* Mapping of system errors (errno). */ +/* + * Mapping of system errors (errno). + */ /* Retrieve the error code for the system error ERR. This returns - GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report - this). */ + * GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report + * this). */ gpg_err_code_t gpg_err_code_from_errno (int err); - /* Retrieve the system error for the error code CODE. This returns 0 - if CODE is not a system error code. */ + * if CODE is not a system error code. */ int gpg_err_code_to_errno (gpg_err_code_t code); - /* Retrieve the error code directly from the ERRNO variable. This - returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped - (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */ + * returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped + * (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */ gpg_err_code_t gpg_err_code_from_syserror (void); /* Set the ERRNO variable. This function is the preferred way to set - ERRNO due to peculiarities on WindowsCE. */ + * ERRNO due to peculiarities on WindowsCE. */ void gpg_err_set_errno (int err); /* Return or check the version. Both functions are identical. */ @@ -1252,7 +1260,9 @@ typedef struct #endif /* GPGRT_ENABLE_ARGPARSE_MACROS */ - +/* Take care: gpgrt_argparse keeps state in ARG and requires that + * either ARGPARSE_FLAG_RESET is used after OPTS has been changed or + * gpgrt_argparse (NULL, ARG, NULL) is called first. */ int gpgrt_argparse (gpgrt_stream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts); void gpgrt_usage (int level); commit e901c9fb04f5a96ba2bd49225b396ce7857a3782 Author: Werner Koch Date: Wed Apr 11 09:10:14 2018 +0200 core: Finalize the API for argparse. * src/gpg-error.h.in (ARGPARSE_end): Simplify. * src/argparse.c (_gpgrt_argparse_internal_s): Add field opts. (deinitialize): Release new field. (initialize): Add arg opts and create a copy of the option list. Add the internal options. (_gpgrt_argparse): Rename arg opts to opts_orig and set new local var opts. Adjust all references to opts. (find_long_option): Adjust for chnaged type of OPTS. Re-indent. (arg_parse): Remove internal option assignment. Rename arg opts to opts_orig and set new local var opts. Adjust all references to opts. (show_help): Adjust all references to opts. -- The old ARGPARSE_end maro was a bit cumbersome and does not allow to chnage the number of internal options. Thus this somewhat larger chnage to keep the internal options out of the API. Note that with this change the internal options now also work in a option file and not just on the command line; that does not make much sense but is probably less surprising. Signed-off-by: Werner Koch diff --git a/src/argparse.c b/src/argparse.c index 00ba68c..2dab2ca 100644 --- a/src/argparse.c +++ b/src/argparse.c @@ -55,6 +55,7 @@ struct _gpgrt_argparse_internal_s void *aliases; const void *cur_alias; void *iio_list; + gpgrt_opt_t **opts; /* Malloced array of pointer to user provided opts. */ }; @@ -83,9 +84,9 @@ static int (*custom_outfnc) (int, const char *); /* Optional handler to map strings. See _gpgrt_set_fixed_string_mapper. */ static const char *(*fixed_string_mapper)(const char*); -static int set_opt_arg(gpgrt_argparse_t *arg, unsigned flags, char *s); -static void show_help(gpgrt_opt_t *opts, unsigned flags); -static void show_version(void); +static int set_opt_arg (gpgrt_argparse_t *arg, unsigned int flags, char *s); +static void show_help (gpgrt_opt_t **opts, unsigned int flags); +static void show_version (void); static int writestrings (int is_error, const char *string, ...) GPGRT_ATTR_SENTINEL(0); static int arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts); @@ -186,8 +187,12 @@ flushstrings (int is_error) static void deinitialize (gpgrt_argparse_t *arg) { - xfree (arg->internal); - arg->internal = NULL; + if (arg->internal) + { + xfree (arg->internal->opts); + xfree (arg->internal); + arg->internal = NULL; + } arg->lineno = 0; arg->err = 0; @@ -203,7 +208,7 @@ my_exit (gpgrt_argparse_t *arg, int code) static gpg_err_code_t -initialize (gpgrt_argparse_t *arg, estream_t fp) +initialize (gpgrt_argparse_t *arg, gpgrt_opt_t *opts, estream_t fp) { if (!arg->internal || (arg->flags & ARGPARSE_FLAG_RESET)) { @@ -214,6 +219,9 @@ initialize (gpgrt_argparse_t *arg, estream_t fp) if (!arg->internal) return _gpg_err_code_from_syserror (); } + else if (arg->internal->opts) + xfree (arg->internal->opts); + arg->internal->opts = NULL; /* Initialize this instance. */ arg->internal->idx = 0; @@ -224,6 +232,7 @@ initialize (gpgrt_argparse_t *arg, estream_t fp) arg->internal->cur_alias = NULL; arg->internal->iio_list = NULL; + /* Clear the copy of the option list. */ /* Clear the error indicator. */ arg->err = 0; @@ -243,6 +252,60 @@ initialize (gpgrt_argparse_t *arg, estream_t fp) } + /* Create an array with pointers to the provided list of options. + * Keeping a copy is useful to sort that array and thus do a binary + * search and to allow for extra space at the end to insert the + * hidden options. An ARGPARSE_FLAG_RESET can be used to reinit + * this array. */ + if (!arg->internal->opts) + { + static gpgrt_opt_t help_opt + = ARGPARSE_s_n (ARGPARSE_SHORTOPT_HELP, "help", "@"); + static gpgrt_opt_t version_opt + = ARGPARSE_s_n (ARGPARSE_SHORTOPT_VERSION, "version", "@"); + static gpgrt_opt_t warranty_opt + = ARGPARSE_s_n (ARGPARSE_SHORTOPT_WARRANTY, "warranty", "@"); + static gpgrt_opt_t dump_options_opt + = ARGPARSE_s_n(ARGPARSE_SHORTOPT_DUMP_OPTIONS, "dump-options", "@"); + static gpgrt_opt_t end_marker + = ARGPARSE_end (); + int seen_help = 0; + int seen_version = 0; + int seen_warranty = 0; + int seen_dump_options = 0; + int i; + + for (i=0; opts[i].short_opt; i++) + { + if (opts[i].long_opt) + { + if (!strcmp(opts[i].long_opt, help_opt.long_opt)) + seen_help = 1; + else if (!strcmp(opts[i].long_opt, version_opt.long_opt)) + seen_version = 1; + else if (!strcmp(opts[i].long_opt, warranty_opt.long_opt)) + seen_warranty = 1; + else if (!strcmp(opts[i].long_opt, dump_options_opt.long_opt)) + seen_dump_options = 1; + } + } + i += 4; /* The number of the above internal options. */ + i++; /* End of list marker. */ + arg->internal->opts = xtrycalloc (i, sizeof *arg->internal->opts); + if (!arg->internal->opts) + return _gpg_err_code_from_syserror (); + for(i=0; opts[i].short_opt; i++) + arg->internal->opts[i] = opts + i; + if (!seen_help) + arg->internal->opts[i++] = &help_opt; + if (!seen_version) + arg->internal->opts[i++] = &version_opt; + if (!seen_warranty) + arg->internal->opts[i++] = &warranty_opt; + if (!seen_dump_options) + arg->internal->opts[i++] = &dump_options_opt; + arg->internal->opts[i] = &end_marker; + } if (arg->err) { @@ -453,10 +516,11 @@ ignore_invalid_option_clear (gpgrt_argparse_t *arg) * Note: Abbreviation of options is here not allowed. */ int -_gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) +_gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts_orig) { + gpgrt_opt_t **opts; int state, i, c; - int idx=0; + int idx = 0; char keyword[100]; char *buffer = NULL; size_t buflen = 0; @@ -464,18 +528,19 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) int unread_buf[3]; /* We use an int so that we can store EOF. */ int unread_buf_count = 0; - if (arg && !opts) + if (arg && !opts_orig) { deinitialize (arg); return 0; } if (!fp) /* Divert to arg_parse() in this case. */ - return arg_parse (arg, opts); + return arg_parse (arg, opts_orig); - if (initialize (arg, fp)) + if (initialize (arg, opts_orig, fp)) return (arg->r_opt = ARGPARSE_OUT_OF_CORE); + opts = arg->internal->opts; /* If the LINENO is zero we assume that we are at the start of a * file and we skip over a possible Byte Order Mark. */ @@ -507,19 +572,19 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) else if (state == 2) { keyword[i] = 0; - for (i=0; opts[i].short_opt; i++ ) + for (i=0; opts[i]->short_opt; i++ ) { - if (opts[i].long_opt && !strcmp (opts[i].long_opt, keyword)) + if (opts[i]->long_opt && !strcmp (opts[i]->long_opt, keyword)) break; } idx = i; - arg->r_opt = opts[idx].short_opt; - if ((opts[idx].flags & ARGPARSE_OPT_IGNORE)) + arg->r_opt = opts[idx]->short_opt; + if ((opts[idx]->flags & ARGPARSE_OPT_IGNORE)) { state = i = 0; continue; } - else if (!opts[idx].short_opt ) + else if (!opts[idx]->short_opt ) { if (!strcmp (keyword, "ignore-invalid-option")) { @@ -533,13 +598,13 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) state = i = 0; continue; } - arg->r_opt = ((opts[idx].flags & ARGPARSE_OPT_COMMAND) + arg->r_opt = ((opts[idx]->flags & ARGPARSE_OPT_COMMAND) ? ARGPARSE_INVALID_COMMAND : ARGPARSE_INVALID_OPTION); } - else if (!(opts[idx].flags & ARGPARSE_TYPE_MASK)) + else if (!(opts[idx]->flags & ARGPARSE_TYPE_MASK)) arg->r_type = 0; /* Does not take an arg. */ - else if ((opts[idx].flags & ARGPARSE_OPT_OPTIONAL) ) + else if ((opts[idx]->flags & ARGPARSE_OPT_OPTIONAL) ) arg->r_type = 0; /* Arg is optional. */ else arg->r_opt = ARGPARSE_MISSING_ARG; @@ -551,9 +616,9 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) /* No argument found. */ if (in_alias) arg->r_opt = ARGPARSE_MISSING_ARG; - else if (!(opts[idx].flags & ARGPARSE_TYPE_MASK)) + else if (!(opts[idx]->flags & ARGPARSE_TYPE_MASK)) arg->r_type = 0; /* Does not take an arg. */ - else if ((opts[idx].flags & ARGPARSE_OPT_OPTIONAL)) + else if ((opts[idx]->flags & ARGPARSE_OPT_OPTIONAL)) arg->r_type = 0; /* No optional argument. */ else arg->r_opt = ARGPARSE_MISSING_ARG; @@ -589,7 +654,7 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) } } } - else if (!(opts[idx].flags & ARGPARSE_TYPE_MASK)) + else if (!(opts[idx]->flags & ARGPARSE_TYPE_MASK)) arg->r_opt = ARGPARSE_UNEXPECTED_ARG; else { @@ -616,7 +681,7 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) if (*p && p[strlen(p)-1] == '\"' ) p[strlen(p)-1] = 0; } - if (!set_opt_arg (arg, opts[idx].flags, p)) + if (!set_opt_arg (arg, opts[idx]->flags, p)) xfree (buffer); else gpgrt_annotate_leaked_object (buffer); @@ -648,16 +713,16 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) { /* Check keyword. */ keyword[i] = 0; - for (i=0; opts[i].short_opt; i++ ) - if (opts[i].long_opt && !strcmp (opts[i].long_opt, keyword)) + for (i=0; opts[i]->short_opt; i++ ) + if (opts[i]->long_opt && !strcmp (opts[i]->long_opt, keyword)) break; idx = i; - arg->r_opt = opts[idx].short_opt; - if ((opts[idx].flags & ARGPARSE_OPT_IGNORE)) + arg->r_opt = opts[idx]->short_opt; + if ((opts[idx]->flags & ARGPARSE_OPT_IGNORE)) { state = 1; /* Process like a comment. */ } - else if (!opts[idx].short_opt) + else if (!opts[idx]->short_opt) { if (!strcmp (keyword, "alias")) { @@ -678,7 +743,7 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) state = 1; /* Process like a comment. */ else { - arg->r_opt = ((opts[idx].flags & ARGPARSE_OPT_COMMAND) + arg->r_opt = ((opts[idx]->flags & ARGPARSE_OPT_COMMAND) ? ARGPARSE_INVALID_COMMAND : ARGPARSE_INVALID_OPTION); state = -1; /* Skip rest of line and leave. */ @@ -759,109 +824,80 @@ _gpgrt_argparse (estream_t fp, gpgrt_argparse_t *arg, gpgrt_opt_t *opts) } - +/* Given the list of options OPTS and a keyword, return the index of + * the long option macthing KEYWORD. On error -1 is retruned for not + * found or -2 for ambigious keyword. */ static int -find_long_option (gpgrt_argparse_t *arg, gpgrt_opt_t *opts, const char *keyword) +find_long_option (gpgrt_argparse_t *arg, gpgrt_opt_t **opts, + const char *keyword) { - int i; - size_t n; - - (void)arg; - - /* Would be better if we can do a binary search, but it is not - possible to reorder our option table because we would mess - up our help strings - What we can do is: Build a nice option - lookup table when this function is first invoked */ - if( !*keyword ) - return -1; - for(i=0; opts[i].short_opt; i++ ) - if( opts[i].long_opt && !strcmp( opts[i].long_opt, keyword) ) - return i; + int i; + size_t n; + + (void)arg; /* Not yet required. */ + + /* Would be better if we can do a binary search, but it is not + * possible to reorder our option table because we would mess up our + * help strings. What we can do is: Build an option lookup table + * when this function is first invoked. */ + if (!*keyword) + return -1; + for (i=0; opts[i]->short_opt; i++ ) + if (opts[i]->long_opt && !strcmp (opts[i]->long_opt, keyword)) + return i; #if 0 - { - ALIAS_DEF a; - /* see whether it is an alias */ - for( a = args->internal->aliases; a; a = a->next ) { - if( !strcmp( a->name, keyword) ) { - /* todo: must parse the alias here */ - args->internal->cur_alias = a; - return -3; /* alias available */ - } - } - } + { + ALIAS_DEF a; + /* see whether it is an alias */ + for (a = args->internal->aliases; a; a = a->next) + { + if (!strcmp( a->name, keyword)) + { + /* todo: must parse the alias here */ + args->internal->cur_alias = a; + return -3; /* alias available */ + } + } + } #endif - /* not found, see whether it is an abbreviation */ - /* aliases may not be abbreviated */ - n = strlen( keyword ); - for(i=0; opts[i].short_opt; i++ ) { - if( opts[i].long_opt && !strncmp( opts[i].long_opt, keyword, n ) ) { - int j; - for(j=i+1; opts[j].short_opt; j++ ) { - if( opts[j].long_opt - && !strncmp( opts[j].long_opt, keyword, n ) - && !(opts[j].short_opt == opts[i].short_opt - && opts[j].flags == opts[i].flags ) ) - return -2; /* abbreviation is ambiguous */ + /* Not found. See whether it is an abbreviation. Aliases may not + * be abbreviated, though. */ + n = strlen (keyword); + for (i=0; opts[i]->short_opt; i++) + { + if (opts[i]->long_opt && !strncmp (opts[i]->long_opt, keyword, n)) + { + int j; + for (j=i+1; opts[j]->short_opt; j++) + { + if (opts[j]->long_opt + && !strncmp (opts[j]->long_opt, keyword, n) + && !(opts[j]->short_opt == opts[i]->short_opt + && opts[j]->flags == opts[i]->flags ) ) + return -2; /* Abbreviation is ambiguous. */ } - return i; + return i; } } - return -1; /* Not found. */ + return -1; /* Not found. */ } +/* The option parser for command line options. */ static int -arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) +arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts_orig) { int idx; + gpgrt_opt_t **opts; int argc; char **argv; char *s, *s2; int i; - /* Fill in missing standard options: help, version, warranty and - * dump-options. */ - gpgrt_opt_t help_opt - = ARGPARSE_s_n (ARGPARSE_SHORTOPT_HELP, "help", "@"); - gpgrt_opt_t version_opt - = ARGPARSE_s_n (ARGPARSE_SHORTOPT_VERSION, "version", "@"); - gpgrt_opt_t warranty_opt - = ARGPARSE_s_n (ARGPARSE_SHORTOPT_WARRANTY, "warranty", "@"); - gpgrt_opt_t dump_options_opt - = ARGPARSE_s_n(ARGPARSE_SHORTOPT_DUMP_OPTIONS, "dump-options", "@"); - int seen_help = 0; - int seen_version = 0; - int seen_warranty = 0; - int seen_dump_options = 0; - - i = 0; - while (opts[i].short_opt) - { - if (opts[i].long_opt) - { - if (!strcmp(opts[i].long_opt, help_opt.long_opt)) - seen_help = 1; - else if (!strcmp(opts[i].long_opt, version_opt.long_opt)) - seen_version = 1; - else if (!strcmp(opts[i].long_opt, warranty_opt.long_opt)) - seen_warranty = 1; - else if (!strcmp(opts[i].long_opt, dump_options_opt.long_opt)) - seen_dump_options = 1; - } - i++; - } - if (! seen_help) - opts[i++] = help_opt; - if (! seen_version) - opts[i++] = version_opt; - if (! seen_warranty) - opts[i++] = warranty_opt; - if (! seen_dump_options) - opts[i++] = dump_options_opt; - - if (initialize( arg, NULL)) + if (initialize (arg, opts_orig, NULL)) return (arg->r_opt = ARGPARSE_OUT_OF_CORE); + opts = arg->internal->opts; argc = *arg->argc; argv = *arg->argv; idx = arg->internal->idx; @@ -917,9 +953,9 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) if ( argpos ) *argpos = '='; - if (i > 0 && opts[i].short_opt == ARGPARSE_SHORTOPT_HELP) + if (i > 0 && opts[i]->short_opt == ARGPARSE_SHORTOPT_HELP) show_help (opts, arg->flags); - else if (i > 0 && opts[i].short_opt == ARGPARSE_SHORTOPT_VERSION) + else if (i > 0 && opts[i]->short_opt == ARGPARSE_SHORTOPT_VERSION) { if (!(arg->flags & ARGPARSE_FLAG_NOVERSION)) { @@ -927,17 +963,17 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) my_exit (arg, 0); } } - else if (i > 0 && opts[i].short_opt == ARGPARSE_SHORTOPT_WARRANTY) + else if (i > 0 && opts[i]->short_opt == ARGPARSE_SHORTOPT_WARRANTY) { writestrings (0, _gpgrt_strusage (16), "\n", NULL); my_exit (arg, 0); } - else if (i > 0 && opts[i].short_opt == ARGPARSE_SHORTOPT_DUMP_OPTIONS) + else if (i > 0 && opts[i]->short_opt == ARGPARSE_SHORTOPT_DUMP_OPTIONS) { - for (i=0; opts[i].short_opt; i++ ) + for (i=0; opts[i]->short_opt; i++ ) { - if (opts[i].long_opt && !(opts[i].flags & ARGPARSE_OPT_IGNORE)) - writestrings (0, "--", opts[i].long_opt, "\n", NULL); + if (opts[i]->long_opt && !(opts[i]->flags & ARGPARSE_OPT_IGNORE)) + writestrings (0, "--", opts[i]->long_opt, "\n", NULL); } my_exit (arg, 0); } @@ -950,10 +986,10 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) arg->r.ret_str = s+2; } else - arg->r_opt = opts[i].short_opt; + arg->r_opt = opts[i]->short_opt; if ( i < 0 ) ; - else if ( (opts[i].flags & ARGPARSE_TYPE_MASK) ) + else if ( (opts[i]->flags & ARGPARSE_TYPE_MASK) ) { if ( argpos ) { @@ -963,7 +999,7 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) } else s2 = argv[1]; - if ( !s2 && (opts[i].flags & ARGPARSE_OPT_OPTIONAL) ) + if ( !s2 && (opts[i]->flags & ARGPARSE_OPT_OPTIONAL) ) { arg->r_type = ARGPARSE_TYPE_NONE; /* Argument is optional. */ } @@ -972,7 +1008,7 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) arg->r_opt = ARGPARSE_MISSING_ARG; } else if ( !argpos && *s2 == '-' - && (opts[i].flags & ARGPARSE_OPT_OPTIONAL) ) + && (opts[i]->flags & ARGPARSE_OPT_OPTIONAL) ) { /* The argument is optional and the next seems to be an option. We do not check this possible option but @@ -981,7 +1017,7 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) } else { - set_opt_arg (arg, opts[i].flags, s2); + set_opt_arg (arg, opts[i]->flags, s2); if ( !argpos ) { argc--; argv++; idx++; /* Skip one. */ @@ -1009,8 +1045,8 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) arg->internal->inarg++; if ( (arg->flags & ARGPARSE_FLAG_ONEDASH) ) { - for (i=0; opts[i].short_opt; i++ ) - if ( opts[i].long_opt && !strcmp (opts[i].long_opt, s+1)) + for (i=0; opts[i]->short_opt; i++ ) + if ( opts[i]->long_opt && !strcmp (opts[i]->long_opt, s+1)) { dash_kludge = 1; break; @@ -1021,33 +1057,33 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) if (!dash_kludge ) { - for (i=0; opts[i].short_opt; i++ ) - if ( opts[i].short_opt == *s ) + for (i=0; opts[i]->short_opt; i++ ) + if ( opts[i]->short_opt == *s ) break; } - if ( !opts[i].short_opt && ( *s == 'h' || *s == '?' ) ) + if ( !opts[i]->short_opt && ( *s == 'h' || *s == '?' ) ) show_help (opts, arg->flags); - arg->r_opt = opts[i].short_opt; - if (!opts[i].short_opt ) + arg->r_opt = opts[i]->short_opt; + if (!opts[i]->short_opt ) { - arg->r_opt = (opts[i].flags & ARGPARSE_OPT_COMMAND)? + arg->r_opt = (opts[i]->flags & ARGPARSE_OPT_COMMAND)? ARGPARSE_INVALID_COMMAND:ARGPARSE_INVALID_OPTION; arg->internal->inarg++; /* Point to the next arg. */ arg->r.ret_str = s; } - else if ( (opts[i].flags & ARGPARSE_TYPE_MASK) ) + else if ( (opts[i]->flags & ARGPARSE_TYPE_MASK) ) { if ( s[1] && !dash_kludge ) { s2 = s+1; - set_opt_arg (arg, opts[i].flags, s2); + set_opt_arg (arg, opts[i]->flags, s2); } else { s2 = argv[1]; - if ( !s2 && (opts[i].flags & ARGPARSE_OPT_OPTIONAL) ) + if ( !s2 && (opts[i]->flags & ARGPARSE_OPT_OPTIONAL) ) { arg->r_type = ARGPARSE_TYPE_NONE; } @@ -1056,7 +1092,7 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) arg->r_opt = ARGPARSE_MISSING_ARG; } else if ( *s2 == '-' && s2[1] - && (opts[i].flags & ARGPARSE_OPT_OPTIONAL) ) + && (opts[i]->flags & ARGPARSE_OPT_OPTIONAL) ) { /* The argument is optional and the next seems to be an option. We do not check this possible @@ -1065,7 +1101,7 @@ arg_parse (gpgrt_argparse_t *arg, gpgrt_opt_t *opts) } else { - set_opt_arg (arg, opts[i].flags, s2); + set_opt_arg (arg, opts[i]->flags, s2); argc--; argv++; idx++; /* Skip one. */ } } @@ -1161,8 +1197,10 @@ set_opt_arg (gpgrt_argparse_t *arg, unsigned flags, char *s) } +/* Return the length of the option O. This needs to consider the + * description as weel as the option name. */ static size_t -long_opt_strlen( gpgrt_opt_t *o ) +long_opt_strlen (gpgrt_opt_t *o) { size_t n = strlen (o->long_opt); @@ -1175,8 +1213,8 @@ long_opt_strlen( gpgrt_opt_t *o ) if ( *s != '=' ) n++; /* For a (mostly) correct length calculation we exclude - continuation bytes (10xxxxxx) if we are on a native utf8 - terminal. */ + * continuation bytes (10xxxxxx) if we are on a native utf8 + * terminal. */ for (; *s && *s != '|'; s++ ) if ( is_utf8 && (*s&0xc0) != 0x80 ) n++; @@ -1197,7 +1235,7 @@ long_opt_strlen( gpgrt_opt_t *o ) * bar and the next one as arguments of the long option. */ static void -show_help (gpgrt_opt_t *opts, unsigned int flags) +show_help (gpgrt_opt_t **opts, unsigned int flags) { const char *s; char tmp[2]; @@ -1214,27 +1252,27 @@ show_help (gpgrt_opt_t *opts, unsigned int flags) } s = _gpgrt_strusage(41); writestrings (0, s, "\n", NULL); - if ( opts[0].description ) + if ( opts[0]->description ) { /* Auto format the option description. */ int i,j, indent; /* Get max. length of long options. */ - for (i=indent=0; opts[i].short_opt; i++ ) + for (i=indent=0; opts[i]->short_opt; i++ ) { - if ( opts[i].long_opt ) - if ( !opts[i].description || *opts[i].description != '@' ) - if ( (j=long_opt_strlen(opts+i)) > indent && j < 35 ) + if ( opts[i]->long_opt ) + if ( !opts[i]->description || *opts[i]->description != '@' ) + if ( (j=long_opt_strlen(opts[i])) > indent && j < 35 ) indent = j; } /* Example: " -v, --verbose Viele Sachen ausgeben" */ indent += 10; - if ( *opts[0].description != '@' ) + if ( *opts[0]->description != '@' ) writestrings (0, "Options:", "\n", NULL); - for (i=0; opts[i].short_opt; i++ ) + for (i=0; opts[i]->short_opt; i++ ) { - s = map_fixed_string (_( opts[i].description )); + s = map_fixed_string (_( opts[i]->description )); if ( s && *s== '@' && !s[1] ) /* Hide this line. */ continue; if ( s && *s == '@' ) /* Unindented comment only line. */ @@ -1258,12 +1296,12 @@ show_help (gpgrt_opt_t *opts, unsigned int flags) } j = 3; - if ( opts[i].short_opt < 256 ) + if ( opts[i]->short_opt < 256 ) { - tmp[0] = opts[i].short_opt; + tmp[0] = opts[i]->short_opt; tmp[1] = 0; writestrings (0, " -", tmp, NULL ); - if ( !opts[i].long_opt ) + if ( !opts[i]->long_opt ) { if (s && *s == '|' ) { @@ -1281,11 +1319,11 @@ show_help (gpgrt_opt_t *opts, unsigned int flags) } else writestrings (0, " ", NULL); - if ( opts[i].long_opt ) + if ( opts[i]->long_opt ) { - tmp[0] = opts[i].short_opt < 256?',':' '; + tmp[0] = opts[i]->short_opt < 256?',':' '; tmp[1] = 0; - j += writestrings (0, tmp, " --", opts[i].long_opt, NULL); + j += writestrings (0, tmp, " --", opts[i]->long_opt, NULL); if (s && *s == '|' ) { if ( *++s != '=' ) diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index a36e8b1..f585808 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -1246,14 +1246,10 @@ typedef struct #define ARGPARSE_group(s,d) \ { (s), NULL, 0, (d) } -/* Placeholder options for help, version, warranty and dump-options. - * See arg_parse(). FIXME: We need to hide this from the API. */ +/* Mark the end of the list (mandatory). */ #define ARGPARSE_end() \ - { 0, NULL, 0, NULL }, \ - { 0, NULL, 0, NULL }, \ - { 0, NULL, 0, NULL }, \ - { 0, NULL, 0, NULL }, \ { 0, NULL, 0, NULL } + #endif /* GPGRT_ENABLE_ARGPARSE_MACROS */ ----------------------------------------------------------------------- Summary of changes: NEWS | 6 +- README | 13 +- configure.ac | 6 +- src/argparse.c | 348 +++++++++++++++++++++++++++++------------------------ src/gpg-error.h.in | 166 +++++++++++++------------ 5 files changed, 293 insertions(+), 246 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 09:52:05 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 11 Apr 2018 09:52:05 +0200 Subject: [git] gnupg-doc - branch, master, updated. 824d1bba2627a14b3e8fe284c4c3fb642a41e329 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 824d1bba2627a14b3e8fe284c4c3fb642a41e329 (commit) from da16bd25fc9461cda562504de4e80cfcf75ecf37 (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 824d1bba2627a14b3e8fe284c4c3fb642a41e329 Author: Werner Koch Date: Wed Apr 11 09:45:10 2018 +0200 swdb: Release libgpg-error 1.29 diff --git a/web/swdb.mac b/web/swdb.mac index 12bc401..4617b87 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -126,11 +126,16 @@ # # LIBGPG-ERROR # -#+macro: libgpg_error_ver 1.28 -#+macro: libgpg_error_date 2018-03-13 -#+macro: libgpg_error_size 842k -#+macro: libgpg_error_sha1 2b9baae264f3e82ebe00dcd10bae3f2d64232c10 -#+macro: libgpg_error_sha2 3edb957744905412f30de3e25da18682cbe509541e18cd3b8f9df695a075da49 +#+macro: libgpg_error_ver 1.29 +#+macro: libgpg_error_date 2018-04-11 +#+macro: libgpg_error_size 873k +#+macro: libgpg_error_sha1 a56241d60bb7d810fdb478463b1732b134a52a19 +#+macro: libgpg_error_sha2 ece926fa5719d17a7ad8da618712cfa2f8a796ab2f2af9d544c5bb093383b1ea +#+macro: gpgrt_ver 1.29 +#+macro: gpgrt_date 2018-04-11 +#+macro: gpgrt_size 873k +#+macro: gpgrt_sha1 a56241d60bb7d810fdb478463b1732b134a52a19 +#+macro: gpgrt_sha2 ece926fa5719d17a7ad8da618712cfa2f8a796ab2f2af9d544c5bb093383b1ea # ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 09:55:31 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 11 Apr 2018 09:55:31 +0200 Subject: [git] gnupg-doc - branch, master, updated. a739fddfe19ab96e9681dd11353bffc52082d9ad 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 a739fddfe19ab96e9681dd11353bffc52082d9ad (commit) from 824d1bba2627a14b3e8fe284c4c3fb642a41e329 (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 a739fddfe19ab96e9681dd11353bffc52082d9ad Author: Werner Koch Date: Wed Apr 11 09:48:36 2018 +0200 web: 2.2.6 release announcement diff --git a/web/index.org b/web/index.org index 695c3ab..ed07c39 100644 --- a/web/index.org +++ b/web/index.org @@ -65,6 +65,11 @@ 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 2.2.5 released (2018-04-09) + +We are pleased to announce the availability of GnuPG version 2.2.6. +This is a maintenance release fixing a few problems. {[[https://lists.gnupg.org/pipermail/gnupg-announce/2018q2/000421.html][more]]} + ** GnuPG 2.2.5 released (2018-02-22) We are pleased to announce the availability of GnuPG version 2.2.5. ----------------------------------------------------------------------- Summary of changes: web/index.org | 5 +++++ 1 file changed, 5 insertions(+) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 10:33:20 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 11 Apr 2018 10:33:20 +0200 Subject: [git] gnupg-doc - branch, master, updated. e033305a5b7c3cc79d35af8f4baff9c1346bb48f 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 e033305a5b7c3cc79d35af8f4baff9c1346bb48f (commit) from a739fddfe19ab96e9681dd11353bffc52082d9ad (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 e033305a5b7c3cc79d35af8f4baff9c1346bb48f Author: Werner Koch Date: Wed Apr 11 10:25:56 2018 +0200 ox-gpgweb: Implement virtual headlines and HTML_CLASS property. This also chnanges how HTML_CONTAINER_CLASS is used. That is not a problem here becuase we are cot yet using that property. With these changes the following markup is possible (example): * Top header :PROPERTIES: :HTML_CLASS: centered :END: **
:html:virtual: ** Foo :PROPERTIES: :HTML_CONTAINER_CLASS: pure-u-1 pure-u-lg-1-3 :END: Foo is about bar. **
:html:virtual: The HTML_CLASS property puts a class="centered" into the tag. The HTML_CONTAINER_CLASS property encloses its section with another div:

Foo

Foo is about bar.

The "html" tag (the "virtual" is right now only informational) inserts the given HTML directly at this place into the output. Note that this can't be done with #+HTML: because that would distrub the sectioning. diff --git a/web/share/ox-gpgweb.el b/web/share/ox-gpgweb.el index a48985c..7d84d1a 100644 --- a/web/share/ox-gpgweb.el +++ b/web/share/ox-gpgweb.el @@ -1222,6 +1222,9 @@ holding contextual information." todo todo-type priority text tags info)) (contents (or contents ""))) (cond + ;; Case 0: virtual headline: Just print the raw value. + ((member "html" (org-export-get-tags headline info)) + (format "%s\n" (org-element-property :raw-value headline))) ;; Case 1: This is a footnote section: ignore it. ((org-element-property :footnote-section-p headline) nil) ;; Case 2: This is a deep sub-tree: export it as a list item. @@ -1247,11 +1250,16 @@ holding contextual information." (org-element-property :ID headline)))) (preferred-id (car ids)) (extra-ids (cdr ids)) - (extra-class (org-element-property :HTML_CONTAINER_CLASS headline)) + (outer-class (org-element-property :HTML_CONTAINER_CLASS headline)) + (header-class (org-element-property :HTML_CLASS headline)) (first-content (car (org-element-contents headline)))) - (format "%s%s\n%s\n" + (format "%s%s%s\n%s%s\n" + ; div class? + (if outer-class (concat "
\n") "") ; h? level + ; header-class? + (if header-class (concat " class=\"" header-class "\"") "") ; id=? preferred-id ; insert anchors @@ -1273,7 +1281,9 @@ holding contextual information." ; /h? level ; the content of the section - contents)))))) + contents + (if outer-class "
" "") + )))))) (defun org-gpgweb-format-headline-function (todo todo-type priority text tags info) ----------------------------------------------------------------------- Summary of changes: web/share/ox-gpgweb.el | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 13:19:00 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 11 Apr 2018 13:19:00 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.0.6-127-g88a3204 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 88a3204d34b97430e7f1f80ebfe1f9f8e6fa9ddc (commit) via dc48589b3d429d7d156c75b4e7bc784b140f40ce (commit) from 7cb3feaf64d3098a5bc56cad62576bb67e5d74bf (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 88a3204d34b97430e7f1f80ebfe1f9f8e6fa9ddc Author: Andre Heinecke Date: Wed Apr 11 13:15:09 2018 +0200 Change S/MIME behavior depending on Exchange ver. * src/oomhelp.cpp, src/oomhelp.h (get_ex_major_version_for_addr): New. * src/cryptcontroller.cpp (create_encrypt_attach): Accept exchange version as parameter. Change behavior accordingly. (CryptController::update_mail_mapi): Add handling for exchange ver. * src/mimemaker.cpp (create_top_encryption_header): Accept exchange ver. * src/mimemaker.h: Update accordingly. -- This fixes 7cb3feaf which broke S/MIME encrypted send for older exchange versions and SMTP / IMAP. Because it unconditionally used different code to construct the encrypted message in the expectation that this would also work as an alternative. GnuPG-Bug-Id: T3884 diff --git a/src/cryptcontroller.cpp b/src/cryptcontroller.cpp index 5aa1022..bc308cb 100644 --- a/src/cryptcontroller.cpp +++ b/src/cryptcontroller.cpp @@ -825,11 +825,12 @@ create_sign_attach (sink_t sink, protocol_t protocol, static int create_encrypt_attach (sink_t sink, protocol_t protocol, - GpgME::Data &encryptedData) + GpgME::Data &encryptedData, + int exchange_major_version) { char boundary[BOUNDARYSIZE+1]; int rc = create_top_encryption_header (sink, protocol, boundary, - false); + false, exchange_major_version); // From here on use goto failure pattern. if (rc) { @@ -838,7 +839,18 @@ create_encrypt_attach (sink_t sink, protocol_t protocol, return rc; } - rc = write_data (sink, encryptedData); + if (protocol == PROTOCOL_OPENPGP || + exchange_major_version >= 15) + { + // With exchange 2016 we have to construct S/MIME + // differently and write the raw data here. + rc = write_data (sink, encryptedData); + } + else + { + const auto encStr = encryptedData.toString(); + rc = write_b64 (sink, encStr.c_str(), encStr.size()); + } if (rc) { @@ -886,12 +898,20 @@ CryptController::update_mail_mapi () sink->cb_data = &m_input; sink->writefnc = sink_data_write; - // For S/MIME encrypted mails we have to use the multipart/encrypted + // For S/MIME encrypted mails we have to use the application/pkcs7-mime // content type. Otherwise newer (2016) exchange servers will throw // an M2MCVT.StorageError.Exeption (See GnuPG-Bug-Id: T3853 ) + + // This means that the conversion / build of the mime structure also + // happens differently. + int exchange_major_version = get_ex_major_version_for_addr ( + m_mail->get_cached_sender ().c_str ()); + std::string overrideMimeTag; - if (m_proto == GpgME::CMS && m_encrypt) + if (m_proto == GpgME::CMS && m_encrypt && exchange_major_version >= 15) { + log_debug ("%s:%s: CMS Encrypt with Exchange %i activating alternative.", + SRCNAME, __func__, exchange_major_version); overrideMimeTag = "application/pkcs7-mime"; } @@ -909,6 +929,7 @@ CryptController::update_mail_mapi () protocol_t protocol = m_proto == GpgME::CMS ? PROTOCOL_SMIME : PROTOCOL_OPENPGP; + int rc = 0; /* Do we have override MIME ? */ const auto overrideMime = m_mail->get_override_mime_data (); @@ -918,11 +939,11 @@ CryptController::update_mail_mapi () } else if (m_sign && m_encrypt) { - rc = create_encrypt_attach (sink, protocol, m_output); + rc = create_encrypt_attach (sink, protocol, m_output, exchange_major_version); } else if (m_encrypt) { - rc = create_encrypt_attach (sink, protocol, m_output); + rc = create_encrypt_attach (sink, protocol, m_output, exchange_major_version); } else if (m_sign) { diff --git a/src/mimemaker.cpp b/src/mimemaker.cpp index ed961f7..1e4a5d6 100644 --- a/src/mimemaker.cpp +++ b/src/mimemaker.cpp @@ -1892,7 +1892,7 @@ sink_encryption_write_b64 (sink_t encsink, const void *data, size_t datalen) function. */ int create_top_encryption_header (sink_t sink, protocol_t protocol, char *boundary, - bool is_inline) + bool is_inline, int exchange_major_version) { int rc; @@ -1915,26 +1915,31 @@ create_top_encryption_header (sink_t sink, protocol_t protocol, char *boundary, else if (protocol == PROTOCOL_SMIME) { *boundary = 0; - rc = 0; - /* - For S/MIME encrypted mails we do not use the S/MIME conversion - code anymore. With Exchange 2016 this no longer works. Instead - we set an override mime tag, the extended headers in OOM in - Mail::update_crypt_oom and let outlook convert the attachment - to base64. - - A bit more details can be found in T3853 / T3884 - - rc = write_multistring (sink, - "Content-Type: application/pkcs7-mime; " - "smime-type=enveloped-data;\r\n" - "\tname=\"smime.p7m\"\r\n" - "Content-Disposition: attachment; filename=\"smime.p7m\"\r\n" - "Content-Transfer-Encoding: base64\r\n" - "MIME-Version: 1.0\r\n" - "\r\n", - NULL); - */ + if (exchange_major_version >= 15) + { + /* + For S/MIME encrypted mails we do not use the S/MIME conversion + code anymore. With Exchange 2016 this no longer works. Instead + we set an override mime tag, the extended headers in OOM in + Mail::update_crypt_oom and let outlook convert the attachment + to base64. + + A bit more details can be found in T3853 / T3884 + */ + rc = 0; + } + else + { + rc = write_multistring (sink, + "Content-Type: application/pkcs7-mime; " + "smime-type=enveloped-data;\r\n" + "\tname=\"smime.p7m\"\r\n" + "Content-Disposition: attachment; filename=\"smime.p7m\"\r\n" + "Content-Transfer-Encoding: base64\r\n" + "MIME-Version: 1.0\r\n" + "\r\n", + NULL); + } } else { diff --git a/src/mimemaker.h b/src/mimemaker.h index 4758bfd..eed47a3 100644 --- a/src/mimemaker.h +++ b/src/mimemaker.h @@ -77,7 +77,7 @@ int add_body_and_attachments (sink_t sink, LPMESSAGE message, mapi_attach_item_t *att_table, Mail *mail, const char *body, int n_att_usable); int create_top_encryption_header (sink_t sink, protocol_t protocol, char *boundary, - bool is_inline = false); + bool is_inline = false, int exchange_major_version = -1); /* Helper to write a boundary to the output sink. The leading LF will be written as well. */ diff --git a/src/oomhelp.cpp b/src/oomhelp.cpp index 51d025b..4ba8715 100644 --- a/src/oomhelp.cpp +++ b/src/oomhelp.cpp @@ -2034,3 +2034,26 @@ get_inline_body () return body; } + +int +get_ex_major_version_for_addr (const char *mbox) +{ + LPDISPATCH account = get_account_for_mail (mbox); + if (!account) + { + TRACEPOINT; + return -1; + } + + char *version_str = get_oom_string (account, "ExchangeMailboxServerVersion"); + gpgol_release (account); + + if (!version_str) + { + return -1; + } + long int version = strtol (version_str, nullptr, 10); + xfree (version_str); + + return (int) version; +} diff --git a/src/oomhelp.h b/src/oomhelp.h index 3bf86a6..13faafb 100644 --- a/src/oomhelp.h +++ b/src/oomhelp.h @@ -343,6 +343,12 @@ char *get_sender_SenderEMailAddress (LPDISPATCH mailitem); /* Get the body of the active inline response */ char *get_inline_body (void); + +/* Get the major version of the exchange server of the account for the + mail address "mbox". Returns -1 if no version could be detected + or exchange is not used.*/ +int get_ex_major_version_for_addr (const char *mbox); + #ifdef __cplusplus char *get_sender_SendUsingAccount (LPDISPATCH mailitem, bool *r_is_GSuite); } commit dc48589b3d429d7d156c75b4e7bc784b140f40ce Author: Andre Heinecke Date: Wed Apr 11 10:13:33 2018 +0200 Handle weirdly constructed PGP/MIME mails * src/mapihelp.cpp (get_msgcls_from_pgp_lines): Add return value for empty body. (get_msgcls_from_first_attachment): New. factored out. (change_message_class_ipm_note): Use get_msgcls_from_first_attachment. -- This fixes the handling of mails that are: multipart/mixed ->application/pgp-encrypted ->application/octed-stream They also don't have a body. To avoid overhead in a normal unencrypted multipart mixed mail we only check for this structure if we don't have a body. GnuPG-Bug-Id: T3882 diff --git a/src/mapihelp.cpp b/src/mapihelp.cpp index 7e33823..1be66b6 100644 --- a/src/mapihelp.cpp +++ b/src/mapihelp.cpp @@ -630,9 +630,12 @@ mapi_get_body (LPMESSAGE message, size_t *r_nbytes) /* Look at the body of the MESSAGE and try to figure out whether this is a supported PGP message. Returns the new message class or NULL - if it does not look like a PGP message. */ + if it does not look like a PGP message. + + If r_nobody is not null it is set to true if no body was found. + */ static char * -get_msgcls_from_pgp_lines (LPMESSAGE message) +get_msgcls_from_pgp_lines (LPMESSAGE message, bool *r_nobody = nullptr) { HRESULT hr; LPSTREAM stream; @@ -649,6 +652,11 @@ get_msgcls_from_pgp_lines (LPMESSAGE message) return NULL; } + if (r_nobody) + { + *r_nobody = false; + } + stream = mapi_get_body_as_stream (message); if (!stream) { @@ -660,6 +668,10 @@ get_msgcls_from_pgp_lines (LPMESSAGE message) { log_error ("%s:%s: Failed to get w_body stream. : hr=%#lx", SRCNAME, __func__, hr); + if (r_nobody) + { + *r_nobody = true; + } return NULL; } else @@ -979,6 +991,30 @@ get_first_attach_mime_tag (LPMESSAGE message) } +/* Look at the first attachment's content type to determine the + messageclass. */ +static char * +get_msgcls_from_first_attachment (LPMESSAGE message) +{ + char *ret = nullptr; + char *attach_mime = get_first_attach_mime_tag (message); + if (!attach_mime) + { + return nullptr; + } + if (!strcmp (attach_mime, "application/pgp-encrypted")) + { + ret = xstrdup ("IPM.Note.GpgOL.MultipartEncrypted"); + xfree (attach_mime); + } + else if (!strcmp (attach_mime, "application/pgp-signature")) + { + ret = xstrdup ("IPM.Note.GpgOL.MultipartSigned"); + xfree (attach_mime); + } + return ret; +} + /* Helper for mapi_change_message_class. Returns the new message class as an allocated string. @@ -1022,22 +1058,7 @@ change_message_class_ipm_note (LPMESSAGE message) if (!newvalue) { /* So no PGP Inline. Lets look at the attachment. */ - char *attach_mime = get_first_attach_mime_tag (message); - if (!attach_mime) - { - xfree (ct); - return nullptr; - } - if (!strcmp (attach_mime, "application/pgp-encrypted")) - { - newvalue = xstrdup ("IPM.Note.GpgOL.MultipartEncrypted"); - xfree (attach_mime); - } - else if (!strcmp (attach_mime, "application/pgp-signature")) - { - newvalue = xstrdup ("IPM.Note.GpgOL.MultipartSigned"); - xfree (attach_mime); - } + newvalue = get_msgcls_from_first_attachment (message); } } else if (!ct || !strcmp (ct, "text/plain") || @@ -1046,10 +1067,21 @@ change_message_class_ipm_note (LPMESSAGE message) !strcmp (ct, "multipart/related") || !strcmp (ct, "text/html")) { + bool has_no_body = false; /* It is quite common to have a multipart/mixed or alternative mail with separate encrypted PGP parts. Look at the body to decide. */ - newvalue = get_msgcls_from_pgp_lines (message); + newvalue = get_msgcls_from_pgp_lines (message, &has_no_body); + + if (!newvalue && has_no_body && !strcmp (ct, "multipart/mixed")) + { + /* This is uncommon. But some Exchanges might break a PGP/MIME mail + this way. Let's take a look at the attachments. Maybe it's + a PGP/MIME mail. */ + log_debug ("%s:%s: Multipart mixed without body found. Looking at attachments.", + SRCNAME, __func__); + newvalue = get_msgcls_from_first_attachment (message); + } } xfree (ct); ----------------------------------------------------------------------- Summary of changes: src/cryptcontroller.cpp | 35 ++++++++++++++++++++----- src/mapihelp.cpp | 70 +++++++++++++++++++++++++++++++++++-------------- src/mimemaker.cpp | 47 ++++++++++++++++++--------------- src/mimemaker.h | 2 +- src/oomhelp.cpp | 23 ++++++++++++++++ src/oomhelp.h | 6 +++++ 6 files changed, 135 insertions(+), 48 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 15:25:29 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 11 Apr 2018 15:25:29 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.0.6-128-g34f6bb7 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 34f6bb73882ee5a9c996db506fb4f730aa57e658 (commit) from 88a3204d34b97430e7f1f80ebfe1f9f8e6fa9ddc (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 34f6bb73882ee5a9c996db506fb4f730aa57e658 Author: Andre Heinecke Date: Wed Apr 11 15:22:05 2018 +0200 Implement send again for crypto mails * src/mail.cpp (Mail::set_is_send_again): New. (Mail::parsing_done): Add handling for send again. * src/mailitem-events.cpp: Detect a send again. -- This detects the send again by the propchange of SendUsingAccount and a "sent" value of false. Usually crypto mails have a sent value of true. In this case we remove our attachments (so that they are not included in the sent again), set the draft info so that the crypto state is nicely preselected and finally change the type so that is_crypo_mail returns false for decrypted send again mails. GnuPG-Bug-Id: T3885 diff --git a/src/mail.cpp b/src/mail.cpp index ea2f65a..a408800 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -93,7 +93,8 @@ Mail::Mail (LPDISPATCH mailitem) : m_crypt_state(NoCryptMail), m_window(nullptr), m_async_crypt_disabled(false), - m_is_forwarded_crypto_mail(false) + m_is_forwarded_crypto_mail(false), + m_is_send_again(false) { if (get_mail_for_item (mailitem)) { @@ -1143,7 +1144,7 @@ Mail::parsing_done() } update_sigstate (); - m_needs_wipe = true; + m_needs_wipe = !m_is_send_again; TRACEPOINT; /* Set categories according to the result. */ @@ -1164,6 +1165,26 @@ Mail::parsing_done() SRCNAME, __func__); } + if (m_is_send_again) + { + log_debug ("%s:%s: I think that this is the send again of a crypto mail.", + SRCNAME, __func__); + + /* We no longer want to be treated like a crypto mail. */ + m_type = MSGTYPE_UNKNOWN; + LPMESSAGE msg = get_oom_base_message (m_mailitem); + if (!msg) + { + TRACEPOINT; + } + else + { + set_gpgol_draft_info_flags (msg, m_crypto_flags); + gpgol_release (msg); + } + remove_our_attachments (); + } + log_debug ("%s:%s: Delayed invalidate to update sigstate.", SRCNAME, __func__); CloseHandle(CreateThread (NULL, 0, delayed_invalidate_ui, (LPVOID) this, 0, diff --git a/src/mail.h b/src/mail.h index d267d8b..ee108a2 100644 --- a/src/mail.h +++ b/src/mail.h @@ -473,6 +473,14 @@ public: bool has_crypted_or_empty_body (); void update_body (); + + /** Set if this mail looks like the send again of a crypto mail. + This will mean that after it is decrypted it is treated + like an unencrypted mail so that it can be encrypted again + or sent unencrypted. + */ + void set_is_send_again (bool value) { m_is_send_again = value; } + private: void update_categories (); void update_sigstate (); @@ -513,5 +521,6 @@ private: bool m_async_crypt_disabled; std::string m_mime_data; bool m_is_forwarded_crypto_mail; /* Is this a forward of a crypto mail */ + bool m_is_send_again; /* Is this a send again of a crypto mail */ }; #endif // MAIL_H diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp index ec6d6cc..f63665c 100644 --- a/src/mailitem-events.cpp +++ b/src/mailitem-events.cpp @@ -269,6 +269,21 @@ EVENT_SINK_INVOKE(MailItemEvents) log_oom ("%s:%s: Message %p propchange: %ls.", SRCNAME, __func__, m_object, prop_name); + if (!wcscmp (prop_name, L"SendUsingAccount")) + { + bool sent = get_oom_bool (m_object, "Sent"); + if (sent) + { + log_debug ("%s:%s: Ignoring SendUsingAccount change for sent %p ", + SRCNAME, __func__, m_object); + return S_OK; + } + log_debug ("%s:%s: Message %p looks like send again.", + SRCNAME, __func__, m_object); + m_mail->set_is_send_again (true); + return S_OK; + } + /* We have tried several scenarios to handle propery changes. Only save the property in MAPI and call MAPI SaveChanges worked and did not leak plaintext but this caused outlook ----------------------------------------------------------------------- Summary of changes: src/mail.cpp | 25 +++++++++++++++++++++++-- src/mail.h | 9 +++++++++ src/mailitem-events.cpp | 15 +++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 16:15:54 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Wed, 11 Apr 2018 16:15:54 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.0.6-132-gd13de35 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 d13de350caa214e97ac18066ba9cdb8caef64ed8 (commit) via 17b513433ba0e0d0bda5f3b24d310a923c993759 (commit) via d3a220f060cd670e707a511fd577309e418521eb (commit) via 49d53c7dfdc188427635a0515ef01e17f753b2a9 (commit) from 34f6bb73882ee5a9c996db506fb4f730aa57e658 (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 d13de350caa214e97ac18066ba9cdb8caef64ed8 Author: Andre Heinecke Date: Wed Apr 11 16:14:44 2018 +0200 Show warning if attachment of crypt mail removed * src/mailitem-events.cpp (EVENT_SINK_INVOKE): Handle AttachmentRemove event and show warning if an attachment is removed from a crypto mail. -- GnuPG-Bug-Id: T3886 diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp index 7dec4c4..e73e0ee 100644 --- a/src/mailitem-events.cpp +++ b/src/mailitem-events.cpp @@ -103,6 +103,7 @@ MailItemEvents::~MailItemEvents() } static bool propchangeWarnShown = false; +static bool attachRemoveWarnShown = false; static DWORD WINAPI do_delayed_locate (LPVOID arg) @@ -787,6 +788,21 @@ EVENT_SINK_INVOKE(MailItemEvents) gpgol_release (msg); break; } + case AttachmentRemove: + { + log_oom_extra ("%s:%s: AttachmentRemove: %p", + SRCNAME, __func__, m_mail); + if (!m_mail->is_crypto_mail () || attachRemoveWarnShown) + { + return S_OK; + } + gpgol_message_box (get_active_hwnd (), + _("Attachments are part of the crypto message.\nThey " + "can't be permanently removed and will be shown again the next " + "time this message is opened."), + _("Sorry, that's not possible, yet"), MB_OK); + attachRemoveWarnShown = true; + } default: log_oom_extra ("%s:%s: Message:%p Unhandled Event: %lx \n", commit 17b513433ba0e0d0bda5f3b24d310a923c993759 Author: Andre Heinecke Date: Wed Apr 11 16:14:16 2018 +0200 Ignore received time propchange * src/mailitem-events.cpp (prop_blacklist): Add ReceivedTime to blacklist. diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp index f63665c..7dec4c4 100644 --- a/src/mailitem-events.cpp +++ b/src/mailitem-events.cpp @@ -44,6 +44,7 @@ const wchar_t *prop_blacklist[] = { L"UnRead", L"OutlookVersion", L"OutlookInternalVersion", + L"ReceivedTime", NULL }; typedef enum commit d3a220f060cd670e707a511fd577309e418521eb Author: Andre Heinecke Date: Wed Apr 11 16:12:49 2018 +0200 Fix early deletion of temporary attachments * src/mail.cpp (add_attachments): Close handle before deletion. -- This fixes the problem that as long as Outlook is open the temporary files stick around and are not removed. Which in turn leads to numbers added to the attachments. GnuPG-Bug-Id: T3886 diff --git a/src/mail.cpp b/src/mail.cpp index a408800..2abff2a 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -632,6 +632,7 @@ add_attachments(LPDISPATCH mail, SRCNAME, __func__, att->get_display_name().c_str()); err = 1; } + CloseHandle (hFile); if (!DeleteFileW (wchar_file)) { log_error ("%s:%s: Failed to delete tmp attachment for: %s", commit 49d53c7dfdc188427635a0515ef01e17f753b2a9 Author: Andre Heinecke Date: Wed Apr 11 16:11:31 2018 +0200 Fix spelling in german propchange warning * po/de.po: Fix german propchange warning. -- GnuPG-Bug-Id: T3884 diff --git a/po/de.po b/po/de.po index 9d29005..f8b9ebb 100644 --- a/po/de.po +++ b/po/de.po @@ -759,15 +759,15 @@ msgid "" "\n" "For example by right clicking but not selecting the message.\n" msgstr "" -"GpgOL hat eine ?nderung an der \"%s\" Eigenschaft verhindern.\n" -"?nderungen an Eigenschaften werden noch nicht f?r Krypto Nachrichten " +"GpgOL hat eine ?nderung an der \"%s\" Eigenschaft verhindert.\n" +"?nderungen an Eigenschaften werden noch nicht f?r Krypto-Nachrichten " "unterst?tzt.\n" "\n" -"Um dieses Problem zu umgehen ?ndern Sie bitte die Eigenschaft zu einem " -"Zeitpunkt wenn die Nachricht in keinem Fenster ge?ffnet ist und nicht in der " +"Um dieses Problem zu umgehen, ?ndern Sie bitte die Eigenschaft wenn " +"die Nachricht in keinem Fenster ge?ffnet ist und nicht in der " "Nachrichtenliste ausgew?hlt ist.\n" "\n" -"Beispielsweise durch einen Rechtsklick auf die Nachricht wenn diese nicht " +"Beispielsweise durch einen Rechtsklick auf die Nachricht, wenn diese nicht " "ausgew?hlt ist.\n" #: src/main.c:466 ----------------------------------------------------------------------- Summary of changes: po/de.po | 10 +++++----- src/mail.cpp | 1 + src/mailitem-events.cpp | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 20:43:01 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 11 Apr 2018 20:43:01 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-5-g789d240 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 789d240cb40ab36406a7c57ad49897e0bafbb41e (commit) from 9f69dbeb902ac447adbc92937cd451c4e909f234 (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 789d240cb40ab36406a7c57ad49897e0bafbb41e Author: Werner Koch Date: Wed Apr 11 20:35:40 2018 +0200 gpg: New option --no-symkey-cache. * g10/gpg.c (oNoSymkeyCache): New. (opts): Add that option. (main): Set var. * g10/options.h (struct opt): New field no_symkey_cache. * g10/passphrase.c (passphrase_to_dek): Implement that feature. Signed-off-by: Werner Koch diff --git a/NEWS b/NEWS index 8b9d2bc..403c2a0 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ Noteworthy changes in version 2.2.7 (unreleased) ------------------------------------------------ + * gpg: New option --no-symkey-cache to disable the passphrase cache + for symmetrical en- and decryption. + Noteworthy changes in version 2.2.6 (2018-04-09) ------------------------------------------------ diff --git a/doc/gpg.texi b/doc/gpg.texi index 086b4fc..908af7b 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -214,7 +214,10 @@ symmetric cipher used is @value{GPGSYMENCALGO}, but may be chosen with the @option{--encrypt} (for a message that may be decrypted via a secret key or a passphrase), or @option{--sign} and @option{--encrypt} together (for a signed message that may be decrypted via a secret key or a -passphrase). +passphrase). @command{@gpgname} caches the passphrase used for +symmetric encryption so that a decrypt operation may not require that +the user needs to enter the passphrase. The option + at option{--no-symkey-cache} can be used to disable this feature. @item --store @opindex store @@ -3140,6 +3143,12 @@ are: Pinentry the user is not prompted again if he enters a bad password. @end table + at item --no-symkey-cache + at opindex no-symkey-cache +Disable the passphrase cache used for symmetrical en- and decryption. +This cache is based on the message specific salt value +(cf. @option{--s2k-mode}). + @item --request-origin @var{origin} @opindex request-origin Tell gpg to assume that the operation ultimately originated at diff --git a/g10/gpg.c b/g10/gpg.c index 2c93a83..fbbdd92 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -423,6 +423,7 @@ enum cmd_and_opt_values oSender, oKeyOrigin, oRequestOrigin, + oNoSymkeyCache, oNoop }; @@ -888,6 +889,7 @@ static ARGPARSE_OPTS opts[] = { ARGPARSE_s_s (oAutoKeyLocate, "auto-key-locate", "@"), ARGPARSE_s_n (oNoAutoKeyLocate, "no-auto-key-locate", "@"), ARGPARSE_s_n (oNoAutostart, "no-autostart", "@"), + ARGPARSE_s_n (oNoSymkeyCache, "no-symkey-cache", "@"), /* Dummy options with warnings. */ ARGPARSE_s_n (oUseAgent, "use-agent", "@"), @@ -3556,6 +3558,7 @@ main (int argc, char **argv) break; case oNoAutostart: opt.autostart = 0; break; + case oNoSymkeyCache: opt.no_symkey_cache = 1; break; case oDefaultNewKeyAlgo: opt.def_new_key_algo = pargs.r.ret_str; diff --git a/g10/options.h b/g10/options.h index e1bf97f..96b76f8 100644 --- a/g10/options.h +++ b/g10/options.h @@ -242,7 +242,7 @@ struct unsigned int allow_weak_digest_algos:1; unsigned int large_rsa:1; unsigned int disable_signer_uid:1; - /* Flag to enbale experimental features from RFC4880bis. */ + /* Flag to enable experimental features from RFC4880bis. */ unsigned int rfc4880bis:1; } flags; @@ -275,6 +275,8 @@ struct int unwrap_encryption; int only_sign_text_ids; + + int no_symkey_cache; /* Disable the cache used for --symmetric. */ } opt; /* CTRL is used to keep some global variables we currently can't diff --git a/g10/passphrase.c b/g10/passphrase.c index a498f62..ffdcdf2 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -317,6 +317,9 @@ passphrase_to_dek (int cipher_algo, STRING2KEY *s2k, canceled = &dummy_canceled; *canceled = 0; + if (opt.no_symkey_cache) + nocache = 1; /* Force no symmtric key caching. */ + if ( !s2k ) { log_assert (create && !nocache); ----------------------------------------------------------------------- Summary of changes: NEWS | 3 +++ doc/gpg.texi | 11 ++++++++++- g10/gpg.c | 3 +++ g10/options.h | 4 +++- g10/passphrase.c | 3 +++ 5 files changed, 22 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 11 21:01:50 2018 From: cvs at cvs.gnupg.org (by Damien Goutte-Gattat via Gnupg-devel) Date: Wed, 11 Apr 2018 21:01:50 +0200 Subject: [git] GPG-ERROR - branch, master, updated. gpgrt-1.29-2-g8ef76d9 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 8ef76d9373db16f1ca176f9c87c8dac2758c8b85 (commit) from 253ca177055e23617b14e0934b09ef50253f29eb (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 8ef76d9373db16f1ca176f9c87c8dac2758c8b85 Author: Damien Goutte-Gattat via Gnupg-devel Date: Wed Apr 11 16:06:01 2018 +0100 build: Make sure version.texi is generated in time. [[PGP Signed Part:Good signature from AA4373E6C82C78AD Damien Goutte-Gattat (trust undefined) created at 2018-04-11T17:05:27+0200 using RSA]] [1. text/plain] * doc/Makefile.am (yat2m-stamp): Depend on version.texi. -- When building from a cloned Git repository and with `make -j 3` (or higher), the version.texi file may not have been generated yet when yat2m is called to generate the man page, resulting in a build failure. Signed-off-by: Damien Goutte-Gattat diff --git a/doc/Makefile.am b/doc/Makefile.am index d5eb886..7439a49 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -54,7 +54,7 @@ YAT2M_DEP = yat2m endif endif -yat2m-stamp: $(myman_sources) +yat2m-stamp: $(myman_sources) $(srcdir)/version.texi @rm -f yat2m-stamp.tmp @touch yat2m-stamp.tmp for file in $(myman_sources) ; do \ ----------------------------------------------------------------------- Summary of changes: doc/Makefile.am | 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 Thu Apr 12 02:44:59 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 12 Apr 2018 02:44:59 +0200 Subject: [git] GPG-ERROR - branch, master, updated. gpgrt-1.29-3-ge357490 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 e35749023ca68de6f1f85d3072f7b36fd6f6fe7c (commit) from 8ef76d9373db16f1ca176f9c87c8dac2758c8b85 (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 e35749023ca68de6f1f85d3072f7b36fd6f6fe7c Author: NIIBE Yutaka Date: Thu Apr 12 09:40:19 2018 +0900 build: Check -lsocket -lnsl for Solaris. * configure.ac: Check inet_addr for -lnsl, and socket for -lsocket. -- Once I used LIB_SOCKET_NSL for the variable name, but it is already used by AX_LIB_SOCKET_NSL in autoconf-archive as an alias of the macro. So, I changed the variable name. GnuPG-bug-id: 3869 Signed-off-by: NIIBE Yutaka diff --git a/configure.ac b/configure.ac index e1f8858..2026128 100644 --- a/configure.ac +++ b/configure.ac @@ -462,6 +462,20 @@ AC_SEARCH_LIBS([sched_yield], [rt posix4], config_libs="$config_libs $LIB_SCHED_YIELD" fi]) +LIB_NETWORK= +AC_SUBST([LIB_NETWORK]) +AC_SEARCH_LIBS([inet_addr], [nsl], + [if test "$ac_cv_search_inet_addr" != "none required"; then + LIB_NETWORK=$ac_cv_search_inet_addr + fi]) +AC_SEARCH_LIBS([socket], [socket], + [if test "$ac_cv_search_socket" != "none required"; then + LIB_NETWORK="$ac_cv_search_socket $LIB_NETWORK" + fi], [], [$LIB_NETWORK]) +if test "x$LIB_NETWORK" != x; then + config_libs="$config_libs $LIB_NETWORK" +fi + # Check for optional readline support GNUPG_CHECK_READLINE ----------------------------------------------------------------------- Summary of changes: configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 03:53:05 2018 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 12 Apr 2018 03:53:05 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-6-gbb2680a 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 bb2680a45ab27427d33861802617211052242a33 (commit) from 789d240cb40ab36406a7c57ad49897e0bafbb41e (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 bb2680a45ab27427d33861802617211052242a33 Author: NIIBE Yutaka Date: Thu Apr 12 10:52:51 2018 +0900 po: Update Japanese translation. -- Signed-off-by: NIIBE Yutaka diff --git a/po/ja.po b/po/ja.po index 4920e4e..d805066 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,13 +4,13 @@ # IIDA Yosiaki , 1999, 2000, 2002, 2003, 2004. # Yoshihiro Kajiki , 1999. # Takashi P.KATOH, 2002. -# NIIBE Yutaka , 2013, 2014, 2015, 2016, 2017. +# NIIBE Yutaka , 2013, 2014, 2015, 2016, 2017, 2018. # msgid "" msgstr "" "Project-Id-Version: gnupg 2.2.6\n" "Report-Msgid-Bugs-To: translations at gnupg.org\n" -"PO-Revision-Date: 2018-03-30 19:31+0900\n" +"PO-Revision-Date: 2018-04-12 10:51+0900\n" "Last-Translator: NIIBE Yutaka \n" "Language-Team: none\n" "Language: ja\n" @@ -278,7 +278,7 @@ msgstr "" "???????" msgid "Warning: You have entered an insecure passphrase." -msgstr "*??*: ???????????????????????" +msgstr "??: ???????????????????????" #, c-format msgid "Please enter the passphrase to%0Aprotect your new key" @@ -397,7 +397,7 @@ msgstr "???????????????????????? #, c-format msgid "Note: no default option file '%s'\n" -msgstr "*??*: ???????????????? '%s' ??????\n" +msgstr "??: ???????????????? '%s' ??????\n" #, c-format msgid "option file '%s': %s\n" @@ -409,7 +409,7 @@ msgstr "'%s' ??????????????\n" #, c-format msgid "Note: '%s' is not considered an option\n" -msgstr "*??*: '%s'???????????????\n" +msgstr "??: '%s'???????????????\n" #, c-format msgid "can't create socket: %s\n" @@ -626,7 +626,7 @@ msgstr "??" #, c-format msgid "Note: This passphrase has never been changed.%0APlease change it now." -msgstr "*??*: ?????????????????%0A???????????" +msgstr "??: ?????????????????%0A???????????" #, c-format msgid "" @@ -1195,12 +1195,12 @@ msgstr "*??*: %s\n" msgid "Note: Outdated servers may lack important security fixes.\n" msgstr "" -"*??*: ????????????????????????????????" +"??: ????????????????????????????????" "??\n" #, c-format msgid "Note: Use the command \"%s\" to restart them.\n" -msgstr "*??*: \"%s\"??????????????????\n" +msgstr "??: \"%s\"??????????????????\n" #, c-format msgid "%s is not compliant with %s mode\n" @@ -1320,9 +1320,9 @@ msgid "" " If the key generation does not succeed, please check the\n" " documentation of your card to see what sizes are allowed.\n" msgstr "" -"*??*: ????????????????????????????????\n" -" ????????????????????????????????\n" -" ??????????????????\n" +"??: ????????????????????????????????\n" +" ????????????????????????????????\n" +" ??????????????????\n" #, c-format msgid "What keysize do you want? (%u) " @@ -1364,12 +1364,12 @@ msgstr "????????\n" #, c-format msgid "The card will now be re-configured to generate a key of %u bits\n" -msgstr "??%u????????????????????????????\n" +msgstr "???????%u???????????????????????\n" #, c-format msgid "The card will now be re-configured to generate a key of type: %s\n" msgstr "" -"???????????????????????????????????: %s\n" +"??????????????????????????????????: %s\n" #, c-format msgid "error changing key attribute for key %d: %s\n" @@ -1377,7 +1377,7 @@ msgstr "?%d?????????????: %s\n" #, c-format msgid "error getting card info: %s\n" -msgstr "?????????: %s\n" +msgstr "???????????: %s\n" msgid "This command is not supported by this card\n" msgstr "???????????????????????????\n" @@ -1386,7 +1386,7 @@ msgid "Make off-card backup of encryption key? (Y/n) " msgstr "??????????????????????? (Y/n) " msgid "Note: keys are already stored on the card!\n" -msgstr "*??*: ??????????????????!\n" +msgstr "??: ??????????????????!\n" msgid "Replace existing keys? (y/N) " msgstr "????????????? (y/N) " @@ -1421,7 +1421,7 @@ msgid "KEYTOCARD failed: %s\n" msgstr "KEYTOCARD???????: %s\n" msgid "Note: This command destroys all keys stored on the card!\n" -msgstr "*??*: ????????????????????????????!\n" +msgstr "??: ????????????????????????????!\n" msgid "Continue? (y/N) " msgstr "?????? (y/N) " @@ -1555,7 +1555,7 @@ msgstr "???????????????\n" #, c-format msgid "there is a secret key for public key \"%s\"!\n" -msgstr "?????????????\"%s\"?????!\n" +msgstr "????????????\"%s\"?????!\n" msgid "use option \"--delete-secret-keys\" to delete it first.\n" msgstr "??\"--delete-secret-keys\"??????????????????\n" @@ -2091,11 +2091,11 @@ msgstr "(????????\"help\"????????)\n" #, c-format msgid "Note: old default options file '%s' ignored\n" -msgstr "*??*: ????????????????????'%s'????????\n" +msgstr "??: ????????????????????'%s'????????\n" #, c-format msgid "Note: %s is not for normal use!\n" -msgstr "*??*: ??%s??????!\n" +msgstr "??: ??%s??????!\n" #, c-format msgid "'%s' is not a valid signature expiration\n" @@ -2250,7 +2250,7 @@ msgid "invalid min-cert-level; must be 1, 2, or 3\n" msgstr "???min-cert-level?0?1?2?3??????????\n" msgid "Note: simple S2K mode (0) is strongly discouraged\n" -msgstr "*??*: ???S2K???(0)????????????\n" +msgstr "??: ???S2K???(0)????????????\n" msgid "invalid S2K mode; must be 0, 1 or 3\n" msgstr "???S2K????0?1?3??????????\n" @@ -2350,7 +2350,7 @@ msgstr "'%s'?????ID, ??????????keygrip???? msgid "WARNING: no command supplied. Trying to guess what you mean ...\n" msgstr "" -"??: ???????????????????????????????? ...\n" +"*??*: ???????????????????????????????? ...\n" msgid "Go ahead and type your message ...\n" msgstr "??????????????????? ...\n" @@ -2868,7 +2868,7 @@ msgid "" "The self-signature on \"%s\"\n" "is a PGP 2.x-style signature.\n" msgstr "" -"\"%s\"???????????\n" +"\"%s\"??????????\n" "PGP 2.x????????\n" msgid "Do you want to promote it to an OpenPGP self-signature? (y/N) " @@ -2890,7 +2890,7 @@ msgid "" "Your current signature on \"%s\"\n" "is a local signature.\n" msgstr "" -"\"%s\"?????????????\n" +"\"%s\"????????????\n" "???????????\n" msgid "Do you want to promote it to a full exportable signature? (y/N) " @@ -3467,15 +3467,11 @@ msgstr "??????????????\n" msgid "You can't change the expiration date of a v3 key\n" msgstr "v3??????????????\n" -#, fuzzy -#| msgid "Changing expiration time for a subkey.\n" msgid "Changing usage of a subkey.\n" -msgstr "??????????????\n" +msgstr "?????????????\n" -#, fuzzy -#| msgid "Changing expiration time for the primary key.\n" msgid "Changing usage of the primary key.\n" -msgstr "??????????????\n" +msgstr "?????????????\n" #, c-format msgid "signing subkey %s is already cross-certified\n" @@ -3982,7 +3978,7 @@ msgstr "???????????'%s'????????: %s\n" #, c-format msgid "Note: backup of card key saved to '%s'\n" -msgstr "*??*: ????????????'%s'???????\n" +msgstr "??: ????????????'%s'???????\n" #, c-format msgid "writing public key to '%s'\n" @@ -4017,7 +4013,7 @@ msgid "" msgstr "??%lu????????? (??????????????)\n" msgid "Note: creating subkeys for v3 keys is not OpenPGP compliant\n" -msgstr "*??*: v3????????????OpenPGP???????\n" +msgstr "??: v3????????????OpenPGP???????\n" msgid "Secret parts of primary key are not available.\n" msgstr "????????????????\n" @@ -4069,7 +4065,7 @@ msgstr[0] "??????%d???????????\n" #, c-format msgid "Warning: %lu key skipped due to its large size\n" msgid_plural "Warning: %lu keys skipped due to their large sizes\n" -msgstr[0] "*??*: %lu?????????????????????\n" +msgstr[0] "??: %lu?????????????????????\n" msgid "Keyring" msgstr "????" @@ -4262,7 +4258,7 @@ msgid "decryption failed: %s\n" msgstr "?????????: %s\n" msgid "Note: sender requested \"for-your-eyes-only\"\n" -msgstr "*??*: ????\"?????\"?????????\n" +msgstr "??: ????\"?????\"?????????\n" #, c-format msgid "original file name='%.*s'\n" @@ -4401,7 +4397,7 @@ msgstr "*??*: ????????????? %s ?????? #, c-format msgid "Note: signatures using the %s algorithm are rejected\n" -msgstr "*??*: ?????? %s ??????????????\n" +msgstr "??: ?????? %s ??????????????\n" #, c-format msgid "(reported error: %s)\n" @@ -4725,15 +4721,15 @@ msgid "WARNING: This subkey has been revoked by its owner!\n" msgstr "*??*: ????????????????????!\n" msgid "Note: This key has been disabled.\n" -msgstr "*??*: ??????????????????\n" +msgstr "??: ??????????????????\n" #, c-format msgid "Note: Verified signer's address is '%s'\n" -msgstr "*??*: ??????????????'%s'??\n" +msgstr "??: ??????????????'%s'??\n" #, c-format msgid "Note: Signer's address '%s' does not match DNS entry\n" -msgstr "*??*: ????????'%s'?DNS????????????\n" +msgstr "??: ????????'%s'?DNS????????????\n" msgid "trustlevel adjusted to FULL due to valid PKA info\n" msgstr "PKA???????????????FULL????????\n" @@ -4742,7 +4738,7 @@ msgid "trustlevel adjusted to NEVER due to bad PKA info\n" msgstr "PKA???????????????NEVER????????\n" msgid "Note: This key has expired!\n" -msgstr "*??*: ??????????!\n" +msgstr "??: ??????????!\n" msgid "WARNING: This key is not certified with a trusted signature!\n" msgstr "*??*: ?????????????????????!\n" @@ -4823,11 +4819,11 @@ msgstr "???????????\n" #, c-format msgid "Note: key %s has no %s feature\n" -msgstr "*??*: ?%s?? %s ?????????\n" +msgstr "??: ?%s?? %s ?????????\n" #, c-format msgid "Note: key %s has no preference for %s\n" -msgstr "*??*: ?%s??%s??????????????\n" +msgstr "??: ?%s??%s??????????????\n" msgid "data not saved; use option \"--output\" to save it\n" msgstr "" @@ -4877,10 +4873,10 @@ msgstr "*??*: ????????%s???????????? #, c-format msgid "Note: secret key %s expired at %s\n" -msgstr "*??*: ???%s?%s??????????\n" +msgstr "??: ???%s?%s??????????\n" msgid "Note: key has been revoked" -msgstr "*??*: ????????" +msgstr "??: ????????" #, c-format msgid "build_packet failed: %s\n" @@ -5074,28 +5070,27 @@ msgstr[0] "?%s?%lu?????????? (???????? #, c-format msgid "Note: signature key %s expired %s\n" -msgstr "*??*: ???%s?%s??????????\n" +msgstr "??: ???%s?%s??????????\n" #, c-format msgid "Note: signature key %s has been revoked\n" -msgstr "*??*: ? %s ???????\n" +msgstr "??: ? %s ???????\n" -#, fuzzy, c-format -#| msgid "standalone signature of class 0x%02x\n" +#, c-format msgid "bad key signature from key %s: %s (0x%02x, 0x%x)\n" -msgstr "???0x%02x??????????\n" +msgstr "?%s???????????: %s (0x%02x, 0x%x)\n" #, c-format msgid "assuming bad signature from key %s due to an unknown critical bit\n" -msgstr "??????????????????%s????????????\n" +msgstr "??????????????????%s??????????????\n" #, c-format msgid "key %s: no subkey for subkey revocation signature\n" -msgstr "?%s: ???????????????????\n" +msgstr "?%s: ??????????????????\n" #, c-format msgid "key %s: no subkey for subkey binding signature\n" -msgstr "?%s: ?????????????????????\n" +msgstr "?%s: ????????????????????\n" #, c-format msgid "WARNING: unable to %%-expand notation (too large). Using unexpanded.\n" @@ -5225,7 +5220,7 @@ msgid "%s: trustdb created\n" msgstr "%s: ??????????????\n" msgid "Note: trustdb not writable\n" -msgstr "*??*: ??????????????????\n" +msgstr "??: ??????????????????\n" #, c-format msgid "%s: invalid trustdb\n" @@ -6089,7 +6084,7 @@ msgid "failed to open '%s': %s\n" msgstr "'%s'??????: %s\n" msgid "Note: non-critical certificate policy not allowed" -msgstr "*??*: ????????????????????????" +msgstr "??: ????????????????????????" msgid "certificate policy not allowed" msgstr "???????????????" @@ -6605,7 +6600,7 @@ msgstr "" #, c-format msgid "Note: won't be able to encrypt to '%s': %s\n" -msgstr "*??*:'%s'????????????: %s\n" +msgstr "??:'%s'????????????: %s\n" #, c-format msgid "unknown validation model '%s'\n" ----------------------------------------------------------------------- Summary of changes: po/ja.po | 101 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 48 insertions(+), 53 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 08:55:19 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 12 Apr 2018 08:55:19 +0200 Subject: [git] gnupg-doc - branch, master, updated. 0ab16972dc62edd7e610248f5d9859e273113183 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 0ab16972dc62edd7e610248f5d9859e273113183 (commit) from e033305a5b7c3cc79d35af8f4baff9c1346bb48f (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 0ab16972dc62edd7e610248f5d9859e273113183 Author: Andre Heinecke Date: Thu Apr 12 08:50:27 2018 +0200 swdb: Fix gpgex checksums -- Strange i've copied the ones from make distcheck, but the signed tarball (double checked the sig) has different checksums. diff --git a/web/swdb.mac b/web/swdb.mac index 4617b87..6c2188d 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -174,8 +174,8 @@ #+macro: gpgex_ver 1.0.6 #+macro: gpgex_date 2018-04-10 #+macro: gpgex_size 297k -#+macro: gpgex_sha1 9994f89b466cb2098099aedbda259479a1484485 -#+macro: gpgex_sha2 8cb429bfcf1e938fa4ef8953e0eb2eff88848d883afcf66fdf5fa67ef01ed424 +#+macro: gpgex_sha1 443270219d542f97b6f124d2101ae8d803c6dbe2 +#+macro: gpgex_sha2 d69898d1022400bd09bb684080edc95be554af736ae9c014df73543f34f7481b # ----------------------------------------------------------------------- Summary of changes: web/swdb.mac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- The GnuPG website and other docs http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 08:57:06 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 12 Apr 2018 08:57:06 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-7-g327fece 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 327fece0aed2c9974659c72304f9fd1f461d460c (commit) from bb2680a45ab27427d33861802617211052242a33 (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 327fece0aed2c9974659c72304f9fd1f461d460c Author: Andre Heinecke Date: Thu Apr 12 08:56:00 2018 +0200 build: Update getswdb version check to 2.2 * build-aux/getswdb.sh: Check for gnupg22_ver gnupg21_ver no longer exists. diff --git a/build-aux/getswdb.sh b/build-aux/getswdb.sh index 83ecdb2..cd419f2 100755 --- a/build-aux/getswdb.sh +++ b/build-aux/getswdb.sh @@ -175,9 +175,9 @@ fi # to help detect rollback attacks. # if [ $skip_selfcheck = no ]; then - gnupg_ver=$(awk '$1=="gnupg21_ver" {print $2;exit}' swdb.lst) + gnupg_ver=$(awk '$1=="gnupg22_ver" {print $2;exit}' swdb.lst) if [ -z "$gnupg_ver" ]; then - echo "GnuPG 2.1 version missing in swdb.lst!" >&2 + echo "GnuPG 2.2 version missing in swdb.lst!" >&2 exit 1 fi gnupg_ver_num=$(echo "$gnupg_ver" | cvtver) ----------------------------------------------------------------------- Summary of changes: build-aux/getswdb.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 09:24:34 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 12 Apr 2018 09:24:34 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.10.0-184-gf7700a0 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 f7700a016926f0d8e9cb3c0337837deb7fe01079 (commit) from 5eb261d6028ab2c0ddd9af8e3e1f82e479c6109c (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 f7700a016926f0d8e9cb3c0337837deb7fe01079 Author: Werner Koch Date: Thu Apr 12 09:17:27 2018 +0200 core: Add new context flag "no-symkey-cache". * src/gpgme.c (gpgme_set_ctx_flag): Set flag. (gpgme_get_ctx_flag): Get flag. * src/context.h (struct gpgme_context): Add field no_symkey_cache. * src/engine-gpg.c (struct engine_gpg): Ditto. (gpg_set_engine_flags): Set flag. (build_argv): Pass option --no-symkey-cache to gpg. * tests/run-decrypt.c (print_result): Fix segv for symmetric messages. (main): New option --no-symkey-cache. * tests/run-encrypt.c (main): New option --no-symkey-cache. Signed-off-by: Werner Koch diff --git a/NEWS b/NEWS index 7b6fdd9..a8d73a5 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ Noteworthy changes in version 1.10.1 (unreleased) ------------------------------------------------- + * New context flag "no-symkey-cache". + * Interface changes relative to the 1.10.0 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gpgme_import_result_t EXTENDED: New field 'skipped_v3_keys' diff --git a/doc/gpgme.texi b/doc/gpgme.texi index ab554d8..cbb0e64 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -3069,7 +3069,13 @@ the time when you verified the signature. The string given in @var{value} is passed to the GnuPG engines to request restrictions based on the origin of the request. Valid values are documented in the GnuPG manual and the gpg man page under the -option ``--request-origin''. +option ``--request-origin''. Requires at least GnuPG 2.2.6 to have an +effect. + + at item "no-symkey-cache" +For OpenPGP disable the passphrase cache used for symmetrical en- and +decryption. This cache is based on the message specific salt value. +Requires at least GnuPG 2.2.7 to have an effect. @end table diff --git a/src/context.h b/src/context.h index 202cf16..c8e75ba 100644 --- a/src/context.h +++ b/src/context.h @@ -121,6 +121,9 @@ struct gpgme_context /* True if the option --auto-key-retrieve shall be passed to gpg. */ unsigned int auto_key_retrieve : 1; + /* Do not use the symmtric encryption passphrase cache. */ + unsigned int no_symkey_cache : 1; + /* Flags for keylist mode. */ gpgme_keylist_mode_t keylist_mode; diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 3b9a6ff..a37d1f7 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -145,6 +145,10 @@ struct engine_gpg gpgme_pinentry_mode_t pinentry_mode; char request_origin[10]; + struct { + unsigned int no_symkey_cache : 1; + } flags; + /* NULL or the data object fed to --override_session_key-fd. */ gpgme_data_t override_session_key; }; @@ -642,6 +646,10 @@ gpg_set_engine_flags (void *engine, const gpgme_ctx_t ctx) else strcpy (gpg->request_origin, ctx->request_origin); } + else if (ctx->no_symkey_cache && have_gpg_version (gpg, "2.2.7")) + { + gpg->flags.no_symkey_cache = 1; + } else *gpg->request_origin = 0; } @@ -875,7 +883,7 @@ build_argv (engine_gpg_t gpg, const char *pgmname) argc++; if (!gpg->cmd.used) argc++; /* --batch */ - argc += 2; /* --no-sk-comments, --request-origin */ + argc += 3; /* --no-sk-comments, --request-origin, --no-symkey-cache */ argv = calloc (argc + 1, sizeof *argv); if (!argv) @@ -937,6 +945,19 @@ build_argv (engine_gpg_t gpg, const char *pgmname) argc++; } + if (gpg->flags.no_symkey_cache) + { + argv[argc] = strdup ("--no-symkey-cache"); + if (!argv[argc]) + { + int saved_err = gpg_error_from_syserror (); + free (fd_data_map); + free_argv (argv); + return saved_err; + } + argc++; + } + if (gpg->pinentry_mode && have_gpg_version (gpg, "2.1.0")) { const char *s = NULL; diff --git a/src/gpgme.c b/src/gpgme.c index 9e65c50..82d6747 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -538,6 +538,10 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value) if (!ctx->request_origin) err = gpg_error_from_syserror (); } + else if (!strcmp (name, "no-symkey-cache")) + { + ctx->no_symkey_cache = abool; + } else err = gpg_error (GPG_ERR_UNKNOWN_NAME); @@ -583,6 +587,10 @@ gpgme_get_ctx_flag (gpgme_ctx_t ctx, const char *name) { return ctx->request_origin? ctx->request_origin : ""; } + else if (!strcmp (name, "no-symkey-cache")) + { + return ctx->no_symkey_cache? "1":""; + } else return NULL; } diff --git a/tests/run-decrypt.c b/tests/run-decrypt.c index f4c4754..a2e82a0 100644 --- a/tests/run-decrypt.c +++ b/tests/run-decrypt.c @@ -60,7 +60,7 @@ print_result (gpgme_decrypt_result_t result) if (result->session_key) printf ("Session key: %s\n", result->session_key); - for (recp = result->recipients; recp->next; recp = recp->next) + for (recp = result->recipients; recp && recp->next; recp = recp->next) { printf ("recipient %d\n", count++); printf (" status ....: %s\n", gpgme_strerror (recp->status)); @@ -82,6 +82,7 @@ show_usage (int ex) " --export-session-key show the session key\n" " --override-session-key STRING use STRING as session key\n" " --request-origin STRING use STRING as request origin\n" + " --no-symkey-cache disable the use of that cache\n" " --unwrap remove only the encryption layer\n" , stderr); exit (ex); @@ -104,6 +105,7 @@ main (int argc, char **argv) int export_session_key = 0; const char *override_session_key = NULL; const char *request_origin = NULL; + int no_symkey_cache = 0; int raw_output = 0; if (argc) @@ -160,6 +162,11 @@ main (int argc, char **argv) request_origin = *argv; argc--; argv++; } + else if (!strcmp (*argv, "--no-symkey-cache")) + { + no_symkey_cache = 1; + argc--; argv++; + } else if (!strcmp (*argv, "--unwrap")) { flags |= GPGME_DECRYPT_UNWRAP; @@ -226,6 +233,17 @@ main (int argc, char **argv) } } + if (no_symkey_cache) + { + err = gpgme_set_ctx_flag (ctx, "no-symkey-cache", "1"); + if (err) + { + fprintf (stderr, PGM ": error setting no-symkey-cache: %s\n", + gpgme_strerror (err)); + exit (1); + } + } + err = gpgme_data_new_from_stream (&in, fp_in); if (err) { diff --git a/tests/run-encrypt.c b/tests/run-encrypt.c index e949d76..51e2d60 100644 --- a/tests/run-encrypt.c +++ b/tests/run-encrypt.c @@ -80,17 +80,18 @@ show_usage (int ex) { fputs ("usage: " PGM " [options] FILE\n\n" "Options:\n" - " --verbose run in verbose mode\n" - " --status print status lines from the backend\n" - " --progress print progress info\n" - " --openpgp use the OpenPGP protocol (default)\n" - " --cms use the CMS protocol\n" - " --uiserver use the UI server\n" - " --loopback use a loopback pinentry\n" - " --key NAME encrypt to key NAME\n" - " --throw-keyids use this option\n" - " --wrap assume input is valid OpenPGP message\n" - " --symmetric encrypt symmetric (OpenPGP only)\n" + " --verbose run in verbose mode\n" + " --status print status lines from the backend\n" + " --progress print progress info\n" + " --openpgp use the OpenPGP protocol (default)\n" + " --cms use the CMS protocol\n" + " --uiserver use the UI server\n" + " --loopback use a loopback pinentry\n" + " --key NAME encrypt to key NAME\n" + " --throw-keyids use this option\n" + " --no-symkey-cache disable the use of that cache\n" + " --wrap assume input is valid OpenPGP message\n" + " --symmetric encrypt symmetric (OpenPGP only)\n" , stderr); exit (ex); } @@ -115,6 +116,7 @@ main (int argc, char **argv) int i; gpgme_encrypt_flags_t flags = GPGME_ENCRYPT_ALWAYS_TRUST; gpgme_off_t offset; + int no_symkey_cache = 0; if (argc) { argc--; argv++; } @@ -192,6 +194,11 @@ main (int argc, char **argv) flags |= GPGME_ENCRYPT_SYMMETRIC; argc--; argv++; } + else if (!strcmp (*argv, "--no-symkey-cache")) + { + no_symkey_cache = 1; + argc--; argv++; + } else if (!strncmp (*argv, "--", 2)) show_usage (1); @@ -227,6 +234,16 @@ main (int argc, char **argv) gpgme_set_pinentry_mode (ctx, GPGME_PINENTRY_MODE_LOOPBACK); gpgme_set_passphrase_cb (ctx, passphrase_cb, NULL); } + if (no_symkey_cache) + { + err = gpgme_set_ctx_flag (ctx, "no-symkey-cache", "1"); + if (err) + { + fprintf (stderr, PGM ": error setting no-symkey-cache: %s\n", + gpgme_strerror (err)); + exit (1); + } + } for (i=0; i < keycount; i++) { ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ doc/gpgme.texi | 8 +++++++- src/context.h | 3 +++ src/engine-gpg.c | 23 ++++++++++++++++++++++- src/gpgme.c | 8 ++++++++ tests/run-decrypt.c | 20 +++++++++++++++++++- tests/run-encrypt.c | 39 ++++++++++++++++++++++++++++----------- 7 files changed, 89 insertions(+), 14 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 11:34:09 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 12 Apr 2018 11:34:09 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-8-gbbb5bfa 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 bbb5bfacc0d1f179cfec94fd32fee01a09df0f1d (commit) from 327fece0aed2c9974659c72304f9fd1f461d460c (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 bbb5bfacc0d1f179cfec94fd32fee01a09df0f1d Author: Werner Koch Date: Thu Apr 12 11:24:54 2018 +0200 agent,dirmngr: Add "getenv" to the getinfo command. * agent/command.c (cmd_getinfo): Add sub-command getenv. * dirmngr/server.c (cmd_getinfo): Ditto. -- It is sometimes helpful to be able to inspect certain envvars in a running agent. For example "http_proxy". Signed-off-by: Werner Koch diff --git a/agent/command.c b/agent/command.c index f2d0389..20abb28 100644 --- a/agent/command.c +++ b/agent/command.c @@ -2825,6 +2825,7 @@ static const char hlp_getinfo[] = " std_env_names - List the names of the standard environment.\n" " std_session_env - List the standard session environment.\n" " std_startup_env - List the standard startup environment.\n" + " getenv NAME - Return value of envvar NAME.\n" " connections - Return number of active connections.\n" " jent_active - Returns OK if Libgcrypt's JENT is active.\n" " restricted - Returns OK if the connection is in restricted mode.\n" @@ -2961,6 +2962,23 @@ cmd_getinfo (assuan_context_t ctx, char *line) } } } + else if (!strncmp (line, "getenv", 6) + && (line[6] == ' ' || line[6] == '\t' || !line[6])) + { + line += 6; + while (*line == ' ' || *line == '\t') + line++; + if (!*line) + rc = gpg_error (GPG_ERR_MISSING_VALUE); + else + { + const char *s = getenv (line); + if (!s) + rc = set_error (GPG_ERR_NOT_FOUND, "No such envvar"); + else + rc = assuan_send_data (ctx, s, strlen (s)); + } + } else if (!strcmp (line, "connections")) { char numbuf[20]; diff --git a/dirmngr/server.c b/dirmngr/server.c index 60d9802..4315c41 100644 --- a/dirmngr/server.c +++ b/dirmngr/server.c @@ -2489,7 +2489,8 @@ static const char hlp_getinfo[] = "dnsinfo - Return info about the DNS resolver\n" "socket_name - Return the name of the socket.\n" "session_id - Return the current session_id.\n" - "workqueue - Inspect the work queue\n"; + "workqueue - Inspect the work queue\n" + "getenv NAME - Return value of envvar NAME\n"; static gpg_error_t cmd_getinfo (assuan_context_t ctx, char *line) { @@ -2557,6 +2558,23 @@ cmd_getinfo (assuan_context_t ctx, char *line) workqueue_dump_queue (ctrl); err = 0; } + else if (!strncmp (line, "getenv", 6) + && (line[6] == ' ' || line[6] == '\t' || !line[6])) + { + line += 6; + while (*line == ' ' || *line == '\t') + line++; + if (!*line) + err = gpg_error (GPG_ERR_MISSING_VALUE); + else + { + const char *s = getenv (line); + if (!s) + err = set_error (GPG_ERR_NOT_FOUND, "No such envvar"); + else + err = assuan_send_data (ctx, s, strlen (s)); + } + } else err = set_error (GPG_ERR_ASS_PARAMETER, "unknown value for WHAT"); ----------------------------------------------------------------------- Summary of changes: agent/command.c | 18 ++++++++++++++++++ dirmngr/server.c | 20 +++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 11:57:55 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 12 Apr 2018 11:57:55 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-9-ge2bd152 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 e2bd152a928d79ddfb95fd2f7911c80a1a8d5a21 (commit) from bbb5bfacc0d1f179cfec94fd32fee01a09df0f1d (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 e2bd152a928d79ddfb95fd2f7911c80a1a8d5a21 Author: Werner Koch Date: Thu Apr 12 11:49:36 2018 +0200 gpg: Relax printing of STATUS_FAILURE. * g10/gpg.c (g10_exit): Print STATUS_FAILURE only based on passed return code and not on the presence of any call to log_error. -- This fixes an actual regression in GPGME where FAILURE is considered for example by a signature verify operation. The operation will simply fail and not just record that that a signature could not be verified. In particular for files with more than one signature a log_error if often called to show that a pubkey is missing for one of the signatures. Using that log_error is correct in that case. Fixes-commit: 0336e5d1a7b9d46e06c838e6a98aecfcc9542882 Signed-off-by: Werner Koch diff --git a/g10/gpg.c b/g10/gpg.c index fbbdd92..aaeddee 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -5111,7 +5111,7 @@ g10_exit( int rc ) /* If we had an error but not printed an error message, do it now. * Note that write_status_failure will never print a second failure * status line. */ - if (log_get_errorcount (0)) + if (rc) write_status_failure ("gpg-exit", gpg_error (GPG_ERR_GENERAL)); gcry_control (GCRYCTL_UPDATE_RANDOM_SEED_FILE); ----------------------------------------------------------------------- Summary of changes: g10/gpg.c | 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 Thu Apr 12 13:01:02 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 12 Apr 2018 13:01:02 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.0.6-137-g536f069 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 536f0690ed85250756f1cc58dc957f8015e3785a (commit) via 02a7a047e1912824ef8680446084fed1f4b230d0 (commit) via 0f3ac66840961e2147d148d3d36017b675a3e896 (commit) via 68ba8ea2d624c025fcd8fce7a0a1bdc6d79b431c (commit) via 6f7b2db102838df077162b9b2d1f7df1f1716994 (commit) from d13de350caa214e97ac18066ba9cdb8caef64ed8 (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 536f0690ed85250756f1cc58dc957f8015e3785a Author: Andre Heinecke Date: Thu Apr 12 13:00:52 2018 +0200 Update NEWS for todays release -- diff --git a/NEWS b/NEWS index c773c0b..e127e5e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -Noteworthy changes for version 2.1.0 (unreleased) +Noteworthy changes for version 2.1.0 (2018-04-12) ================================================= * Encryption and Signing has been reworked to, again, commit 02a7a047e1912824ef8680446084fed1f4b230d0 Author: Andre Heinecke Date: Thu Apr 12 13:00:17 2018 +0200 Update german l10n * po/de.po: Translate. diff --git a/po/de.po b/po/de.po index 1690017..d0378bc 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: GpgOL 1.0.0\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" "POT-Creation-Date: 2018-04-12 12:58+0200\n" -"PO-Revision-Date: 2018-03-07 08:59+0100\n" +"PO-Revision-Date: 2018-04-12 12:59+0100\n" "Last-Translator: Andre Heinecke \n" "Language-Team: English \n" "Language: en_US\n" @@ -125,9 +125,8 @@ msgid "GpgOL - Save attachment" msgstr "GpgOL - Anlage Speichern" #: src/common.c:1073 -#, fuzzy msgid "GpgOL Error" -msgstr "GpgOL" +msgstr "GpgOL Fehler" #: src/config-dialog.c:38 msgid "Debug output (for analysing problems)" @@ -782,6 +781,9 @@ msgid "" "They can't be permanently removed and will be shown again the next time this " "message is opened." msgstr "" +"Anh?nge sind Teil der Krypto-Nachricht.\n" +"Sie k?nnen nicht permanent entfernt werden und werden beim " +"n?chsten ?ffnen dieser Nachricht wieder angezeigt." #: src/main.c:466 #, c-format commit 0f3ac66840961e2147d148d3d36017b675a3e896 Author: Andre Heinecke Date: Thu Apr 12 12:58:10 2018 +0200 Auto update po files -- diff --git a/po/de.po b/po/de.po index f8b9ebb..1690017 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: GpgOL 1.0.0\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" -"POT-Creation-Date: 2018-03-21 13:02+0100\n" +"POT-Creation-Date: 2018-04-12 12:58+0200\n" "PO-Revision-Date: 2018-03-07 08:59+0100\n" "Last-Translator: Andre Heinecke \n" "Language-Team: English \n" @@ -77,7 +77,7 @@ msgstr "Die Benutzeroberfl?che zu ?ndern erfordert einen Neustart von Outlook" #: src/gpgoladdin.cpp:864 src/gpgoladdin.cpp:907 src/gpgoladdin.cpp:980 #: src/gpgoladdin.cpp:982 src/gpgoladdin.cpp:1018 src/gpgoladdin.cpp:1172 #: src/gpgoladdin.cpp:1255 src/gpgoladdin.cpp:1261 src/gpgoladdin.cpp:1334 -#: src/gpgoladdin.cpp:1338 src/mail.cpp:761 src/main.c:467 src/message.cpp:303 +#: src/gpgoladdin.cpp:1338 src/main.c:467 src/message.cpp:303 #: src/ribbon-callbacks.cpp:134 src/ribbon-callbacks.cpp:248 #: src/ribbon-callbacks.cpp:263 src/ribbon-callbacks.cpp:275 #: src/ribbon-callbacks.cpp:312 src/ribbon-callbacks.cpp:324 @@ -124,6 +124,11 @@ msgstr "Die Zertifikatsverwaltung konnte nicht aufgerufen werden" msgid "GpgOL - Save attachment" msgstr "GpgOL - Anlage Speichern" +#: src/common.c:1073 +#, fuzzy +msgid "GpgOL Error" +msgstr "GpgOL" + #: src/config-dialog.c:38 msgid "Debug output (for analysing problems)" msgstr "Debugausgabe (zur Problemanalyse)" @@ -175,11 +180,11 @@ msgstr "" msgid "Do you want to revert this folder?" msgstr "M?chten Sie diesen Ordner von GpgOL befreien?" -#: src/gpgoladdin.cpp:446 src/mail.cpp:1685 src/mail.cpp:1756 +#: src/gpgoladdin.cpp:446 src/mail.cpp:1794 src/mail.cpp:1865 msgid "GpgOL: Encrypted Message" msgstr "GpgOL: Verschl?sselte Nachricht" -#: src/gpgoladdin.cpp:447 src/mail.cpp:1686 src/mail.cpp:1757 +#: src/gpgoladdin.cpp:447 src/mail.cpp:1795 src/mail.cpp:1866 msgid "GpgOL: Trusted Sender Address" msgstr "GpgOL: Vertraute Absenderadresse" @@ -383,7 +388,7 @@ msgstr "" "Dies ist eine verschl?sselte Nachricht.\n" "Klicken Sie hier um weitere Informationen zu erhalten. " -#: src/mail.cpp:323 +#: src/mail.cpp:325 msgid "" "Not all attachments were encrypted or signed.\n" "The unsigned / unencrypted attachments are:\n" @@ -393,7 +398,7 @@ msgstr "" "Die unsignierten / unverschl?sselten Anh?nge sind:\n" "\n" -#: src/mail.cpp:328 +#: src/mail.cpp:330 msgid "" "Not all attachments were signed.\n" "The unsigned attachments are:\n" @@ -403,7 +408,7 @@ msgstr "" "Die unsignierten Anh?nge sind:\n" "\n" -#: src/mail.cpp:333 +#: src/mail.cpp:335 msgid "" "Not all attachments were encrypted.\n" "The unencrypted attachments are:\n" @@ -413,7 +418,7 @@ msgstr "" "Die unverschl?sselten Anh?nge sind:\n" "\n" -#: src/mail.cpp:373 +#: src/mail.cpp:375 msgid "" "Note: The attachments may be encrypted or signed on a file level but the " "GpgOL status does not apply to them." @@ -421,15 +426,15 @@ msgstr "" "Note: Die Anh?nge k?nnten auf Dateiebene verschl?sselt oder signiert sein, " "aber GpgOL kann deren Kryptostatus nicht anzeigen." -#: src/mail.cpp:376 +#: src/mail.cpp:378 msgid "GpgOL Warning" msgstr "GpgOL Warnung" -#: src/mail.cpp:843 +#: src/mail.cpp:925 msgid "Pubkey directory confirmation" msgstr "?schl Verzeichnis Best?tigung" -#: src/mail.cpp:844 +#: src/mail.cpp:926 msgid "" "This is a confirmation request to publish your Pubkey in the directory for " "your domain.\n" @@ -443,19 +448,19 @@ msgstr "" "

Wenn sie dies nicht angefordert haben, k?nnen Sie diese Mail ignorieren.\n" -#: src/mail.cpp:852 src/mail.cpp:2000 +#: src/mail.cpp:934 src/mail.cpp:2109 msgid "Encrypted message" msgstr "Verschl?sselte Nachricht" -#: src/mail.cpp:853 +#: src/mail.cpp:935 msgid "Please wait while the message is being decrypted / verified..." msgstr "Bitte warten Sie w?hrend die Nachricht entschl?sselt / gepr?ft wird..." -#: src/mail.cpp:1132 +#: src/mail.cpp:1234 msgid "GpgOL: Oops, G Suite Sync account detected" msgstr "GpgOL: Oops, G Suite Sync Konto erkannt" -#: src/mail.cpp:1134 +#: src/mail.cpp:1236 msgid "" "G Suite Sync breaks outgoing crypto mails with attachments.\n" "Using crypto and attachments with G Suite Sync is not supported.\n" @@ -468,93 +473,93 @@ msgstr "" "\n" "Details siehe: https://dev.gnupg.org/T3545" -#: src/mail.cpp:1945 +#: src/mail.cpp:2054 msgid "Security Level 4" msgstr "Sicherheit Stufe 4" -#: src/mail.cpp:1949 +#: src/mail.cpp:2058 msgid "Trust Level 4" msgstr "Vertrauen Stufe 4" -#: src/mail.cpp:1953 +#: src/mail.cpp:2062 msgid "Security Level 3" msgstr "Sicherheit Stufe 3" -#: src/mail.cpp:1957 +#: src/mail.cpp:2066 msgid "Trust Level 3" msgstr "Vertrauen Stufe 3" -#: src/mail.cpp:1961 +#: src/mail.cpp:2070 msgid "Security Level 2" msgstr "Sicherheit Stufe 2" -#: src/mail.cpp:1965 +#: src/mail.cpp:2074 msgid "Trust Level 2" msgstr "Vertrauen Stufe 2" -#: src/mail.cpp:1969 +#: src/mail.cpp:2078 msgid "Encrypted" msgstr "Verschl?sselt" -#: src/mail.cpp:1978 src/mail.cpp:1980 src/ribbon-callbacks.cpp:1631 +#: src/mail.cpp:2087 src/mail.cpp:2089 src/ribbon-callbacks.cpp:1631 msgid "Insecure" msgstr "Unsicher" -#: src/mail.cpp:1992 +#: src/mail.cpp:2101 msgid "Signed and encrypted message" msgstr "Signierte und verschl?sselte Nachricht" -#: src/mail.cpp:1996 +#: src/mail.cpp:2105 msgid "Signed message" msgstr "Signierte Nachricht" -#: src/mail.cpp:2003 src/ribbon-callbacks.cpp:1654 +#: src/mail.cpp:2112 src/ribbon-callbacks.cpp:1654 msgid "Insecure message" msgstr "Unsichere Nachricht" -#: src/mail.cpp:2014 src/mail.cpp:2025 +#: src/mail.cpp:2123 src/mail.cpp:2134 msgid "You cannot be sure who sent, modified and read the message in transit." msgstr "" "Sie k?nnen nicht sicher sein wer die Nachricht gesendet, modifiziert oder " "w?hrend der ?bertragung gelesen hat." -#: src/mail.cpp:2017 +#: src/mail.cpp:2126 msgid "The message was signed but the verification failed with:" msgstr "Die Nachricht ist signiert aber die ?berpr?fung schlug fehl mit:" -#: src/mail.cpp:2035 +#: src/mail.cpp:2144 msgid "The encryption was VS-NfD-compliant." msgstr "Diese Verschl?sselung war VS-NfD-konform." -#: src/mail.cpp:2039 +#: src/mail.cpp:2148 msgid "The encryption was not VS-NfD-compliant." msgstr "Diese Verschl?sselung war nicht VS-NfD-konform." -#: src/mail.cpp:2043 +#: src/mail.cpp:2152 msgid "You cannot be sure who sent the message because it is not signed." msgstr "" "Aber Sie k?nnen nicht sicher sein wer der Absender der Nachricht ist da " "diese nicht signiert wurde. " -#: src/mail.cpp:2066 +#: src/mail.cpp:2175 msgid "You signed this message." msgstr "Sie haben diese Nachricht signiert." -#: src/mail.cpp:2070 +#: src/mail.cpp:2179 msgid "The senders identity was certified by yourself." msgstr "Die Identit?t des Absenders wurde von ihnen selbst beglaubigt." -#: src/mail.cpp:2074 +#: src/mail.cpp:2183 msgid "The sender is allowed to certify identities for you." msgstr "Der Absender ist berechtigt f?r Sie Identit?ten zu beglaubigen." -#: src/mail.cpp:2087 +#: src/mail.cpp:2196 msgid "The senders identity was certified by several trusted people." msgstr "" "Die Identit?t des Absenders wurde von mehreren vertrauensw?rdigen Personen " "beglaubigt." -#: src/mail.cpp:2092 +#: src/mail.cpp:2201 #, c-format msgid "" "The senders identity is certified by the trusted issuer:\n" @@ -563,12 +568,13 @@ msgstr "" "Die Identit?t des Absenders wurde best?tigt von:\n" "'%s'\n" -#: src/mail.cpp:2100 +#: src/mail.cpp:2209 msgid "Some trusted people have certified the senders identity." msgstr "" -"Einige vertrauensw?rdige Personen haben die Identit?t des Absenders beglaubigt." +"Einige vertrauensw?rdige Personen haben die Identit?t des Absenders " +"beglaubigt." -#: src/mail.cpp:2110 +#: src/mail.cpp:2219 #, c-format msgid "" "The senders address is trusted, because you have established a communication " @@ -580,11 +586,11 @@ msgstr "" "Seit %s haben Sie %i Nachrichten an diesen Absender verschl?sselt und %i " "Signaturen gepr?ft." -#: src/mail.cpp:2126 +#: src/mail.cpp:2235 msgid "The senders signature was verified for the first time." msgstr "Die Signatur des Absenders wurde das erste mal verifiziert." -#: src/mail.cpp:2133 +#: src/mail.cpp:2242 #, c-format msgid "" "The senders address is not trustworthy yet because you only verified %i " @@ -594,70 +600,70 @@ msgstr "" "Nachrichten von diesem Absender verifiziert und %i Nachrichten verschl?sselt " "haben. Seit dem %s." -#: src/mail.cpp:2147 +#: src/mail.cpp:2256 msgid "But the sender address is not trustworthy because:" msgstr "Aber die Absenderadresse ist nicht vertrauensw?rdig da:" -#: src/mail.cpp:2148 +#: src/mail.cpp:2257 msgid "The sender address is not trustworthy because:" msgstr "Die Absenderadresse ist nicht vertrauensw?rdig da:" -#: src/mail.cpp:2156 +#: src/mail.cpp:2265 msgid "The signature is invalid: \n" msgstr "Die Signatur ist ung?ltig: \n" -#: src/mail.cpp:2161 +#: src/mail.cpp:2270 msgid "There was an error verifying the signature.\n" msgstr "Beim ?berpr?fen der Signatur ist ein Fehler aufgetreten.\n" -#: src/mail.cpp:2165 +#: src/mail.cpp:2274 msgid "The signature is expired.\n" msgstr "Die Signatur ist abgelaufen.\n" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 msgid "The used key" msgstr "Der verwendete Schl?ssel" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 msgid "The used certificate" msgstr "Das verwendete Zertifikat" -#: src/mail.cpp:2177 +#: src/mail.cpp:2286 msgid "is not available." msgstr "ist nicht verf?gbar." -#: src/mail.cpp:2181 +#: src/mail.cpp:2290 msgid "is revoked." msgstr "wurde zur?ckgezogen." -#: src/mail.cpp:2185 +#: src/mail.cpp:2294 msgid "is expired." msgstr "ist veraltet. " -#: src/mail.cpp:2189 +#: src/mail.cpp:2298 msgid "is not meant for signing." msgstr "ist nicht zum signieren vorgesehen. " -#: src/mail.cpp:2193 src/mail.cpp:2197 +#: src/mail.cpp:2302 src/mail.cpp:2306 msgid "could not be checked for revocation." msgstr "wurde m?glicherweise zur?ckgezogen." -#: src/mail.cpp:2202 +#: src/mail.cpp:2311 msgid "is not the same as the key that was used for this address in the past." msgstr "" "ist nicht der gleiche Schl?ssel der in der Vergangenheit f?r diese Adresse " "verwendet wurde." -#: src/mail.cpp:2208 +#: src/mail.cpp:2317 #, c-format msgid "does not claim the address: \"%s\"." msgstr "passt nicht zu der mailaddresse: \"%s\". " -#: src/mail.cpp:2221 +#: src/mail.cpp:2330 msgid "is not certified by any trustworthy key." msgstr "wurde von keinem vertrauensw?rdigen Schl?ssel beglaubigt." -#: src/mail.cpp:2225 +#: src/mail.cpp:2334 msgid "" "is not certified by a trustworthy Certificate Authority or the Certificate " "Authority is unknown." @@ -665,59 +671,59 @@ msgstr "" "wurde von keiner vertrauensw?rdigen Zertifizierungsstelle beglaubigt oder " "die Zertifizierungsstelle ist unbekannt." -#: src/mail.cpp:2230 +#: src/mail.cpp:2339 msgid "The sender marked this address as revoked." msgstr "Der Absender hat diese Adresse zur?ckgezogen." -#: src/mail.cpp:2234 +#: src/mail.cpp:2343 msgid "is marked as not trustworthy." msgstr "ist als nicht vertrauensw?rdig markiert." -#: src/mail.cpp:2244 +#: src/mail.cpp:2353 msgid "The signature is VS-NfD-compliant." msgstr "Die Signatur ist VS-NfD-konform." -#: src/mail.cpp:2248 +#: src/mail.cpp:2357 msgid "The signature is not VS-NfD-compliant." msgstr "Die Signatur ist nicht VS-NfD-konform." -#: src/mail.cpp:2256 +#: src/mail.cpp:2365 msgid "The encryption is VS-NfD-compliant." msgstr "Diese Verschl?sselung ist VS-NfD-konform." -#: src/mail.cpp:2260 +#: src/mail.cpp:2369 msgid "The encryption is not VS-NfD-compliant." msgstr "Diese Verschl?sselung ist nicht VS-NfD-konform." -#: src/mail.cpp:2271 +#: src/mail.cpp:2380 msgid "Click here to change the key used for this address." msgstr "Klicken Sie hier um den Schl?ssel f?r diese Adresse zu ?ndern." -#: src/mail.cpp:2275 +#: src/mail.cpp:2384 msgid "Click here for details about the key." msgstr "Klicken Sie hier f?r Details zu dem Schl?ssel" -#: src/mail.cpp:2276 +#: src/mail.cpp:2385 msgid "Click here for details about the certificate." msgstr "Klicken Sie hier f?r Details zu dem Zertifikat." -#: src/mail.cpp:2280 +#: src/mail.cpp:2389 msgid "Click here to search the key on the configured keyserver." msgstr "" "Klicken Sie hier um den Schl?ssel auf dem konfigurierten Schl?sselserver zu " "suchen. " -#: src/mail.cpp:2281 +#: src/mail.cpp:2390 msgid "Click here to search the certificate on the configured X509 keyserver." msgstr "" "Klicken Sie hier um das Zertifikat auf dem konfigurierten X509 " "Schl?sselserver zu suchen." -#: src/mail.cpp:2509 +#: src/mail.cpp:2678 msgid "GpgOL: Encryption not possible!" msgstr "GpgOL: Verschl?sselung nicht m?glich!" -#: src/mail.cpp:2511 +#: src/mail.cpp:2680 msgid "" "Outlook returned an error when trying to send the encrypted mail.\n" "\n" @@ -744,11 +750,11 @@ msgstr "" "Sie sicher, da? lediglich das Text Format ausgew?hlt wurde.\n" "(In der Men?leiste: \"Format\" => \"Nur Text\")" -#: src/mailitem-events.cpp:295 +#: src/mailitem-events.cpp:313 src/mailitem-events.cpp:805 msgid "Sorry, that's not possible, yet" msgstr "Sorry, dies ist leider noch nicht m?glich" -#: src/mailitem-events.cpp:297 +#: src/mailitem-events.cpp:315 #, c-format msgid "" "GpgOL has prevented the change to the \"%s\" property.\n" @@ -763,23 +769,30 @@ msgstr "" "?nderungen an Eigenschaften werden noch nicht f?r Krypto-Nachrichten " "unterst?tzt.\n" "\n" -"Um dieses Problem zu umgehen, ?ndern Sie bitte die Eigenschaft wenn " -"die Nachricht in keinem Fenster ge?ffnet ist und nicht in der " -"Nachrichtenliste ausgew?hlt ist.\n" +"Um dieses Problem zu umgehen, ?ndern Sie bitte die Eigenschaft wenn die " +"Nachricht in keinem Fenster ge?ffnet ist und nicht in der Nachrichtenliste " +"ausgew?hlt ist.\n" "\n" "Beispielsweise durch einen Rechtsklick auf die Nachricht, wenn diese nicht " "ausgew?hlt ist.\n" +#: src/mailitem-events.cpp:802 +msgid "" +"Attachments are part of the crypto message.\n" +"They can't be permanently removed and will be shown again the next time this " +"message is opened." +msgstr "" + #: src/main.c:466 #, c-format msgid "Note: Using compatibility flags: %s" msgstr "Notiz: Diese Kompatibilit?tsflags werden verwendet: %s" -#: src/mapihelp.cpp:1886 src/mapihelp.cpp:1894 src/mapihelp.cpp:1902 +#: src/mapihelp.cpp:1918 src/mapihelp.cpp:1926 src/mapihelp.cpp:1934 msgid "[no subject]" msgstr "[Kein Betreff]" -#: src/mapihelp.cpp:2527 +#: src/mapihelp.cpp:2559 msgid "" "[The content of this message is not visible because it has been decrypted by " "another Outlook session. Use the \"decrypt/verify\" command to make it " @@ -789,7 +802,7 @@ msgstr "" "Outlook Sitzung entschl?sselt wurde. Verwenden Sie den Men?punkt " "\"entschl?sseln/?berpr?fen\" um den Inhalt wieder sichtbar zu machen.]" -#: src/mapihelp.cpp:3421 +#: src/mapihelp.cpp:3453 msgid "" "[The content of this message is not visible due to an processing error in " "GpgOL.]" @@ -1168,19 +1181,19 @@ msgstr "" msgid "GpgOL: Request confirmed!" msgstr "GpgOL: Eintragung best?tigt." -#: src/cryptcontroller.cpp:393 +#: src/cryptcontroller.cpp:404 msgid "Resolving recipients..." msgstr "Empf?nger aufl?sen..." -#: src/cryptcontroller.cpp:397 +#: src/cryptcontroller.cpp:408 msgid "Resolving signers..." msgstr "Signierer aufl?sen..." -#: src/cryptcontroller.cpp:1004 +#: src/cryptcontroller.cpp:1042 msgid "Encrypting..." msgstr "Verschl?sseln..." -#: src/cryptcontroller.cpp:1008 +#: src/cryptcontroller.cpp:1046 msgid "Signing..." msgstr "Signieren..." diff --git a/po/fr.po b/po/fr.po index 77ffe1c..9e0b62a 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" -"POT-Creation-Date: 2018-03-21 13:02+0100\n" +"POT-Creation-Date: 2018-04-12 12:58+0200\n" "PO-Revision-Date: 2015-10-01 17:05+0200\n" "Last-Translator: Olivier Serve \n" "Language-Team: French \n" @@ -75,7 +75,7 @@ msgstr "" #: src/gpgoladdin.cpp:864 src/gpgoladdin.cpp:907 src/gpgoladdin.cpp:980 #: src/gpgoladdin.cpp:982 src/gpgoladdin.cpp:1018 src/gpgoladdin.cpp:1172 #: src/gpgoladdin.cpp:1255 src/gpgoladdin.cpp:1261 src/gpgoladdin.cpp:1334 -#: src/gpgoladdin.cpp:1338 src/mail.cpp:761 src/main.c:467 src/message.cpp:303 +#: src/gpgoladdin.cpp:1338 src/main.c:467 src/message.cpp:303 #: src/ribbon-callbacks.cpp:134 src/ribbon-callbacks.cpp:248 #: src/ribbon-callbacks.cpp:263 src/ribbon-callbacks.cpp:275 #: src/ribbon-callbacks.cpp:312 src/ribbon-callbacks.cpp:324 @@ -122,6 +122,11 @@ msgstr "D?marrer le gestionnaire de certificats" msgid "GpgOL - Save attachment" msgstr "GpgOL - Enregistrer le fichier joint" +#: src/common.c:1073 +#, fuzzy +msgid "GpgOL Error" +msgstr "GpgOL" + #: src/config-dialog.c:38 msgid "Debug output (for analysing problems)" msgstr "Sortie Debug (pour analyser les probl?mes)" @@ -172,12 +177,12 @@ msgstr "" msgid "Do you want to revert this folder?" msgstr "Voulez-vous r?cup?rer ce dossier ?" -#: src/gpgoladdin.cpp:446 src/mail.cpp:1685 src/mail.cpp:1756 +#: src/gpgoladdin.cpp:446 src/mail.cpp:1794 src/mail.cpp:1865 #, fuzzy msgid "GpgOL: Encrypted Message" msgstr "D?chiffrer le message" -#: src/gpgoladdin.cpp:447 src/mail.cpp:1686 src/mail.cpp:1757 +#: src/gpgoladdin.cpp:447 src/mail.cpp:1795 src/mail.cpp:1866 msgid "GpgOL: Trusted Sender Address" msgstr "" @@ -378,42 +383,42 @@ msgstr "" "Ceci est un message chiffr?.\n" "Veuillez le s?lectionner pour plus d'informations." -#: src/mail.cpp:323 +#: src/mail.cpp:325 msgid "" "Not all attachments were encrypted or signed.\n" "The unsigned / unencrypted attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:328 +#: src/mail.cpp:330 msgid "" "Not all attachments were signed.\n" "The unsigned attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:333 +#: src/mail.cpp:335 msgid "" "Not all attachments were encrypted.\n" "The unencrypted attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:373 +#: src/mail.cpp:375 msgid "" "Note: The attachments may be encrypted or signed on a file level but the " "GpgOL status does not apply to them." msgstr "" -#: src/mail.cpp:376 +#: src/mail.cpp:378 msgid "GpgOL Warning" msgstr "" -#: src/mail.cpp:843 +#: src/mail.cpp:925 msgid "Pubkey directory confirmation" msgstr "" -#: src/mail.cpp:844 +#: src/mail.cpp:926 msgid "" "This is a confirmation request to publish your Pubkey in the directory for " "your domain.\n" @@ -422,20 +427,20 @@ msgid "" "directory, simply ignore this message.

\n" msgstr "" -#: src/mail.cpp:852 src/mail.cpp:2000 +#: src/mail.cpp:934 src/mail.cpp:2109 #, fuzzy msgid "Encrypted message" msgstr "D?chiffrer le message" -#: src/mail.cpp:853 +#: src/mail.cpp:935 msgid "Please wait while the message is being decrypted / verified..." msgstr "" -#: src/mail.cpp:1132 +#: src/mail.cpp:1234 msgid "GpgOL: Oops, G Suite Sync account detected" msgstr "" -#: src/mail.cpp:1134 +#: src/mail.cpp:1236 msgid "" "G Suite Sync breaks outgoing crypto mails with attachments.\n" "Using crypto and attachments with G Suite Sync is not supported.\n" @@ -443,105 +448,105 @@ msgid "" "See: https://dev.gnupg.org/T3545 for details." msgstr "" -#: src/mail.cpp:1945 +#: src/mail.cpp:2054 msgid "Security Level 4" msgstr "" -#: src/mail.cpp:1949 +#: src/mail.cpp:2058 msgid "Trust Level 4" msgstr "" -#: src/mail.cpp:1953 +#: src/mail.cpp:2062 msgid "Security Level 3" msgstr "" -#: src/mail.cpp:1957 +#: src/mail.cpp:2066 msgid "Trust Level 3" msgstr "" -#: src/mail.cpp:1961 +#: src/mail.cpp:2070 msgid "Security Level 2" msgstr "" -#: src/mail.cpp:1965 +#: src/mail.cpp:2074 msgid "Trust Level 2" msgstr "" -#: src/mail.cpp:1969 +#: src/mail.cpp:2078 #, fuzzy msgid "Encrypted" msgstr "Chiffrer" -#: src/mail.cpp:1978 src/mail.cpp:1980 src/ribbon-callbacks.cpp:1631 +#: src/mail.cpp:2087 src/mail.cpp:2089 src/ribbon-callbacks.cpp:1631 msgid "Insecure" msgstr "" -#: src/mail.cpp:1992 +#: src/mail.cpp:2101 #, fuzzy msgid "Signed and encrypted message" msgstr "D?chiffrer le message" -#: src/mail.cpp:1996 +#: src/mail.cpp:2105 #, fuzzy msgid "Signed message" msgstr "D?chiffrer le message" -#: src/mail.cpp:2003 src/ribbon-callbacks.cpp:1654 +#: src/mail.cpp:2112 src/ribbon-callbacks.cpp:1654 #, fuzzy msgid "Insecure message" msgstr "D?chiffrer le message" -#: src/mail.cpp:2014 src/mail.cpp:2025 +#: src/mail.cpp:2123 src/mail.cpp:2134 msgid "You cannot be sure who sent, modified and read the message in transit." msgstr "" -#: src/mail.cpp:2017 +#: src/mail.cpp:2126 msgid "The message was signed but the verification failed with:" msgstr "" -#: src/mail.cpp:2035 +#: src/mail.cpp:2144 #, fuzzy msgid "The encryption was VS-NfD-compliant." msgstr "Cette signature est valide\n" -#: src/mail.cpp:2039 +#: src/mail.cpp:2148 #, fuzzy msgid "The encryption was not VS-NfD-compliant." msgstr "Cette signature est valide\n" -#: src/mail.cpp:2043 +#: src/mail.cpp:2152 msgid "You cannot be sure who sent the message because it is not signed." msgstr "" -#: src/mail.cpp:2066 +#: src/mail.cpp:2175 #, fuzzy msgid "You signed this message." msgstr "D?chiffrer le message" -#: src/mail.cpp:2070 +#: src/mail.cpp:2179 msgid "The senders identity was certified by yourself." msgstr "" -#: src/mail.cpp:2074 +#: src/mail.cpp:2183 msgid "The sender is allowed to certify identities for you." msgstr "" -#: src/mail.cpp:2087 +#: src/mail.cpp:2196 msgid "The senders identity was certified by several trusted people." msgstr "" -#: src/mail.cpp:2092 +#: src/mail.cpp:2201 #, c-format msgid "" "The senders identity is certified by the trusted issuer:\n" "'%s'\n" msgstr "" -#: src/mail.cpp:2100 +#: src/mail.cpp:2209 msgid "Some trusted people have certified the senders identity." msgstr "" -#: src/mail.cpp:2110 +#: src/mail.cpp:2219 #, c-format msgid "" "The senders address is trusted, because you have established a communication " @@ -549,142 +554,142 @@ msgid "" "You encrypted %i and verified %i messages since." msgstr "" -#: src/mail.cpp:2126 +#: src/mail.cpp:2235 msgid "The senders signature was verified for the first time." msgstr "" -#: src/mail.cpp:2133 +#: src/mail.cpp:2242 #, c-format msgid "" "The senders address is not trustworthy yet because you only verified %i " "messages and encrypted %i messages to it since %s." msgstr "" -#: src/mail.cpp:2147 +#: src/mail.cpp:2256 msgid "But the sender address is not trustworthy because:" msgstr "" -#: src/mail.cpp:2148 +#: src/mail.cpp:2257 msgid "The sender address is not trustworthy because:" msgstr "" -#: src/mail.cpp:2156 +#: src/mail.cpp:2265 #, fuzzy msgid "The signature is invalid: \n" msgstr "Cette signature est valide\n" -#: src/mail.cpp:2161 +#: src/mail.cpp:2270 msgid "There was an error verifying the signature.\n" msgstr "" -#: src/mail.cpp:2165 +#: src/mail.cpp:2274 #, fuzzy msgid "The signature is expired.\n" msgstr "Cette signature est valide\n" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 msgid "The used key" msgstr "" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 #, fuzzy msgid "The used certificate" msgstr "Erreur de v?rification" -#: src/mail.cpp:2177 +#: src/mail.cpp:2286 #, fuzzy msgid "is not available." msgstr "La liste de r?vocation (CRL) n'est pas disponible\n" -#: src/mail.cpp:2181 +#: src/mail.cpp:2290 msgid "is revoked." msgstr "" -#: src/mail.cpp:2185 +#: src/mail.cpp:2294 msgid "is expired." msgstr "" -#: src/mail.cpp:2189 +#: src/mail.cpp:2298 msgid "is not meant for signing." msgstr "" -#: src/mail.cpp:2193 src/mail.cpp:2197 +#: src/mail.cpp:2302 src/mail.cpp:2306 msgid "could not be checked for revocation." msgstr "" -#: src/mail.cpp:2202 +#: src/mail.cpp:2311 msgid "is not the same as the key that was used for this address in the past." msgstr "" -#: src/mail.cpp:2208 +#: src/mail.cpp:2317 #, c-format msgid "does not claim the address: \"%s\"." msgstr "" -#: src/mail.cpp:2221 +#: src/mail.cpp:2330 msgid "is not certified by any trustworthy key." msgstr "" -#: src/mail.cpp:2225 +#: src/mail.cpp:2334 msgid "" "is not certified by a trustworthy Certificate Authority or the Certificate " "Authority is unknown." msgstr "" -#: src/mail.cpp:2230 +#: src/mail.cpp:2339 msgid "The sender marked this address as revoked." msgstr "" -#: src/mail.cpp:2234 +#: src/mail.cpp:2343 msgid "is marked as not trustworthy." msgstr "" -#: src/mail.cpp:2244 +#: src/mail.cpp:2353 #, fuzzy msgid "The signature is VS-NfD-compliant." msgstr "Cette signature est valide\n" -#: src/mail.cpp:2248 +#: src/mail.cpp:2357 #, fuzzy msgid "The signature is not VS-NfD-compliant." msgstr "Cette signature est valide\n" -#: src/mail.cpp:2256 +#: src/mail.cpp:2365 #, fuzzy msgid "The encryption is VS-NfD-compliant." msgstr "Cette signature est valide\n" -#: src/mail.cpp:2260 +#: src/mail.cpp:2369 #, fuzzy msgid "The encryption is not VS-NfD-compliant." msgstr "Cette signature est valide\n" -#: src/mail.cpp:2271 +#: src/mail.cpp:2380 msgid "Click here to change the key used for this address." msgstr "" -#: src/mail.cpp:2275 +#: src/mail.cpp:2384 msgid "Click here for details about the key." msgstr "" -#: src/mail.cpp:2276 +#: src/mail.cpp:2385 msgid "Click here for details about the certificate." msgstr "" -#: src/mail.cpp:2280 +#: src/mail.cpp:2389 msgid "Click here to search the key on the configured keyserver." msgstr "" -#: src/mail.cpp:2281 +#: src/mail.cpp:2390 msgid "Click here to search the certificate on the configured X509 keyserver." msgstr "" -#: src/mail.cpp:2509 +#: src/mail.cpp:2678 #, fuzzy msgid "GpgOL: Encryption not possible!" msgstr "D?chiffrer le message" -#: src/mail.cpp:2511 +#: src/mail.cpp:2680 msgid "" "Outlook returned an error when trying to send the encrypted mail.\n" "\n" @@ -704,11 +709,11 @@ msgstr "" "et non des messages RTF. Merci de v?rifier que seul le format texte\n" "a ?t? s?lectionn?." -#: src/mailitem-events.cpp:295 +#: src/mailitem-events.cpp:313 src/mailitem-events.cpp:805 msgid "Sorry, that's not possible, yet" msgstr "" -#: src/mailitem-events.cpp:297 +#: src/mailitem-events.cpp:315 #, c-format msgid "" "GpgOL has prevented the change to the \"%s\" property.\n" @@ -720,16 +725,23 @@ msgid "" "For example by right clicking but not selecting the message.\n" msgstr "" +#: src/mailitem-events.cpp:802 +msgid "" +"Attachments are part of the crypto message.\n" +"They can't be permanently removed and will be shown again the next time this " +"message is opened." +msgstr "" + #: src/main.c:466 #, c-format msgid "Note: Using compatibility flags: %s" msgstr "Note?: Utilisation de marqueurs de compatibilit??: %s" -#: src/mapihelp.cpp:1886 src/mapihelp.cpp:1894 src/mapihelp.cpp:1902 +#: src/mapihelp.cpp:1918 src/mapihelp.cpp:1926 src/mapihelp.cpp:1934 msgid "[no subject]" msgstr "[pas de sujet]" -#: src/mapihelp.cpp:2527 +#: src/mapihelp.cpp:2559 msgid "" "[The content of this message is not visible because it has been decrypted by " "another Outlook session. Use the \"decrypt/verify\" command to make it " @@ -739,7 +751,7 @@ msgstr "" "autre session Outlook. Utiliser la commande \"d?chiffrer/v?rifier\" afin de " "le rendre visible]" -#: src/mapihelp.cpp:3421 +#: src/mapihelp.cpp:3453 msgid "" "[The content of this message is not visible due to an processing error in " "GpgOL.]" @@ -1069,21 +1081,21 @@ msgstr "" msgid "GpgOL: Request confirmed!" msgstr "" -#: src/cryptcontroller.cpp:393 +#: src/cryptcontroller.cpp:404 #, fuzzy msgid "Resolving recipients..." msgstr "Destinataires s?lectionn?s?:" -#: src/cryptcontroller.cpp:397 +#: src/cryptcontroller.cpp:408 msgid "Resolving signers..." msgstr "" -#: src/cryptcontroller.cpp:1004 +#: src/cryptcontroller.cpp:1042 #, fuzzy msgid "Encrypting..." msgstr "Chiffrement" -#: src/cryptcontroller.cpp:1008 +#: src/cryptcontroller.cpp:1046 msgid "Signing..." msgstr "" diff --git a/po/pt.po b/po/pt.po index 7b03a14..04122d7 100644 --- a/po/pt.po +++ b/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GpgOL 1.1.1\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" -"POT-Creation-Date: 2018-03-21 13:02+0100\n" +"POT-Creation-Date: 2018-04-12 12:58+0200\n" "PO-Revision-Date: 2018-03-09 11:00+0000\n" "Last-Translator: Marco A.G.Pinto \n" "Language-Team: Portuguese \n" @@ -78,7 +78,7 @@ msgstr "Mudar a interface necessita reiniciar o Outlook." #: src/gpgoladdin.cpp:864 src/gpgoladdin.cpp:907 src/gpgoladdin.cpp:980 #: src/gpgoladdin.cpp:982 src/gpgoladdin.cpp:1018 src/gpgoladdin.cpp:1172 #: src/gpgoladdin.cpp:1255 src/gpgoladdin.cpp:1261 src/gpgoladdin.cpp:1334 -#: src/gpgoladdin.cpp:1338 src/mail.cpp:761 src/main.c:467 src/message.cpp:303 +#: src/gpgoladdin.cpp:1338 src/main.c:467 src/message.cpp:303 #: src/ribbon-callbacks.cpp:134 src/ribbon-callbacks.cpp:248 #: src/ribbon-callbacks.cpp:263 src/ribbon-callbacks.cpp:275 #: src/ribbon-callbacks.cpp:312 src/ribbon-callbacks.cpp:324 @@ -124,6 +124,11 @@ msgstr "N?o foi poss?vel iniciar o gestor de certificados" msgid "GpgOL - Save attachment" msgstr "GpgOL - Guardar anexo" +#: src/common.c:1073 +#, fuzzy +msgid "GpgOL Error" +msgstr "GpgOL" + #: src/config-dialog.c:38 msgid "Debug output (for analysing problems)" msgstr "Debug output (para analisar problemas)" @@ -175,11 +180,11 @@ msgstr "" msgid "Do you want to revert this folder?" msgstr "Queres reverter esta pasta?" -#: src/gpgoladdin.cpp:446 src/mail.cpp:1685 src/mail.cpp:1756 +#: src/gpgoladdin.cpp:446 src/mail.cpp:1794 src/mail.cpp:1865 msgid "GpgOL: Encrypted Message" msgstr "GpgOL: Mensagem Encriptada" -#: src/gpgoladdin.cpp:447 src/mail.cpp:1686 src/mail.cpp:1757 +#: src/gpgoladdin.cpp:447 src/mail.cpp:1795 src/mail.cpp:1866 msgid "GpgOL: Trusted Sender Address" msgstr "GpgOL: Endere?o de Remetente Confi?vel" @@ -383,7 +388,7 @@ msgstr "" "Esta ? uma mensagem encriptada.\n" "Clica para mais informa??o. " -#: src/mail.cpp:323 +#: src/mail.cpp:325 msgid "" "Not all attachments were encrypted or signed.\n" "The unsigned / unencrypted attachments are:\n" @@ -393,7 +398,7 @@ msgstr "" "Os anexos n?o-assinados / n?o-encriptados s?o:\n" "\n" -#: src/mail.cpp:328 +#: src/mail.cpp:330 msgid "" "Not all attachments were signed.\n" "The unsigned attachments are:\n" @@ -403,7 +408,7 @@ msgstr "" "Os anexos n?o-assinados s?o:\n" "\n" -#: src/mail.cpp:333 +#: src/mail.cpp:335 msgid "" "Not all attachments were encrypted.\n" "The unencrypted attachments are:\n" @@ -413,7 +418,7 @@ msgstr "" "Os anexos n?o-encriptados s?o:\n" "\n" -#: src/mail.cpp:373 +#: src/mail.cpp:375 msgid "" "Note: The attachments may be encrypted or signed on a file level but the " "GpgOL status does not apply to them." @@ -421,15 +426,15 @@ msgstr "" "Nota: Os anexos podem ser encriptados ou assinados ao n?vel de ficheiro, mas " "o status do GpgOL n?o se aplica a eles." -#: src/mail.cpp:376 +#: src/mail.cpp:378 msgid "GpgOL Warning" msgstr "Aviso do GpgOL" -#: src/mail.cpp:843 +#: src/mail.cpp:925 msgid "Pubkey directory confirmation" msgstr "Confirma??o de diretoria Pubkey" -#: src/mail.cpp:844 +#: src/mail.cpp:926 msgid "" "This is a confirmation request to publish your Pubkey in the directory for " "your domain.\n" @@ -443,21 +448,21 @@ msgstr "" "

Se n?o pediste para publicar a tua Pubkey na diretoria do teu provedor, " "simplesmente ignora esta mensagem.

\n" -#: src/mail.cpp:852 src/mail.cpp:2000 +#: src/mail.cpp:934 src/mail.cpp:2109 msgid "Encrypted message" msgstr "Mensagem encriptada" -#: src/mail.cpp:853 +#: src/mail.cpp:935 msgid "Please wait while the message is being decrypted / verified..." msgstr "" "Por favor, aguarda enquanto a mensagem est? a ser desencriptada / " "verificada..." -#: src/mail.cpp:1132 +#: src/mail.cpp:1234 msgid "GpgOL: Oops, G Suite Sync account detected" msgstr "GpgOL: Oops, conta G Suite Sync detetada" -#: src/mail.cpp:1134 +#: src/mail.cpp:1236 msgid "" "G Suite Sync breaks outgoing crypto mails with attachments.\n" "Using crypto and attachments with G Suite Sync is not supported.\n" @@ -469,91 +474,91 @@ msgstr "" "\n" "V?: https://dev.gnupg.org/T3545 para detalhes." -#: src/mail.cpp:1945 +#: src/mail.cpp:2054 msgid "Security Level 4" msgstr "N?vel de seguran?a 4" -#: src/mail.cpp:1949 +#: src/mail.cpp:2058 msgid "Trust Level 4" msgstr "N?vel de Confian?a 4" -#: src/mail.cpp:1953 +#: src/mail.cpp:2062 msgid "Security Level 3" msgstr "N?vel de Seguran?a 3" -#: src/mail.cpp:1957 +#: src/mail.cpp:2066 msgid "Trust Level 3" msgstr "N?vel de Confian?a 3" -#: src/mail.cpp:1961 +#: src/mail.cpp:2070 msgid "Security Level 2" msgstr "N?vel de Seguran?a 2" -#: src/mail.cpp:1965 +#: src/mail.cpp:2074 msgid "Trust Level 2" msgstr "N?vel de Confian?a 2" -#: src/mail.cpp:1969 +#: src/mail.cpp:2078 msgid "Encrypted" msgstr "Encriptada" -#: src/mail.cpp:1978 src/mail.cpp:1980 src/ribbon-callbacks.cpp:1631 +#: src/mail.cpp:2087 src/mail.cpp:2089 src/ribbon-callbacks.cpp:1631 msgid "Insecure" msgstr "Insegura" -#: src/mail.cpp:1992 +#: src/mail.cpp:2101 msgid "Signed and encrypted message" msgstr "Mensagem assinada e encriptada" -#: src/mail.cpp:1996 +#: src/mail.cpp:2105 msgid "Signed message" msgstr "Mensagem assinada" -#: src/mail.cpp:2003 src/ribbon-callbacks.cpp:1654 +#: src/mail.cpp:2112 src/ribbon-callbacks.cpp:1654 msgid "Insecure message" msgstr "Mensagem insegura" -#: src/mail.cpp:2014 src/mail.cpp:2025 +#: src/mail.cpp:2123 src/mail.cpp:2134 msgid "You cannot be sure who sent, modified and read the message in transit." msgstr "" "N?o podes ter a certeza de quem enviou, modificou e leu a mensagem em " "tr?nsito." -#: src/mail.cpp:2017 +#: src/mail.cpp:2126 msgid "The message was signed but the verification failed with:" msgstr "A mensagem foi assinada, mas a verifica??o falhou com:" -#: src/mail.cpp:2035 +#: src/mail.cpp:2144 msgid "The encryption was VS-NfD-compliant." msgstr "A encripta??o est? em conformidade com VS-NfD." -#: src/mail.cpp:2039 +#: src/mail.cpp:2148 msgid "The encryption was not VS-NfD-compliant." msgstr "A encripta??o n?o est? em conformidade com VS-NfD." -#: src/mail.cpp:2043 +#: src/mail.cpp:2152 msgid "You cannot be sure who sent the message because it is not signed." msgstr "" "N?o podes ter certeza de quem enviou a mensagem, porque n?o est? assinada." -#: src/mail.cpp:2066 +#: src/mail.cpp:2175 msgid "You signed this message." msgstr "Assinaste esta mensagem." -#: src/mail.cpp:2070 +#: src/mail.cpp:2179 msgid "The senders identity was certified by yourself." msgstr "A identidade dos remetentes foi certificada por ti pr?prio." -#: src/mail.cpp:2074 +#: src/mail.cpp:2183 msgid "The sender is allowed to certify identities for you." msgstr "O remetente pode certificar identidades para ti." -#: src/mail.cpp:2087 +#: src/mail.cpp:2196 msgid "The senders identity was certified by several trusted people." msgstr "" "A identidade dos remetentes foi certificada por v?rias pessoas confi?veis." -#: src/mail.cpp:2092 +#: src/mail.cpp:2201 #, c-format msgid "" "The senders identity is certified by the trusted issuer:\n" @@ -562,11 +567,11 @@ msgstr "" "A identidade dos remetentes ? certificada pelo emissor confi?vel:\n" "'%s'\n" -#: src/mail.cpp:2100 +#: src/mail.cpp:2209 msgid "Some trusted people have certified the senders identity." msgstr "Algumas pessoas confi?veis certificaram a identidade dos remetentes." -#: src/mail.cpp:2110 +#: src/mail.cpp:2219 #, c-format msgid "" "The senders address is trusted, because you have established a communication " @@ -577,11 +582,11 @@ msgstr "" "comunica??o com este endere?o desde %s.\n" "Encriptaste %i e verificaste %i mensagens desde ent?o." -#: src/mail.cpp:2126 +#: src/mail.cpp:2235 msgid "The senders signature was verified for the first time." msgstr "A assinatura dos remetentes foi verificada pela primeira vez." -#: src/mail.cpp:2133 +#: src/mail.cpp:2242 #, c-format msgid "" "The senders address is not trustworthy yet because you only verified %i " @@ -590,68 +595,68 @@ msgstr "" "O endere?o dos remetentes ainda n?o ? confi?vel porque apenas verificaste %i " "mensagens e encriptaste %i mensagens a eles desde %s." -#: src/mail.cpp:2147 +#: src/mail.cpp:2256 msgid "But the sender address is not trustworthy because:" msgstr "Mas o endere?o do remetente n?o ? confi?vel porque:" -#: src/mail.cpp:2148 +#: src/mail.cpp:2257 msgid "The sender address is not trustworthy because:" msgstr "O endere?o do remetente n?o ? confi?vel porque:" -#: src/mail.cpp:2156 +#: src/mail.cpp:2265 msgid "The signature is invalid: \n" msgstr "A assinatura ? inv?lida: \n" -#: src/mail.cpp:2161 +#: src/mail.cpp:2270 msgid "There was an error verifying the signature.\n" msgstr "Houve um erro ao verificar a assinatura.\n" -#: src/mail.cpp:2165 +#: src/mail.cpp:2274 msgid "The signature is expired.\n" msgstr "A assinatura expirou.\n" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 msgid "The used key" msgstr "A chave usada" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 msgid "The used certificate" msgstr "O certificado usado" -#: src/mail.cpp:2177 +#: src/mail.cpp:2286 msgid "is not available." msgstr "n?o est? dispon?vel." -#: src/mail.cpp:2181 +#: src/mail.cpp:2290 msgid "is revoked." msgstr "est? revogado." -#: src/mail.cpp:2185 +#: src/mail.cpp:2294 msgid "is expired." msgstr "expirou." -#: src/mail.cpp:2189 +#: src/mail.cpp:2298 msgid "is not meant for signing." msgstr "n?o ? destinado a assinar." -#: src/mail.cpp:2193 src/mail.cpp:2197 +#: src/mail.cpp:2302 src/mail.cpp:2306 msgid "could not be checked for revocation." msgstr "n?o pode ser verificado para revoga??o." -#: src/mail.cpp:2202 +#: src/mail.cpp:2311 msgid "is not the same as the key that was used for this address in the past." msgstr "n?o ? o mesmo que a chave usada para este endere?o no passado." -#: src/mail.cpp:2208 +#: src/mail.cpp:2317 #, c-format msgid "does not claim the address: \"%s\"." msgstr "n?o reivindica o endere?o: \"%s\"." -#: src/mail.cpp:2221 +#: src/mail.cpp:2330 msgid "is not certified by any trustworthy key." msgstr "n?o est? certificado por qualquer chave confi?vel." -#: src/mail.cpp:2225 +#: src/mail.cpp:2334 msgid "" "is not certified by a trustworthy Certificate Authority or the Certificate " "Authority is unknown." @@ -659,57 +664,57 @@ msgstr "" "n?o est? certificado por uma Autoridade de Certifica??o confi?vel ou a " "Autoridade de Certifica??o ? desconhecida." -#: src/mail.cpp:2230 +#: src/mail.cpp:2339 msgid "The sender marked this address as revoked." msgstr "O remetente marcou este endere?o como revogado." -#: src/mail.cpp:2234 +#: src/mail.cpp:2343 msgid "is marked as not trustworthy." msgstr "est? marcado como n?o confi?vel." -#: src/mail.cpp:2244 +#: src/mail.cpp:2353 msgid "The signature is VS-NfD-compliant." msgstr "A assinatura est? em conformidade com VS-NfD." -#: src/mail.cpp:2248 +#: src/mail.cpp:2357 msgid "The signature is not VS-NfD-compliant." msgstr "A assinatura n?o est? em conformidade com VS-NfD." -#: src/mail.cpp:2256 +#: src/mail.cpp:2365 msgid "The encryption is VS-NfD-compliant." msgstr "A encripta??o est? em conformidade com VS-NfD." -#: src/mail.cpp:2260 +#: src/mail.cpp:2369 msgid "The encryption is not VS-NfD-compliant." msgstr "A encripta??o n?o est? em conformidade com VS-NfD." -#: src/mail.cpp:2271 +#: src/mail.cpp:2380 msgid "Click here to change the key used for this address." msgstr "Clica aqui para alterar a chave usada para este endere?o." -#: src/mail.cpp:2275 +#: src/mail.cpp:2384 msgid "Click here for details about the key." msgstr "Clica aqui para obter detalhes sobre a chave." -#: src/mail.cpp:2276 +#: src/mail.cpp:2385 msgid "Click here for details about the certificate." msgstr "Clica aqui para obter detalhes sobre o certificado." -#: src/mail.cpp:2280 +#: src/mail.cpp:2389 msgid "Click here to search the key on the configured keyserver." msgstr "Clica aqui para localizar a chave no servidor de chaves configurado." -#: src/mail.cpp:2281 +#: src/mail.cpp:2390 msgid "Click here to search the certificate on the configured X509 keyserver." msgstr "" "Clica aqui para localizar o certificado no servidor de chaves X509 " "configurado." -#: src/mail.cpp:2509 +#: src/mail.cpp:2678 msgid "GpgOL: Encryption not possible!" msgstr "GpgOL: Encripta??o n?o poss?vel!" -#: src/mail.cpp:2511 +#: src/mail.cpp:2680 msgid "" "Outlook returned an error when trying to send the encrypted mail.\n" "\n" @@ -735,11 +740,11 @@ msgstr "" "n?o mensagens RTF. Por favor, certifica-te que apenas o formato\n" "de texto foi selecionado." -#: src/mailitem-events.cpp:295 +#: src/mailitem-events.cpp:313 src/mailitem-events.cpp:805 msgid "Sorry, that's not possible, yet" msgstr "Desculpa, isso n?o ? poss?vel, ainda" -#: src/mailitem-events.cpp:297 +#: src/mailitem-events.cpp:315 #, c-format msgid "" "GpgOL has prevented the change to the \"%s\" property.\n" @@ -761,16 +766,23 @@ msgstr "" "Por exemplo, ao clicar com o bot?o direito do rato, mas n?o selecionar a " "mensagem.\n" +#: src/mailitem-events.cpp:802 +msgid "" +"Attachments are part of the crypto message.\n" +"They can't be permanently removed and will be shown again the next time this " +"message is opened." +msgstr "" + #: src/main.c:466 #, c-format msgid "Note: Using compatibility flags: %s" msgstr "Nota: A usar sinalizadores de compatibilidade: %s" -#: src/mapihelp.cpp:1886 src/mapihelp.cpp:1894 src/mapihelp.cpp:1902 +#: src/mapihelp.cpp:1918 src/mapihelp.cpp:1926 src/mapihelp.cpp:1934 msgid "[no subject]" msgstr "[sem assunto]" -#: src/mapihelp.cpp:2527 +#: src/mapihelp.cpp:2559 msgid "" "[The content of this message is not visible because it has been decrypted by " "another Outlook session. Use the \"decrypt/verify\" command to make it " @@ -780,7 +792,7 @@ msgstr "" "sess?o do Outlook. Usa o comando \"desencriptar/verificar\" para torn?-lo " "vis?vel]" -#: src/mapihelp.cpp:3421 +#: src/mapihelp.cpp:3453 msgid "" "[The content of this message is not visible due to an processing error in " "GpgOL.]" @@ -1148,19 +1160,19 @@ msgstr "A tua Pubkey pode ser brevemente recuperada do teu dom?nio." msgid "GpgOL: Request confirmed!" msgstr "GpgOL: Pedido confirmado!" -#: src/cryptcontroller.cpp:393 +#: src/cryptcontroller.cpp:404 msgid "Resolving recipients..." msgstr "A resolver destinat?rios..." -#: src/cryptcontroller.cpp:397 +#: src/cryptcontroller.cpp:408 msgid "Resolving signers..." msgstr "A resolver assinantes..." -#: src/cryptcontroller.cpp:1004 +#: src/cryptcontroller.cpp:1042 msgid "Encrypting..." msgstr "A encriptar..." -#: src/cryptcontroller.cpp:1008 +#: src/cryptcontroller.cpp:1046 msgid "Signing..." msgstr "A assinar..." diff --git a/po/sv.po b/po/sv.po index 9ba884a..bcff6f3 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GPGol\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" -"POT-Creation-Date: 2018-03-21 13:02+0100\n" +"POT-Creation-Date: 2018-04-12 12:58+0200\n" "PO-Revision-Date: 2006-12-12 23:52+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -75,7 +75,7 @@ msgstr "" #: src/gpgoladdin.cpp:864 src/gpgoladdin.cpp:907 src/gpgoladdin.cpp:980 #: src/gpgoladdin.cpp:982 src/gpgoladdin.cpp:1018 src/gpgoladdin.cpp:1172 #: src/gpgoladdin.cpp:1255 src/gpgoladdin.cpp:1261 src/gpgoladdin.cpp:1334 -#: src/gpgoladdin.cpp:1338 src/mail.cpp:761 src/main.c:467 src/message.cpp:303 +#: src/gpgoladdin.cpp:1338 src/main.c:467 src/message.cpp:303 #: src/ribbon-callbacks.cpp:134 src/ribbon-callbacks.cpp:248 #: src/ribbon-callbacks.cpp:263 src/ribbon-callbacks.cpp:275 #: src/ribbon-callbacks.cpp:312 src/ribbon-callbacks.cpp:324 @@ -123,6 +123,11 @@ msgstr "Kunde inte starta nyckelhanteraren" msgid "GpgOL - Save attachment" msgstr "GPG - Spara dekrypterad bilaga" +#: src/common.c:1073 +#, fuzzy +msgid "GpgOL Error" +msgstr "In-/Ut-fel" + #: src/config-dialog.c:38 msgid "Debug output (for analysing problems)" msgstr "" @@ -164,12 +169,12 @@ msgstr "" msgid "Do you want to revert this folder?" msgstr "" -#: src/gpgoladdin.cpp:446 src/mail.cpp:1685 src/mail.cpp:1756 +#: src/gpgoladdin.cpp:446 src/mail.cpp:1794 src/mail.cpp:1865 #, fuzzy msgid "GpgOL: Encrypted Message" msgstr "Dekryptera och validera meddelandet." -#: src/gpgoladdin.cpp:447 src/mail.cpp:1686 src/mail.cpp:1757 +#: src/gpgoladdin.cpp:447 src/mail.cpp:1795 src/mail.cpp:1866 msgid "GpgOL: Trusted Sender Address" msgstr "" @@ -367,42 +372,42 @@ msgid "" "Click for more information. " msgstr "" -#: src/mail.cpp:323 +#: src/mail.cpp:325 msgid "" "Not all attachments were encrypted or signed.\n" "The unsigned / unencrypted attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:328 +#: src/mail.cpp:330 msgid "" "Not all attachments were signed.\n" "The unsigned attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:333 +#: src/mail.cpp:335 msgid "" "Not all attachments were encrypted.\n" "The unencrypted attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:373 +#: src/mail.cpp:375 msgid "" "Note: The attachments may be encrypted or signed on a file level but the " "GpgOL status does not apply to them." msgstr "" -#: src/mail.cpp:376 +#: src/mail.cpp:378 msgid "GpgOL Warning" msgstr "" -#: src/mail.cpp:843 +#: src/mail.cpp:925 msgid "Pubkey directory confirmation" msgstr "" -#: src/mail.cpp:844 +#: src/mail.cpp:926 msgid "" "This is a confirmation request to publish your Pubkey in the directory for " "your domain.\n" @@ -411,20 +416,20 @@ msgid "" "directory, simply ignore this message.

\n" msgstr "" -#: src/mail.cpp:852 src/mail.cpp:2000 +#: src/mail.cpp:934 src/mail.cpp:2109 #, fuzzy msgid "Encrypted message" msgstr "Dekryptera och validera meddelandet." -#: src/mail.cpp:853 +#: src/mail.cpp:935 msgid "Please wait while the message is being decrypted / verified..." msgstr "" -#: src/mail.cpp:1132 +#: src/mail.cpp:1234 msgid "GpgOL: Oops, G Suite Sync account detected" msgstr "" -#: src/mail.cpp:1134 +#: src/mail.cpp:1236 msgid "" "G Suite Sync breaks outgoing crypto mails with attachments.\n" "Using crypto and attachments with G Suite Sync is not supported.\n" @@ -432,105 +437,105 @@ msgid "" "See: https://dev.gnupg.org/T3545 for details." msgstr "" -#: src/mail.cpp:1945 +#: src/mail.cpp:2054 msgid "Security Level 4" msgstr "" -#: src/mail.cpp:1949 +#: src/mail.cpp:2058 msgid "Trust Level 4" msgstr "" -#: src/mail.cpp:1953 +#: src/mail.cpp:2062 msgid "Security Level 3" msgstr "" -#: src/mail.cpp:1957 +#: src/mail.cpp:2066 msgid "Trust Level 3" msgstr "" -#: src/mail.cpp:1961 +#: src/mail.cpp:2070 msgid "Security Level 2" msgstr "" -#: src/mail.cpp:1965 +#: src/mail.cpp:2074 msgid "Trust Level 2" msgstr "" -#: src/mail.cpp:1969 +#: src/mail.cpp:2078 #, fuzzy msgid "Encrypted" msgstr "Kryptering" -#: src/mail.cpp:1978 src/mail.cpp:1980 src/ribbon-callbacks.cpp:1631 +#: src/mail.cpp:2087 src/mail.cpp:2089 src/ribbon-callbacks.cpp:1631 msgid "Insecure" msgstr "" -#: src/mail.cpp:1992 +#: src/mail.cpp:2101 #, fuzzy msgid "Signed and encrypted message" msgstr "Dekryptera och validera meddelandet." -#: src/mail.cpp:1996 +#: src/mail.cpp:2105 #, fuzzy msgid "Signed message" msgstr "Dekryptera och validera meddelandet." -#: src/mail.cpp:2003 src/ribbon-callbacks.cpp:1654 +#: src/mail.cpp:2112 src/ribbon-callbacks.cpp:1654 #, fuzzy msgid "Insecure message" msgstr "Dekryptera och validera meddelandet." -#: src/mail.cpp:2014 src/mail.cpp:2025 +#: src/mail.cpp:2123 src/mail.cpp:2134 msgid "You cannot be sure who sent, modified and read the message in transit." msgstr "" -#: src/mail.cpp:2017 +#: src/mail.cpp:2126 msgid "The message was signed but the verification failed with:" msgstr "" -#: src/mail.cpp:2035 +#: src/mail.cpp:2144 #, fuzzy msgid "The encryption was VS-NfD-compliant." msgstr "Den h?r signaturen ?r giltig\n" -#: src/mail.cpp:2039 +#: src/mail.cpp:2148 #, fuzzy msgid "The encryption was not VS-NfD-compliant." msgstr "Den h?r signaturen ?r giltig\n" -#: src/mail.cpp:2043 +#: src/mail.cpp:2152 msgid "You cannot be sure who sent the message because it is not signed." msgstr "" -#: src/mail.cpp:2066 +#: src/mail.cpp:2175 #, fuzzy msgid "You signed this message." msgstr "Dekryptera och validera meddelandet." -#: src/mail.cpp:2070 +#: src/mail.cpp:2179 msgid "The senders identity was certified by yourself." msgstr "" -#: src/mail.cpp:2074 +#: src/mail.cpp:2183 msgid "The sender is allowed to certify identities for you." msgstr "" -#: src/mail.cpp:2087 +#: src/mail.cpp:2196 msgid "The senders identity was certified by several trusted people." msgstr "" -#: src/mail.cpp:2092 +#: src/mail.cpp:2201 #, c-format msgid "" "The senders identity is certified by the trusted issuer:\n" "'%s'\n" msgstr "" -#: src/mail.cpp:2100 +#: src/mail.cpp:2209 msgid "Some trusted people have certified the senders identity." msgstr "" -#: src/mail.cpp:2110 +#: src/mail.cpp:2219 #, c-format msgid "" "The senders address is trusted, because you have established a communication " @@ -538,142 +543,142 @@ msgid "" "You encrypted %i and verified %i messages since." msgstr "" -#: src/mail.cpp:2126 +#: src/mail.cpp:2235 msgid "The senders signature was verified for the first time." msgstr "" -#: src/mail.cpp:2133 +#: src/mail.cpp:2242 #, c-format msgid "" "The senders address is not trustworthy yet because you only verified %i " "messages and encrypted %i messages to it since %s." msgstr "" -#: src/mail.cpp:2147 +#: src/mail.cpp:2256 msgid "But the sender address is not trustworthy because:" msgstr "" -#: src/mail.cpp:2148 +#: src/mail.cpp:2257 msgid "The sender address is not trustworthy because:" msgstr "" -#: src/mail.cpp:2156 +#: src/mail.cpp:2265 #, fuzzy msgid "The signature is invalid: \n" msgstr "Den h?r signaturen ?r giltig\n" -#: src/mail.cpp:2161 +#: src/mail.cpp:2270 msgid "There was an error verifying the signature.\n" msgstr "" -#: src/mail.cpp:2165 +#: src/mail.cpp:2274 #, fuzzy msgid "The signature is expired.\n" msgstr "Den h?r signaturen ?r giltig\n" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 msgid "The used key" msgstr "" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 #, fuzzy msgid "The used certificate" msgstr "Validering" -#: src/mail.cpp:2177 +#: src/mail.cpp:2286 #, fuzzy msgid "is not available." msgstr "Sp?rrlistan ?r inte tillg?nglig\n" -#: src/mail.cpp:2181 +#: src/mail.cpp:2290 msgid "is revoked." msgstr "" -#: src/mail.cpp:2185 +#: src/mail.cpp:2294 msgid "is expired." msgstr "" -#: src/mail.cpp:2189 +#: src/mail.cpp:2298 msgid "is not meant for signing." msgstr "" -#: src/mail.cpp:2193 src/mail.cpp:2197 +#: src/mail.cpp:2302 src/mail.cpp:2306 msgid "could not be checked for revocation." msgstr "" -#: src/mail.cpp:2202 +#: src/mail.cpp:2311 msgid "is not the same as the key that was used for this address in the past." msgstr "" -#: src/mail.cpp:2208 +#: src/mail.cpp:2317 #, c-format msgid "does not claim the address: \"%s\"." msgstr "" -#: src/mail.cpp:2221 +#: src/mail.cpp:2330 msgid "is not certified by any trustworthy key." msgstr "" -#: src/mail.cpp:2225 +#: src/mail.cpp:2334 msgid "" "is not certified by a trustworthy Certificate Authority or the Certificate " "Authority is unknown." msgstr "" -#: src/mail.cpp:2230 +#: src/mail.cpp:2339 msgid "The sender marked this address as revoked." msgstr "" -#: src/mail.cpp:2234 +#: src/mail.cpp:2343 msgid "is marked as not trustworthy." msgstr "" -#: src/mail.cpp:2244 +#: src/mail.cpp:2353 #, fuzzy msgid "The signature is VS-NfD-compliant." msgstr "Den h?r signaturen ?r giltig\n" -#: src/mail.cpp:2248 +#: src/mail.cpp:2357 #, fuzzy msgid "The signature is not VS-NfD-compliant." msgstr "Den h?r signaturen ?r giltig\n" -#: src/mail.cpp:2256 +#: src/mail.cpp:2365 #, fuzzy msgid "The encryption is VS-NfD-compliant." msgstr "Den h?r signaturen ?r giltig\n" -#: src/mail.cpp:2260 +#: src/mail.cpp:2369 #, fuzzy msgid "The encryption is not VS-NfD-compliant." msgstr "Den h?r signaturen ?r giltig\n" -#: src/mail.cpp:2271 +#: src/mail.cpp:2380 msgid "Click here to change the key used for this address." msgstr "" -#: src/mail.cpp:2275 +#: src/mail.cpp:2384 msgid "Click here for details about the key." msgstr "" -#: src/mail.cpp:2276 +#: src/mail.cpp:2385 msgid "Click here for details about the certificate." msgstr "" -#: src/mail.cpp:2280 +#: src/mail.cpp:2389 msgid "Click here to search the key on the configured keyserver." msgstr "" -#: src/mail.cpp:2281 +#: src/mail.cpp:2390 msgid "Click here to search the certificate on the configured X509 keyserver." msgstr "" -#: src/mail.cpp:2509 +#: src/mail.cpp:2678 #, fuzzy msgid "GpgOL: Encryption not possible!" msgstr "Dekryptera och validera meddelandet." -#: src/mail.cpp:2511 +#: src/mail.cpp:2680 msgid "" "Outlook returned an error when trying to send the encrypted mail.\n" "\n" @@ -694,11 +699,11 @@ msgstr "" "och inte RTF-meddelanden. Se till att endast textformatet\n" "har valts i inst?llningarna." -#: src/mailitem-events.cpp:295 +#: src/mailitem-events.cpp:313 src/mailitem-events.cpp:805 msgid "Sorry, that's not possible, yet" msgstr "" -#: src/mailitem-events.cpp:297 +#: src/mailitem-events.cpp:315 #, c-format msgid "" "GpgOL has prevented the change to the \"%s\" property.\n" @@ -710,23 +715,30 @@ msgid "" "For example by right clicking but not selecting the message.\n" msgstr "" +#: src/mailitem-events.cpp:802 +msgid "" +"Attachments are part of the crypto message.\n" +"They can't be permanently removed and will be shown again the next time this " +"message is opened." +msgstr "" + #: src/main.c:466 #, c-format msgid "Note: Using compatibility flags: %s" msgstr "" -#: src/mapihelp.cpp:1886 src/mapihelp.cpp:1894 src/mapihelp.cpp:1902 +#: src/mapihelp.cpp:1918 src/mapihelp.cpp:1926 src/mapihelp.cpp:1934 msgid "[no subject]" msgstr "" -#: src/mapihelp.cpp:2527 +#: src/mapihelp.cpp:2559 msgid "" "[The content of this message is not visible because it has been decrypted by " "another Outlook session. Use the \"decrypt/verify\" command to make it " "visible]" msgstr "" -#: src/mapihelp.cpp:3421 +#: src/mapihelp.cpp:3453 msgid "" "[The content of this message is not visible due to an processing error in " "GpgOL.]" @@ -1028,20 +1040,20 @@ msgstr "" msgid "GpgOL: Request confirmed!" msgstr "" -#: src/cryptcontroller.cpp:393 +#: src/cryptcontroller.cpp:404 msgid "Resolving recipients..." msgstr "" -#: src/cryptcontroller.cpp:397 +#: src/cryptcontroller.cpp:408 msgid "Resolving signers..." msgstr "" -#: src/cryptcontroller.cpp:1004 +#: src/cryptcontroller.cpp:1042 #, fuzzy msgid "Encrypting..." msgstr "Kryptering" -#: src/cryptcontroller.cpp:1008 +#: src/cryptcontroller.cpp:1046 msgid "Signing..." msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po index dba6840..6de3b27 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GpgOL\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" -"POT-Creation-Date: 2018-03-21 13:02+0100\n" +"POT-Creation-Date: 2018-04-12 12:58+0200\n" "PO-Revision-Date: 2015-08-15 21:58+0800\n" "Last-Translator: Mingye Wang (Arthur2e5) \n" "Language-Team: \n" @@ -76,7 +76,7 @@ msgstr "" #: src/gpgoladdin.cpp:864 src/gpgoladdin.cpp:907 src/gpgoladdin.cpp:980 #: src/gpgoladdin.cpp:982 src/gpgoladdin.cpp:1018 src/gpgoladdin.cpp:1172 #: src/gpgoladdin.cpp:1255 src/gpgoladdin.cpp:1261 src/gpgoladdin.cpp:1334 -#: src/gpgoladdin.cpp:1338 src/mail.cpp:761 src/main.c:467 src/message.cpp:303 +#: src/gpgoladdin.cpp:1338 src/main.c:467 src/message.cpp:303 #: src/ribbon-callbacks.cpp:134 src/ribbon-callbacks.cpp:248 #: src/ribbon-callbacks.cpp:263 src/ribbon-callbacks.cpp:275 #: src/ribbon-callbacks.cpp:312 src/ribbon-callbacks.cpp:324 @@ -123,6 +123,11 @@ msgstr "???????" msgid "GpgOL - Save attachment" msgstr "GpgOL - ????" +#: src/common.c:1073 +#, fuzzy +msgid "GpgOL Error" +msgstr "GpgOL" + #: src/config-dialog.c:38 msgid "Debug output (for analysing problems)" msgstr "????????????" @@ -168,12 +173,12 @@ msgstr "" msgid "Do you want to revert this folder?" msgstr "????????????" -#: src/gpgoladdin.cpp:446 src/mail.cpp:1685 src/mail.cpp:1756 +#: src/gpgoladdin.cpp:446 src/mail.cpp:1794 src/mail.cpp:1865 #, fuzzy msgid "GpgOL: Encrypted Message" msgstr "????" -#: src/gpgoladdin.cpp:447 src/mail.cpp:1686 src/mail.cpp:1757 +#: src/gpgoladdin.cpp:447 src/mail.cpp:1795 src/mail.cpp:1866 msgid "GpgOL: Trusted Sender Address" msgstr "" @@ -366,42 +371,42 @@ msgstr "" "???????\n" "???????????" -#: src/mail.cpp:323 +#: src/mail.cpp:325 msgid "" "Not all attachments were encrypted or signed.\n" "The unsigned / unencrypted attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:328 +#: src/mail.cpp:330 msgid "" "Not all attachments were signed.\n" "The unsigned attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:333 +#: src/mail.cpp:335 msgid "" "Not all attachments were encrypted.\n" "The unencrypted attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:373 +#: src/mail.cpp:375 msgid "" "Note: The attachments may be encrypted or signed on a file level but the " "GpgOL status does not apply to them." msgstr "" -#: src/mail.cpp:376 +#: src/mail.cpp:378 msgid "GpgOL Warning" msgstr "" -#: src/mail.cpp:843 +#: src/mail.cpp:925 msgid "Pubkey directory confirmation" msgstr "" -#: src/mail.cpp:844 +#: src/mail.cpp:926 msgid "" "This is a confirmation request to publish your Pubkey in the directory for " "your domain.\n" @@ -410,20 +415,20 @@ msgid "" "directory, simply ignore this message.

\n" msgstr "" -#: src/mail.cpp:852 src/mail.cpp:2000 +#: src/mail.cpp:934 src/mail.cpp:2109 #, fuzzy msgid "Encrypted message" msgstr "????" -#: src/mail.cpp:853 +#: src/mail.cpp:935 msgid "Please wait while the message is being decrypted / verified..." msgstr "" -#: src/mail.cpp:1132 +#: src/mail.cpp:1234 msgid "GpgOL: Oops, G Suite Sync account detected" msgstr "" -#: src/mail.cpp:1134 +#: src/mail.cpp:1236 msgid "" "G Suite Sync breaks outgoing crypto mails with attachments.\n" "Using crypto and attachments with G Suite Sync is not supported.\n" @@ -431,105 +436,105 @@ msgid "" "See: https://dev.gnupg.org/T3545 for details." msgstr "" -#: src/mail.cpp:1945 +#: src/mail.cpp:2054 msgid "Security Level 4" msgstr "" -#: src/mail.cpp:1949 +#: src/mail.cpp:2058 msgid "Trust Level 4" msgstr "" -#: src/mail.cpp:1953 +#: src/mail.cpp:2062 msgid "Security Level 3" msgstr "" -#: src/mail.cpp:1957 +#: src/mail.cpp:2066 msgid "Trust Level 3" msgstr "" -#: src/mail.cpp:1961 +#: src/mail.cpp:2070 msgid "Security Level 2" msgstr "" -#: src/mail.cpp:1965 +#: src/mail.cpp:2074 msgid "Trust Level 2" msgstr "" -#: src/mail.cpp:1969 +#: src/mail.cpp:2078 #, fuzzy msgid "Encrypted" msgstr "??" -#: src/mail.cpp:1978 src/mail.cpp:1980 src/ribbon-callbacks.cpp:1631 +#: src/mail.cpp:2087 src/mail.cpp:2089 src/ribbon-callbacks.cpp:1631 msgid "Insecure" msgstr "" -#: src/mail.cpp:1992 +#: src/mail.cpp:2101 #, fuzzy msgid "Signed and encrypted message" msgstr "????" -#: src/mail.cpp:1996 +#: src/mail.cpp:2105 #, fuzzy msgid "Signed message" msgstr "????" -#: src/mail.cpp:2003 src/ribbon-callbacks.cpp:1654 +#: src/mail.cpp:2112 src/ribbon-callbacks.cpp:1654 #, fuzzy msgid "Insecure message" msgstr "????" -#: src/mail.cpp:2014 src/mail.cpp:2025 +#: src/mail.cpp:2123 src/mail.cpp:2134 msgid "You cannot be sure who sent, modified and read the message in transit." msgstr "" -#: src/mail.cpp:2017 +#: src/mail.cpp:2126 msgid "The message was signed but the verification failed with:" msgstr "" -#: src/mail.cpp:2035 +#: src/mail.cpp:2144 #, fuzzy msgid "The encryption was VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2039 +#: src/mail.cpp:2148 #, fuzzy msgid "The encryption was not VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2043 +#: src/mail.cpp:2152 msgid "You cannot be sure who sent the message because it is not signed." msgstr "" -#: src/mail.cpp:2066 +#: src/mail.cpp:2175 #, fuzzy msgid "You signed this message." msgstr "????" -#: src/mail.cpp:2070 +#: src/mail.cpp:2179 msgid "The senders identity was certified by yourself." msgstr "" -#: src/mail.cpp:2074 +#: src/mail.cpp:2183 msgid "The sender is allowed to certify identities for you." msgstr "" -#: src/mail.cpp:2087 +#: src/mail.cpp:2196 msgid "The senders identity was certified by several trusted people." msgstr "" -#: src/mail.cpp:2092 +#: src/mail.cpp:2201 #, c-format msgid "" "The senders identity is certified by the trusted issuer:\n" "'%s'\n" msgstr "" -#: src/mail.cpp:2100 +#: src/mail.cpp:2209 msgid "Some trusted people have certified the senders identity." msgstr "" -#: src/mail.cpp:2110 +#: src/mail.cpp:2219 #, c-format msgid "" "The senders address is trusted, because you have established a communication " @@ -537,142 +542,142 @@ msgid "" "You encrypted %i and verified %i messages since." msgstr "" -#: src/mail.cpp:2126 +#: src/mail.cpp:2235 msgid "The senders signature was verified for the first time." msgstr "" -#: src/mail.cpp:2133 +#: src/mail.cpp:2242 #, c-format msgid "" "The senders address is not trustworthy yet because you only verified %i " "messages and encrypted %i messages to it since %s." msgstr "" -#: src/mail.cpp:2147 +#: src/mail.cpp:2256 msgid "But the sender address is not trustworthy because:" msgstr "" -#: src/mail.cpp:2148 +#: src/mail.cpp:2257 msgid "The sender address is not trustworthy because:" msgstr "" -#: src/mail.cpp:2156 +#: src/mail.cpp:2265 #, fuzzy msgid "The signature is invalid: \n" msgstr "????\n" -#: src/mail.cpp:2161 +#: src/mail.cpp:2270 msgid "There was an error verifying the signature.\n" msgstr "" -#: src/mail.cpp:2165 +#: src/mail.cpp:2274 #, fuzzy msgid "The signature is expired.\n" msgstr "????\n" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 msgid "The used key" msgstr "" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 #, fuzzy msgid "The used certificate" msgstr "????" -#: src/mail.cpp:2177 +#: src/mail.cpp:2286 #, fuzzy msgid "is not available." msgstr "???????CRL????\n" -#: src/mail.cpp:2181 +#: src/mail.cpp:2290 msgid "is revoked." msgstr "" -#: src/mail.cpp:2185 +#: src/mail.cpp:2294 msgid "is expired." msgstr "" -#: src/mail.cpp:2189 +#: src/mail.cpp:2298 msgid "is not meant for signing." msgstr "" -#: src/mail.cpp:2193 src/mail.cpp:2197 +#: src/mail.cpp:2302 src/mail.cpp:2306 msgid "could not be checked for revocation." msgstr "" -#: src/mail.cpp:2202 +#: src/mail.cpp:2311 msgid "is not the same as the key that was used for this address in the past." msgstr "" -#: src/mail.cpp:2208 +#: src/mail.cpp:2317 #, c-format msgid "does not claim the address: \"%s\"." msgstr "" -#: src/mail.cpp:2221 +#: src/mail.cpp:2330 msgid "is not certified by any trustworthy key." msgstr "" -#: src/mail.cpp:2225 +#: src/mail.cpp:2334 msgid "" "is not certified by a trustworthy Certificate Authority or the Certificate " "Authority is unknown." msgstr "" -#: src/mail.cpp:2230 +#: src/mail.cpp:2339 msgid "The sender marked this address as revoked." msgstr "" -#: src/mail.cpp:2234 +#: src/mail.cpp:2343 msgid "is marked as not trustworthy." msgstr "" -#: src/mail.cpp:2244 +#: src/mail.cpp:2353 #, fuzzy msgid "The signature is VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2248 +#: src/mail.cpp:2357 #, fuzzy msgid "The signature is not VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2256 +#: src/mail.cpp:2365 #, fuzzy msgid "The encryption is VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2260 +#: src/mail.cpp:2369 #, fuzzy msgid "The encryption is not VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2271 +#: src/mail.cpp:2380 msgid "Click here to change the key used for this address." msgstr "" -#: src/mail.cpp:2275 +#: src/mail.cpp:2384 msgid "Click here for details about the key." msgstr "" -#: src/mail.cpp:2276 +#: src/mail.cpp:2385 msgid "Click here for details about the certificate." msgstr "" -#: src/mail.cpp:2280 +#: src/mail.cpp:2389 msgid "Click here to search the key on the configured keyserver." msgstr "" -#: src/mail.cpp:2281 +#: src/mail.cpp:2390 msgid "Click here to search the certificate on the configured X509 keyserver." msgstr "" -#: src/mail.cpp:2509 +#: src/mail.cpp:2678 #, fuzzy msgid "GpgOL: Encryption not possible!" msgstr "????" -#: src/mail.cpp:2511 +#: src/mail.cpp:2680 msgid "" "Outlook returned an error when trying to send the encrypted mail.\n" "\n" @@ -692,11 +697,11 @@ msgstr "" "?????????????????\n" "????" -#: src/mailitem-events.cpp:295 +#: src/mailitem-events.cpp:313 src/mailitem-events.cpp:805 msgid "Sorry, that's not possible, yet" msgstr "" -#: src/mailitem-events.cpp:297 +#: src/mailitem-events.cpp:315 #, c-format msgid "" "GpgOL has prevented the change to the \"%s\" property.\n" @@ -708,16 +713,23 @@ msgid "" "For example by right clicking but not selecting the message.\n" msgstr "" +#: src/mailitem-events.cpp:802 +msgid "" +"Attachments are part of the crypto message.\n" +"They can't be permanently removed and will be shown again the next time this " +"message is opened." +msgstr "" + #: src/main.c:466 #, c-format msgid "Note: Using compatibility flags: %s" msgstr "???????????%s" -#: src/mapihelp.cpp:1886 src/mapihelp.cpp:1894 src/mapihelp.cpp:1902 +#: src/mapihelp.cpp:1918 src/mapihelp.cpp:1926 src/mapihelp.cpp:1934 msgid "[no subject]" msgstr "[???]" -#: src/mapihelp.cpp:2527 +#: src/mapihelp.cpp:2559 msgid "" "[The content of this message is not visible because it has been decrypted by " "another Outlook session. Use the \"decrypt/verify\" command to make it " @@ -726,7 +738,7 @@ msgstr "" "[???????????????? Outlook ?????????/????????" "?]" -#: src/mapihelp.cpp:3421 +#: src/mapihelp.cpp:3453 msgid "" "[The content of this message is not visible due to an processing error in " "GpgOL.]" @@ -1054,21 +1066,21 @@ msgstr "" msgid "GpgOL: Request confirmed!" msgstr "" -#: src/cryptcontroller.cpp:393 +#: src/cryptcontroller.cpp:404 #, fuzzy msgid "Resolving recipients..." msgstr "??????" -#: src/cryptcontroller.cpp:397 +#: src/cryptcontroller.cpp:408 msgid "Resolving signers..." msgstr "" -#: src/cryptcontroller.cpp:1004 +#: src/cryptcontroller.cpp:1042 #, fuzzy msgid "Encrypting..." msgstr "??" -#: src/cryptcontroller.cpp:1008 +#: src/cryptcontroller.cpp:1046 msgid "Signing..." msgstr "" diff --git a/po/zh_TW.po b/po/zh_TW.po index 465e359..b7e9ae5 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GpgOL\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" -"POT-Creation-Date: 2018-03-21 13:02+0100\n" +"POT-Creation-Date: 2018-04-12 12:58+0200\n" "PO-Revision-Date: 2015-08-15 21:58+0800\n" "Last-Translator: Mingye Wang (Arthur2e5) \n" "Language-Team: \n" @@ -76,7 +76,7 @@ msgstr "" #: src/gpgoladdin.cpp:864 src/gpgoladdin.cpp:907 src/gpgoladdin.cpp:980 #: src/gpgoladdin.cpp:982 src/gpgoladdin.cpp:1018 src/gpgoladdin.cpp:1172 #: src/gpgoladdin.cpp:1255 src/gpgoladdin.cpp:1261 src/gpgoladdin.cpp:1334 -#: src/gpgoladdin.cpp:1338 src/mail.cpp:761 src/main.c:467 src/message.cpp:303 +#: src/gpgoladdin.cpp:1338 src/main.c:467 src/message.cpp:303 #: src/ribbon-callbacks.cpp:134 src/ribbon-callbacks.cpp:248 #: src/ribbon-callbacks.cpp:263 src/ribbon-callbacks.cpp:275 #: src/ribbon-callbacks.cpp:312 src/ribbon-callbacks.cpp:324 @@ -123,6 +123,11 @@ msgstr "???????" msgid "GpgOL - Save attachment" msgstr "GpgOL - ????" +#: src/common.c:1073 +#, fuzzy +msgid "GpgOL Error" +msgstr "GpgOL" + #: src/config-dialog.c:38 msgid "Debug output (for analysing problems)" msgstr "????????????" @@ -168,12 +173,12 @@ msgstr "" msgid "Do you want to revert this folder?" msgstr "????????????" -#: src/gpgoladdin.cpp:446 src/mail.cpp:1685 src/mail.cpp:1756 +#: src/gpgoladdin.cpp:446 src/mail.cpp:1794 src/mail.cpp:1865 #, fuzzy msgid "GpgOL: Encrypted Message" msgstr "????" -#: src/gpgoladdin.cpp:447 src/mail.cpp:1686 src/mail.cpp:1757 +#: src/gpgoladdin.cpp:447 src/mail.cpp:1795 src/mail.cpp:1866 msgid "GpgOL: Trusted Sender Address" msgstr "" @@ -366,42 +371,42 @@ msgstr "" "???????\n" "???????????" -#: src/mail.cpp:323 +#: src/mail.cpp:325 msgid "" "Not all attachments were encrypted or signed.\n" "The unsigned / unencrypted attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:328 +#: src/mail.cpp:330 msgid "" "Not all attachments were signed.\n" "The unsigned attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:333 +#: src/mail.cpp:335 msgid "" "Not all attachments were encrypted.\n" "The unencrypted attachments are:\n" "\n" msgstr "" -#: src/mail.cpp:373 +#: src/mail.cpp:375 msgid "" "Note: The attachments may be encrypted or signed on a file level but the " "GpgOL status does not apply to them." msgstr "" -#: src/mail.cpp:376 +#: src/mail.cpp:378 msgid "GpgOL Warning" msgstr "" -#: src/mail.cpp:843 +#: src/mail.cpp:925 msgid "Pubkey directory confirmation" msgstr "" -#: src/mail.cpp:844 +#: src/mail.cpp:926 msgid "" "This is a confirmation request to publish your Pubkey in the directory for " "your domain.\n" @@ -410,20 +415,20 @@ msgid "" "directory, simply ignore this message.

\n" msgstr "" -#: src/mail.cpp:852 src/mail.cpp:2000 +#: src/mail.cpp:934 src/mail.cpp:2109 #, fuzzy msgid "Encrypted message" msgstr "????" -#: src/mail.cpp:853 +#: src/mail.cpp:935 msgid "Please wait while the message is being decrypted / verified..." msgstr "" -#: src/mail.cpp:1132 +#: src/mail.cpp:1234 msgid "GpgOL: Oops, G Suite Sync account detected" msgstr "" -#: src/mail.cpp:1134 +#: src/mail.cpp:1236 msgid "" "G Suite Sync breaks outgoing crypto mails with attachments.\n" "Using crypto and attachments with G Suite Sync is not supported.\n" @@ -431,105 +436,105 @@ msgid "" "See: https://dev.gnupg.org/T3545 for details." msgstr "" -#: src/mail.cpp:1945 +#: src/mail.cpp:2054 msgid "Security Level 4" msgstr "" -#: src/mail.cpp:1949 +#: src/mail.cpp:2058 msgid "Trust Level 4" msgstr "" -#: src/mail.cpp:1953 +#: src/mail.cpp:2062 msgid "Security Level 3" msgstr "" -#: src/mail.cpp:1957 +#: src/mail.cpp:2066 msgid "Trust Level 3" msgstr "" -#: src/mail.cpp:1961 +#: src/mail.cpp:2070 msgid "Security Level 2" msgstr "" -#: src/mail.cpp:1965 +#: src/mail.cpp:2074 msgid "Trust Level 2" msgstr "" -#: src/mail.cpp:1969 +#: src/mail.cpp:2078 #, fuzzy msgid "Encrypted" msgstr "??" -#: src/mail.cpp:1978 src/mail.cpp:1980 src/ribbon-callbacks.cpp:1631 +#: src/mail.cpp:2087 src/mail.cpp:2089 src/ribbon-callbacks.cpp:1631 msgid "Insecure" msgstr "" -#: src/mail.cpp:1992 +#: src/mail.cpp:2101 #, fuzzy msgid "Signed and encrypted message" msgstr "????" -#: src/mail.cpp:1996 +#: src/mail.cpp:2105 #, fuzzy msgid "Signed message" msgstr "????" -#: src/mail.cpp:2003 src/ribbon-callbacks.cpp:1654 +#: src/mail.cpp:2112 src/ribbon-callbacks.cpp:1654 #, fuzzy msgid "Insecure message" msgstr "????" -#: src/mail.cpp:2014 src/mail.cpp:2025 +#: src/mail.cpp:2123 src/mail.cpp:2134 msgid "You cannot be sure who sent, modified and read the message in transit." msgstr "" -#: src/mail.cpp:2017 +#: src/mail.cpp:2126 msgid "The message was signed but the verification failed with:" msgstr "" -#: src/mail.cpp:2035 +#: src/mail.cpp:2144 #, fuzzy msgid "The encryption was VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2039 +#: src/mail.cpp:2148 #, fuzzy msgid "The encryption was not VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2043 +#: src/mail.cpp:2152 msgid "You cannot be sure who sent the message because it is not signed." msgstr "" -#: src/mail.cpp:2066 +#: src/mail.cpp:2175 #, fuzzy msgid "You signed this message." msgstr "????" -#: src/mail.cpp:2070 +#: src/mail.cpp:2179 msgid "The senders identity was certified by yourself." msgstr "" -#: src/mail.cpp:2074 +#: src/mail.cpp:2183 msgid "The sender is allowed to certify identities for you." msgstr "" -#: src/mail.cpp:2087 +#: src/mail.cpp:2196 msgid "The senders identity was certified by several trusted people." msgstr "" -#: src/mail.cpp:2092 +#: src/mail.cpp:2201 #, c-format msgid "" "The senders identity is certified by the trusted issuer:\n" "'%s'\n" msgstr "" -#: src/mail.cpp:2100 +#: src/mail.cpp:2209 msgid "Some trusted people have certified the senders identity." msgstr "" -#: src/mail.cpp:2110 +#: src/mail.cpp:2219 #, c-format msgid "" "The senders address is trusted, because you have established a communication " @@ -537,142 +542,142 @@ msgid "" "You encrypted %i and verified %i messages since." msgstr "" -#: src/mail.cpp:2126 +#: src/mail.cpp:2235 msgid "The senders signature was verified for the first time." msgstr "" -#: src/mail.cpp:2133 +#: src/mail.cpp:2242 #, c-format msgid "" "The senders address is not trustworthy yet because you only verified %i " "messages and encrypted %i messages to it since %s." msgstr "" -#: src/mail.cpp:2147 +#: src/mail.cpp:2256 msgid "But the sender address is not trustworthy because:" msgstr "" -#: src/mail.cpp:2148 +#: src/mail.cpp:2257 msgid "The sender address is not trustworthy because:" msgstr "" -#: src/mail.cpp:2156 +#: src/mail.cpp:2265 #, fuzzy msgid "The signature is invalid: \n" msgstr "????\n" -#: src/mail.cpp:2161 +#: src/mail.cpp:2270 msgid "There was an error verifying the signature.\n" msgstr "" -#: src/mail.cpp:2165 +#: src/mail.cpp:2274 #, fuzzy msgid "The signature is expired.\n" msgstr "????\n" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 msgid "The used key" msgstr "" -#: src/mail.cpp:2169 +#: src/mail.cpp:2278 #, fuzzy msgid "The used certificate" msgstr "????" -#: src/mail.cpp:2177 +#: src/mail.cpp:2286 #, fuzzy msgid "is not available." msgstr "???????CRL????\n" -#: src/mail.cpp:2181 +#: src/mail.cpp:2290 msgid "is revoked." msgstr "" -#: src/mail.cpp:2185 +#: src/mail.cpp:2294 msgid "is expired." msgstr "" -#: src/mail.cpp:2189 +#: src/mail.cpp:2298 msgid "is not meant for signing." msgstr "" -#: src/mail.cpp:2193 src/mail.cpp:2197 +#: src/mail.cpp:2302 src/mail.cpp:2306 msgid "could not be checked for revocation." msgstr "" -#: src/mail.cpp:2202 +#: src/mail.cpp:2311 msgid "is not the same as the key that was used for this address in the past." msgstr "" -#: src/mail.cpp:2208 +#: src/mail.cpp:2317 #, c-format msgid "does not claim the address: \"%s\"." msgstr "" -#: src/mail.cpp:2221 +#: src/mail.cpp:2330 msgid "is not certified by any trustworthy key." msgstr "" -#: src/mail.cpp:2225 +#: src/mail.cpp:2334 msgid "" "is not certified by a trustworthy Certificate Authority or the Certificate " "Authority is unknown." msgstr "" -#: src/mail.cpp:2230 +#: src/mail.cpp:2339 msgid "The sender marked this address as revoked." msgstr "" -#: src/mail.cpp:2234 +#: src/mail.cpp:2343 msgid "is marked as not trustworthy." msgstr "" -#: src/mail.cpp:2244 +#: src/mail.cpp:2353 #, fuzzy msgid "The signature is VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2248 +#: src/mail.cpp:2357 #, fuzzy msgid "The signature is not VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2256 +#: src/mail.cpp:2365 #, fuzzy msgid "The encryption is VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2260 +#: src/mail.cpp:2369 #, fuzzy msgid "The encryption is not VS-NfD-compliant." msgstr "????\n" -#: src/mail.cpp:2271 +#: src/mail.cpp:2380 msgid "Click here to change the key used for this address." msgstr "" -#: src/mail.cpp:2275 +#: src/mail.cpp:2384 msgid "Click here for details about the key." msgstr "" -#: src/mail.cpp:2276 +#: src/mail.cpp:2385 msgid "Click here for details about the certificate." msgstr "" -#: src/mail.cpp:2280 +#: src/mail.cpp:2389 msgid "Click here to search the key on the configured keyserver." msgstr "" -#: src/mail.cpp:2281 +#: src/mail.cpp:2390 msgid "Click here to search the certificate on the configured X509 keyserver." msgstr "" -#: src/mail.cpp:2509 +#: src/mail.cpp:2678 #, fuzzy msgid "GpgOL: Encryption not possible!" msgstr "????" -#: src/mail.cpp:2511 +#: src/mail.cpp:2680 msgid "" "Outlook returned an error when trying to send the encrypted mail.\n" "\n" @@ -692,11 +697,11 @@ msgstr "" "?????????????????\n" "????" -#: src/mailitem-events.cpp:295 +#: src/mailitem-events.cpp:313 src/mailitem-events.cpp:805 msgid "Sorry, that's not possible, yet" msgstr "" -#: src/mailitem-events.cpp:297 +#: src/mailitem-events.cpp:315 #, c-format msgid "" "GpgOL has prevented the change to the \"%s\" property.\n" @@ -708,16 +713,23 @@ msgid "" "For example by right clicking but not selecting the message.\n" msgstr "" +#: src/mailitem-events.cpp:802 +msgid "" +"Attachments are part of the crypto message.\n" +"They can't be permanently removed and will be shown again the next time this " +"message is opened." +msgstr "" + #: src/main.c:466 #, c-format msgid "Note: Using compatibility flags: %s" msgstr "???????????%s" -#: src/mapihelp.cpp:1886 src/mapihelp.cpp:1894 src/mapihelp.cpp:1902 +#: src/mapihelp.cpp:1918 src/mapihelp.cpp:1926 src/mapihelp.cpp:1934 msgid "[no subject]" msgstr "[???]" -#: src/mapihelp.cpp:2527 +#: src/mapihelp.cpp:2559 msgid "" "[The content of this message is not visible because it has been decrypted by " "another Outlook session. Use the \"decrypt/verify\" command to make it " @@ -726,7 +738,7 @@ msgstr "" "[???????????????? Outlook ?????????/????????" "?]" -#: src/mapihelp.cpp:3421 +#: src/mapihelp.cpp:3453 msgid "" "[The content of this message is not visible due to an processing error in " "GpgOL.]" @@ -1056,21 +1068,21 @@ msgstr "" msgid "GpgOL: Request confirmed!" msgstr "" -#: src/cryptcontroller.cpp:393 +#: src/cryptcontroller.cpp:404 #, fuzzy msgid "Resolving recipients..." msgstr "??????" -#: src/cryptcontroller.cpp:397 +#: src/cryptcontroller.cpp:408 msgid "Resolving signers..." msgstr "" -#: src/cryptcontroller.cpp:1004 +#: src/cryptcontroller.cpp:1042 #, fuzzy msgid "Encrypting..." msgstr "??" -#: src/cryptcontroller.cpp:1008 +#: src/cryptcontroller.cpp:1046 msgid "Signing..." msgstr "" commit 68ba8ea2d624c025fcd8fce7a0a1bdc6d79b431c Author: Andre Heinecke Date: Thu Apr 12 12:49:35 2018 +0200 Hide attachment removal warning on revert * src/mail.cpp (attachment_remove_warning_disabled): New. (Mail::revert): Disable attachment warning. * src/mailitem-events.cpp: Check if warnings are disabled. -- On revert this would otherwise show the newly introduced warning. diff --git a/src/mail.cpp b/src/mail.cpp index 2abff2a..cbff50d 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -94,7 +94,8 @@ Mail::Mail (LPDISPATCH mailitem) : m_window(nullptr), m_async_crypt_disabled(false), m_is_forwarded_crypto_mail(false), - m_is_send_again(false) + m_is_send_again(false), + m_disable_att_remove_warning(false) { if (get_mail_for_item (mailitem)) { @@ -1491,6 +1492,8 @@ Mail::revert () return 0; } + m_disable_att_remove_warning = true; + err = gpgol_mailitem_revert (m_mailitem); if (err == -1) { @@ -1501,6 +1504,7 @@ Mail::revert () /* We need to reprocess the mail next time around. */ m_processed = false; m_needs_wipe = false; + m_disable_att_remove_warning = false; return 0; } diff --git a/src/mail.h b/src/mail.h index ee108a2..d3b6afa 100644 --- a/src/mail.h +++ b/src/mail.h @@ -481,6 +481,10 @@ public: */ void set_is_send_again (bool value) { m_is_send_again = value; } + + /* Attachment removal state variables. */ + bool attachment_remove_warning_disabled () { return m_disable_att_remove_warning; } + private: void update_categories (); void update_sigstate (); @@ -522,5 +526,6 @@ private: std::string m_mime_data; bool m_is_forwarded_crypto_mail; /* Is this a forward of a crypto mail */ bool m_is_send_again; /* Is this a send again of a crypto mail */ + bool m_disable_att_remove_warning; /* Should not warn about attachment removal. */ }; #endif // MAIL_H diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp index 3a262fe..e4dd961 100644 --- a/src/mailitem-events.cpp +++ b/src/mailitem-events.cpp @@ -793,7 +793,8 @@ EVENT_SINK_INVOKE(MailItemEvents) { log_oom_extra ("%s:%s: AttachmentRemove: %p", SRCNAME, __func__, m_mail); - if (!m_mail->is_crypto_mail () || attachRemoveWarnShown) + if (!m_mail->is_crypto_mail () || attachRemoveWarnShown || + m_mail->attachment_remove_warning_disabled ()) { return S_OK; } @@ -803,6 +804,7 @@ EVENT_SINK_INVOKE(MailItemEvents) "time this message is opened."), _("Sorry, that's not possible, yet"), MB_OK); attachRemoveWarnShown = true; + return S_OK; } default: commit 6f7b2db102838df077162b9b2d1f7df1f1716994 Author: Andre Heinecke Date: Thu Apr 12 12:49:08 2018 +0200 Ignore InternetCodepage changes * src/mailitem-events.cpp: Ignore internetcodepage changes. diff --git a/src/mailitem-events.cpp b/src/mailitem-events.cpp index e73e0ee..3a262fe 100644 --- a/src/mailitem-events.cpp +++ b/src/mailitem-events.cpp @@ -45,6 +45,7 @@ const wchar_t *prop_blacklist[] = { L"OutlookVersion", L"OutlookInternalVersion", L"ReceivedTime", + L"InternetCodepage", NULL }; typedef enum ----------------------------------------------------------------------- Summary of changes: NEWS | 2 +- po/de.po | 181 ++++++++++++++++++++++++++---------------------- po/fr.po | 168 +++++++++++++++++++++++--------------------- po/pt.po | 168 +++++++++++++++++++++++--------------------- po/sv.po | 168 +++++++++++++++++++++++--------------------- po/zh_CN.po | 168 +++++++++++++++++++++++--------------------- po/zh_TW.po | 168 +++++++++++++++++++++++--------------------- src/mail.cpp | 6 +- src/mail.h | 5 ++ src/mailitem-events.cpp | 5 +- 10 files changed, 563 insertions(+), 476 deletions(-) hooks/post-receive -- GnuPG extension for MS Outlook http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 13:15:21 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 12 Apr 2018 13:15:21 +0200 Subject: [git] GpgOL - branch, master, updated. gpgol-2.1.0-1-g8695b2e 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 8695b2eda8a9e665f0088a21fba67d097dfa592a (commit) from 536f0690ed85250756f1cc58dc957f8015e3785a (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 8695b2eda8a9e665f0088a21fba67d097dfa592a Author: Andre Heinecke Date: Thu Apr 12 13:15:12 2018 +0200 Post release version bump diff --git a/NEWS b/NEWS index e127e5e..53e510d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Noteworthy changes for version 2.1.1 (unreleased) +================================================= + + Noteworthy changes for version 2.1.0 (2018-04-12) ================================================= diff --git a/configure.ac b/configure.ac index 7fb6a92..9d71086 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.1.0]) +m4_define([mym4_version], [2.1.1]) # 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 Thu Apr 12 13:16:15 2018 From: cvs at cvs.gnupg.org (by Andre Heinecke) Date: Thu, 12 Apr 2018 13:16:15 +0200 Subject: [git] gnupg-doc - branch, master, updated. 57ef28a1cda058e4489f150724786a039691bd84 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 57ef28a1cda058e4489f150724786a039691bd84 (commit) from 0ab16972dc62edd7e610248f5d9859e273113183 (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 57ef28a1cda058e4489f150724786a039691bd84 Author: Andre Heinecke Date: Thu Apr 12 13:15:45 2018 +0200 swdb: Update GpgOL to 2.1.0 -- diff --git a/web/swdb.mac b/web/swdb.mac index 6c2188d..ed2d1ef 100644 --- a/web/swdb.mac +++ b/web/swdb.mac @@ -181,11 +181,11 @@ # # GpgOL # -#+macro: gpgol_ver 2.0.5 -#+macro: gpgol_date 2017-12-08 -#+macro: gpgol_size 750k -#+macro: gpgol_sha1 2f7eb7453ad5c6e811823be5348eec4c78f97695 -#+macro: gpgol_sha2 8fa5d4d13edfb344ec75a0e9dce3e633e6ce81e92cd388b73e2d34a14c78d46e +#+macro: gpgol_ver 2.1.0 +#+macro: gpgol_date 2018-04-12 +#+macro: gpgol_size 775k +#+macro: gpgol_sha1 4b581ec9b8efdd02f2222c5a68934b0decef72c2 +#+macro: gpgol_sha2 3193fc5c85f7ef8cddca97c537831daf7a51f56c244f3d33ce2c3fcc01437764 # ----------------------------------------------------------------------- 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 Thu Apr 12 15:46:22 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 12 Apr 2018 15:46:22 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.10.0-185-gbdf7cd2 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 bdf7cd2e28432cf0fa7e0758acdfee03d7bfd45f (commit) from f7700a016926f0d8e9cb3c0337837deb7fe01079 (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 bdf7cd2e28432cf0fa7e0758acdfee03d7bfd45f Author: Werner Koch Date: Thu Apr 12 15:39:20 2018 +0200 tests: Add another check to gpg/t-verify. * tests/gpg/t-verify.c (PGM): New. Use it instead of __FILE__. (test_sig1_plus_unknown_key): New test signature. (check_result): Allow checking of several signatures. (main): Check a signature with a know and an unknown key. Signed-off-by: Werner Koch diff --git a/tests/gpg/t-verify.c b/tests/gpg/t-verify.c index f955cc9..ffc41ee 100644 --- a/tests/gpg/t-verify.c +++ b/tests/gpg/t-verify.c @@ -31,31 +31,14 @@ #include +#define PGM "t-verify" #include "t-support.h" + static const char test_text1[] = "Just GNU it!\n"; static const char test_text1f[]= "Just GNU it?\n"; static const char test_sig1[] = -#if 0 -"-----BEGIN PGP SIGNATURE-----\n" -"\n" -"iEYEABECAAYFAjoKgjIACgkQLXJ8x2hpdzQMSwCeO/xUrhysZ7zJKPf/FyXA//u1\n" -"ZgIAn0204PBR7yxSdQx6CFxugstNqmRv\n" -"=yku6\n" -"-----END PGP SIGNATURE-----\n" -#elif 0 -"-----BEGIN PGP SIGNATURE-----\n" -"Version: GnuPG v1.0.4-2 (GNU/Linux)\n" -"Comment: For info see http://www.gnupg.org\n" -"\n" -"iJcEABECAFcFAjoS8/E1FIAAAAAACAAkZm9vYmFyLjF0aGlzIGlzIGEgbm90YXRp\n" -"b24gZGF0YSB3aXRoIDIgbGluZXMaGmh0dHA6Ly93d3cuZ3Uub3JnL3BvbGljeS8A\n" -"CgkQLXJ8x2hpdzQLyQCbBW/fgU8ZeWSlWPM1F8umHX17bAAAoIfSNDSp5zM85XcG\n" -"iwxMrf+u8v4r\n" -"=88Zo\n" -"-----END PGP SIGNATURE-----\n" -#elif 1 "-----BEGIN PGP SIGNATURE-----\n" "\n" "iN0EABECAJ0FAjoS+i9FFIAAAAAAAwA5YmFyw7bDpMO8w58gZGFzIHdhcmVuIFVt\n" @@ -64,9 +47,24 @@ static const char test_sig1[] = "Oi8vd3d3Lmd1Lm9yZy9wb2xpY3kvAAoJEC1yfMdoaXc0JBIAoIiLlUsvpMDOyGEc\n" "dADGKXF/Hcb+AKCJWPphZCphduxSvrzH0hgzHdeQaA==\n" "=nts1\n" -"-----END PGP SIGNATURE-----\n" -#endif -; +"-----END PGP SIGNATURE-----\n"; + +/* The same as test_sig1 but with a second signature for which we do + * not have the public key (deleted after signature creation). */ +static const char test_sig1_plus_unknown_key[] = +"-----BEGIN PGP SIGNATURE-----\n" +"\n" +"iN0EABECAJ0FAjoS+i9FFIAAAAAAAwA5YmFyw7bDpMO8w58gZGFzIHdhcmVuIFVt\n" +"bGF1dGUgdW5kIGpldHp0IGVpbiBwcm96ZW50JS1aZWljaGVuNRSAAAAAAAgAJGZv\n" +"b2Jhci4xdGhpcyBpcyBhIG5vdGF0aW9uIGRhdGEgd2l0aCAyIGxpbmVzGhpodHRw\n" +"Oi8vd3d3Lmd1Lm9yZy9wb2xpY3kvAAoJEC1yfMdoaXc0JBIAoIiLlUsvpMDOyGEc\n" +"dADGKXF/Hcb+AKCJWPphZCphduxSvrzH0hgzHdeQaIh1BAAWCAAdFiEENuwqcMZC\n" +"brD85btN+RyY8EnUIEwFAlrPR4cACgkQ+RyY8EnUIEyiuAEAm41LJTGUFDzhavRm\n" +"jNwqUZxGGOySduW+u/X1lEfV+MYA/2lJOo75rHtD1EG+tkFVWt4Ukj0rjhR132vZ\n" +"IOtrYAcG\n" +"=yYwZ\n" +"-----END PGP SIGNATURE-----\n"; + static const char test_sig2[] = "-----BEGIN PGP MESSAGE-----\n" "\n" @@ -91,37 +89,51 @@ static const char double_plaintext_sig[] = +/* NO_OF_SIGS is the expected number of signatures. SKIP_SKIPS is + * which of these signatures to check (0 based). */ static void -check_result (gpgme_verify_result_t result, unsigned int summary, - const char *fpr, +check_result (gpgme_verify_result_t result, int no_of_sigs, int skip_sigs, + unsigned int summary, const char *fpr, gpgme_error_t status, int notation) { gpgme_signature_t sig; + int n; sig = result->signatures; - if (!sig || sig->next) + for (n=0; sig; sig = sig->next) + n++; + if (n != no_of_sigs) { - fprintf (stderr, "%s:%i: Unexpected number of signatures\n", - __FILE__, __LINE__); + fprintf (stderr, "%s:%i: Unexpected number of signatures" + " (got %d expected %d)\n", PGM, __LINE__, n, no_of_sigs); exit (1); } + if (skip_sigs >= n) + { + fprintf (stderr, "%s:%i: oops SKIPP_SIGS to high\n", PGM, __LINE__); + exit (1); + } + + for (n=0, sig = result->signatures; n < skip_sigs; sig = sig->next, n++) + ; + if (sig->summary != summary) { - fprintf (stderr, "%s:%i: Unexpected signature summary: " + fprintf (stderr, "%s:%i:sig-%d: Unexpected signature summary: " "want=0x%x have=0x%x\n", - __FILE__, __LINE__, summary, sig->summary); + PGM, __LINE__, skip_sigs, summary, sig->summary); exit (1); } if (strcmp (sig->fpr, fpr)) { - fprintf (stderr, "%s:%i: Unexpected fingerprint: %s\n", - __FILE__, __LINE__, sig->fpr); + fprintf (stderr, "%s:%i:sig-%d: Unexpected fingerprint: %s\n", + PGM, __LINE__, skip_sigs, sig->fpr); exit (1); } if (gpgme_err_code (sig->status) != status) { - fprintf (stderr, "%s:%i: Unexpected signature status: %s\n", - __FILE__, __LINE__, gpgme_strerror (sig->status)); + fprintf (stderr, "%s:%i:sig-%d: Unexpected signature status: %s\n", + PGM, __LINE__, skip_sigs, gpgme_strerror (sig->status)); exit (1); } if (notation) @@ -166,8 +178,8 @@ check_result (gpgme_verify_result_t result, unsigned int summary, } if (!any) { - fprintf (stderr, "%s:%i: Unexpected notation data\n", - __FILE__, __LINE__); + fprintf (stderr, "%s:%i:sig-%d: Unexpected notation data\n", + PGM, __LINE__, skip_sigs); exit (1); } } @@ -175,28 +187,30 @@ check_result (gpgme_verify_result_t result, unsigned int summary, { if (expected_notations[i].seen != 1) { - fprintf (stderr, "%s:%i: Missing or duplicate notation data\n", - __FILE__, __LINE__); + fprintf (stderr, "%s:%i:sig-%d: " + "Missing or duplicate notation data\n", + PGM, __LINE__, skip_sigs); exit (1); } } } if (sig->wrong_key_usage) { - fprintf (stderr, "%s:%i: Unexpectedly wrong key usage\n", - __FILE__, __LINE__); + fprintf (stderr, "%s:%i:sig-%d: Unexpectedly wrong key usage\n", + PGM, __LINE__, skip_sigs); exit (1); } if (sig->validity != GPGME_VALIDITY_UNKNOWN) { - fprintf (stderr, "%s:%i: Unexpected validity: %i\n", - __FILE__, __LINE__, sig->validity); + fprintf (stderr, "%s:%i:sig-%d: Unexpected validity: %i\n", + PGM, __LINE__, skip_sigs, sig->validity); exit (1); } if (gpgme_err_code (sig->validity_reason) != GPG_ERR_NO_ERROR) { - fprintf (stderr, "%s:%i: Unexpected validity reason: %s\n", - __FILE__, __LINE__, gpgme_strerror (sig->validity_reason)); + fprintf (stderr, "%s:%i:sig-%d: Unexpected validity reason: %s\n", + PGM, __LINE__, skip_sigs, + gpgme_strerror (sig->validity_reason)); exit (1); } } @@ -227,7 +241,7 @@ main (int argc, char *argv[]) err = gpgme_op_verify (ctx, sig, text, NULL); fail_if_err (err); result = gpgme_op_verify_result (ctx); - check_result (result, 0, "A0FF4590BB6122EDEF6E3C542D727CC768697734", + check_result (result, 1, 0, 0, "A0FF4590BB6122EDEF6E3C542D727CC768697734", GPG_ERR_NO_ERROR, 1); /* Checking a manipulated message. */ @@ -238,9 +252,27 @@ main (int argc, char *argv[]) err = gpgme_op_verify (ctx, sig, text, NULL); fail_if_err (err); result = gpgme_op_verify_result (ctx); - check_result (result, GPGME_SIGSUM_RED, "2D727CC768697734", + check_result (result, 1, 0, GPGME_SIGSUM_RED, "2D727CC768697734", GPG_ERR_BAD_SIGNATURE, 0); + /* Checking a valid message. Bu that one has a second signature + * made by an unknown key. */ + gpgme_data_release (text); + gpgme_data_release (sig); + err = gpgme_data_new_from_mem (&text, test_text1, strlen (test_text1), 0); + fail_if_err (err); + err = gpgme_data_new_from_mem (&sig, test_sig1_plus_unknown_key, + strlen (test_sig1_plus_unknown_key), 0); + fail_if_err (err); + err = gpgme_op_verify (ctx, sig, text, NULL); + fail_if_err (err); + result = gpgme_op_verify_result (ctx); + check_result (result, 2, 0, 0, "A0FF4590BB6122EDEF6E3C542D727CC768697734", + GPG_ERR_NO_ERROR, 1); + check_result (result, 2, 1, 0, "36EC2A70C6426EB0FCE5BB4DF91C98F049D4204C", + GPG_ERR_NO_ERROR, 0); + + /* Checking a normal signature. */ gpgme_data_release (sig); gpgme_data_release (text); @@ -251,7 +283,7 @@ main (int argc, char *argv[]) err = gpgme_op_verify (ctx, sig, NULL, text); fail_if_err (err); result = gpgme_op_verify_result (ctx); - check_result (result, 0, "A0FF4590BB6122EDEF6E3C542D727CC768697734", + check_result (result, 1, 0, 0, "A0FF4590BB6122EDEF6E3C542D727CC768697734", GPG_ERR_NO_ERROR, 0); @@ -267,7 +299,7 @@ main (int argc, char *argv[]) if (gpgme_err_code (err) != GPG_ERR_BAD_DATA) { fprintf (stderr, "%s:%i: Double plaintext message not detected\n", - __FILE__, __LINE__); + PGM, __LINE__); exit (1); } @@ -278,7 +310,7 @@ main (int argc, char *argv[]) if (!s || strcmp (s, "foo at example.org")) { fprintf (stderr, "%s:%i: gpgme_{set,get}_sender mismatch\n", - __FILE__, __LINE__); + PGM, __LINE__); exit (1); } @@ -288,7 +320,7 @@ main (int argc, char *argv[]) if (!s || strcmp (s, "bar at example.org")) { fprintf (stderr, "%s:%i: gpgme_{set,get}_sender mismatch\n", - __FILE__, __LINE__); + PGM, __LINE__); exit (1); } @@ -298,7 +330,7 @@ main (int argc, char *argv[]) if (!s || strcmp (s, "foo at example.org")) { fprintf (stderr, "%s:%i: gpgme_{set,get}_sender mismatch\n", - __FILE__, __LINE__); + PGM, __LINE__); exit (1); } @@ -306,7 +338,7 @@ main (int argc, char *argv[]) if (gpgme_err_code (err) != GPG_ERR_INV_VALUE) { fprintf (stderr, "%s:%i: gpgme_set_sender didn't detect bogus address\n", - __FILE__, __LINE__); + PGM, __LINE__); exit (1); } /* (the former address should still be there.) */ @@ -314,7 +346,7 @@ main (int argc, char *argv[]) if (!s || strcmp (s, "foo at example.org")) { fprintf (stderr, "%s:%i: gpgme_{set,get}_sender mismatch\n", - __FILE__, __LINE__); + PGM, __LINE__); exit (1); } ----------------------------------------------------------------------- Summary of changes: tests/gpg/t-verify.c | 136 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 84 insertions(+), 52 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 16:06:26 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 12 Apr 2018 16:06:26 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.10.0-186-gee8fad3 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 ee8fad3ea0cbc82f31c86b3483abd8549df62b69 (commit) from bdf7cd2e28432cf0fa7e0758acdfee03d7bfd45f (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 ee8fad3ea0cbc82f31c86b3483abd8549df62b69 Author: Werner Koch Date: Thu Apr 12 15:59:22 2018 +0200 tests: Avoid segv in run-verify due to Policy URLs * tests/run-verify.c (print_result): Take care of Policy URLs. Signed-off-by: Werner Koch diff --git a/tests/run-verify.c b/tests/run-verify.c index b22e644..699bfd1 100644 --- a/tests/run-verify.c +++ b/tests/run-verify.c @@ -163,15 +163,22 @@ print_result (gpgme_verify_result_t result) ); for (nt = sig->notations; nt; nt = nt->next) { - printf (" notation ..: '%s'\n", nt->name); - if (strlen (nt->name) != nt->name_len) - printf (" warning : name larger (%d)\n", nt->name_len); - printf (" flags ...:%s%s (0x%02x)\n", - nt->critical? " critical":"", - nt->human_readable? " human":"", - nt->flags); - if (nt->value) - printf (" value ...: '%s'\n", nt->value); + if (nt->name) + { + printf (" notation ..: '%s'\n", nt->name); + if (strlen (nt->name) != nt->name_len) + printf (" warning : name larger (%d)\n", nt->name_len); + printf (" flags ...:%s%s (0x%02x)\n", + nt->critical? " critical":"", + nt->human_readable? " human":"", + nt->flags); + if (nt->value) + printf (" value ...: '%s'\n", nt->value); + } + else + { + printf (" policy ....: '%s'\n", nt->value); + } if ((nt->value?strlen (nt->value):0) != nt->value_len) printf (" warning : value larger (%d)\n", nt->value_len); } ----------------------------------------------------------------------- Summary of changes: tests/run-verify.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 12 16:48:24 2018 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 12 Apr 2018 16:48:24 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.6-10-g23a7145 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 23a714598c247d78cfda46a6dc338b17e17cc194 (commit) from e2bd152a928d79ddfb95fd2f7911c80a1a8d5a21 (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 23a714598c247d78cfda46a6dc338b17e17cc194 Author: Werner Koch Date: Thu Apr 12 16:41:05 2018 +0200 gpg: Extend the ERRSIG status line with a fingerprint. * g10/mainproc.c (issuer_fpr_raw): New. (issuer_fpr_string): Re-implement using issuer_fpr_rtaw. (check_sig_and_print): Don't free ISSUER_FPR. Use ISSUER_FPR_RAW. Use write_status_printf. Extend ERRSIG status. -- Modern OpenPGP implementations put the ISSUER_FPR into the signature to make it easier to discover the, public needed to check the signature. This is also useful in error messages and thus we add it. Signed-off-by: Werner Koch diff --git a/NEWS b/NEWS index 403c2a0..cd547a1 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,9 @@ Noteworthy changes in version 2.2.7 (unreleased) * gpg: New option --no-symkey-cache to disable the passphrase cache for symmetrical en- and decryption. + * gpg: The ERRSIG status now prints the fingerprint if that is part + of the signature. + Noteworthy changes in version 2.2.6 (2018-04-09) ------------------------------------------------ diff --git a/doc/DETAILS b/doc/DETAILS index e54e8a0..2d78fec 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -435,14 +435,17 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB: available. This is the case with CMS and might eventually also be available for OpenPGP. -*** ERRSIG