From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id A9BE13942014; Thu, 12 Mar 2020 15:58:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9BE13942014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1584028726; bh=HrWRjJf4IgUowDex0mXmG3RZfW3eQXhpw+kCVImxf0Y=; h=To:Subject:Date:From:From; b=MuBeqXfpDv4mjciM1YCo6YvvH3PUPFCDmhntIXdEJmEJVmnE1HGbn9zyXryWDg3b5 edES8s9Ehx2r6T1ixlsa2MKYZziTuJp6MujLPgmEaV0tqhvNszASkMIGG1/xXR2ZyA rw5J3b1hh8N68TQi0xYvzAsrcTCk7KW2d2m9lKmM= To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.902-2-gf681d72f X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 2a700f5f5174ccb51a83cce7acc8b9d76fcbd6ef X-Git-Newrev: f681d72f73742906af0dda247655ea6da264fb76 Message-Id: <20200312155846.A9BE13942014@sourceware.org> Date: Thu, 12 Mar 2020 15:58:46 +0000 (GMT) From: Jon TURNEY X-BeenThere: cygwin-apps-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin-apps-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2020 15:58:46 -0000 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f681d72f73742906af0dda247655ea6da264fb76 commit f681d72f73742906af0dda247655ea6da264fb76 Author: Jon Turney Date: Sun Mar 1 13:40:21 2020 +0000 Produce detatched signature for setup executable using new and old keys This is slightly fraught: If we don't specify a digest preference, sha1 will be used with both keys, which we don't want. Even if we do specify a digest preference, sha1 is still used for DSA, and gpg won't verify all the signatures, if they don't use the same hash algorithm (See [1]). So specify dsa2 as well, to allow sha256 to be used in both signatures. [1] https://dev.gnupg.org/T1462 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=f724f2f38bdc95fd7068d1a183a8229d865d35f2 commit f724f2f38bdc95fd7068d1a183a8229d865d35f2 Author: Jon Turney Date: Fri Feb 28 18:13:53 2020 +0000 Run libgcrypt self-tests The libgcrypt in Fedora's mingw-libgcrypt package is patched to always run self-tests, even if FIPS mode isn't on. Ensure self-tests run before we turn on voluble debugging, to avoid even more log spam. If we're going to run the self-test, we should report if it fails :) Diff: --- Makefile.am | 3 ++- crypto.cc | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4ceeb98d..987909cd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -306,10 +306,11 @@ release: upx UPLOAD_HOST=cygwin-admin@cygwin.com UPLOAD_PATH=/www/sourceware/htdocs/cygwin/setup +SIGN_KEYS="--enable-dsa2 --personal-digest-preferences=sha256 -u 676041BA -u 1A698DE9E2E56300" upload: release scp setup-${VER}.$(ARCH).exe setup-${VER}.$(ARCH).dbg ${UPLOAD_HOST}:${UPLOAD_PATH} - ssh ${UPLOAD_HOST} gpg --detach-sign ${UPLOAD_PATH}/setup-${VER}.$(ARCH).exe + ssh ${UPLOAD_HOST} gpg ${SIGN_KEYS} --detach-sign ${UPLOAD_PATH}/setup-${VER}.$(ARCH).exe clean-local: rm -f setup*${EXEEXT} setup*.dbg diff --git a/crypto.cc b/crypto.cc index c4814b9e..2e4ba218 100644 --- a/crypto.cc +++ b/crypto.cc @@ -676,9 +676,15 @@ verify_ini_file_sig (io_stream *ini_file, io_stream *ini_sig_file, HWND owner) { #if CRYPTODEBUGGING gcry_set_log_handler (gcrypt_log_adaptor, NULL); - gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1); #endif gcry_check_version (NULL); + + if ((rv = gcry_control (GCRYCTL_SELFTEST)) != GPG_ERR_NO_ERROR) + ERRKIND (owner, IDS_CRYPTO_ERROR, rv, "libgcrypt selftest failed"); + +#if CRYPTODEBUGGING + gcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1); +#endif gcrypt_init = true; }