From patchwork Thu Feb 3 12:37:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Stelzer X-Patchwork-Id: 12734100 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2A8FC433F5 for ; Thu, 3 Feb 2022 12:37:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350535AbiBCMha (ORCPT ); Thu, 3 Feb 2022 07:37:30 -0500 Received: from mail-eopbgr20087.outbound.protection.outlook.com ([40.107.2.87]:24199 "EHLO EUR02-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230213AbiBCMh3 (ORCPT ); Thu, 3 Feb 2022 07:37:29 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dikf/bIFv67tCCxcLCpMwl384laElTvX0UYQSnAiexsChBMOGl4PaUUyluF3i5adaqwMB43LrlrFbtuL9YvdlqURekfEoVHLfeqln6HpOaS4A9DZ2kBkrO72oeoSaZZNHYEbyEqPIu71wu4jE8X+I2FQP6HaFBxIRwy/L6IhimKn6VV+UjYQtONvIXtQrlpFjvDgeGaLgiGyIkoIxNQ8Xy8eg86Lx8WK/apYmuVSh705V11Pw3B3SYLyhx0Ls8ZtGJ/REkf5UW5GC43Jbozu04QQS6Ti/QIdPLKyrsP6MJ8CSZyHyWAlxepULdE2nyILXkD0nQcOONV99tN4po3qbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LShF5t8k8rDPTOOfvwx5x7n+lufAF53Dvhu1avfc4iE=; b=bjBEMSXi3OfpTJ5vSuRfyXHzwx37/RTRbjGtWg/epIZ+t8GGpsEycdWqiT2TG4UnpYxMzilMyRP73oszmh8tjfkH3jZG/NJzeooGFdgaMQ1Z27rc4dsaGQka4xnbyt4M1a7uCawVxjme8wlRTS2HMFixtBLerEnEhiyOR18Lc2D4/EI/bcEWRIdVM8AUffiUMAQZrJPvgsXyr0B0pB7aUpQg9nDzuy/R+ilBuzJWnC+RsHUNcpD5xGWIVjX+5yAwIPSKRV0qTz6h7zcTyCY5DS94vikcZNWgOuGnVdwFrX2hM0CEf/xNdoSx3rCpS45WArLT2BDhEff544JlfbS6Kg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gigacodes.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LShF5t8k8rDPTOOfvwx5x7n+lufAF53Dvhu1avfc4iE=; b=OotMpex7gfPNj8fZ2kDEbVmsmonMqzl1O7vnV8hYGQ/RvAPTTMVERJzbr6y6x7HC4jqMz50p2o177xjKo2to9CfWxV4HWj+8+Gab6UdZfgWPrHEvFBBuWBrdpYo63+70pBhJa/8JBZ4eBt1o9aQ8h0SSgxFz9raNAXPKgQrfO2A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=gigacodes.de; Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) by DB6PR1001MB1398.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:b6::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.21; Thu, 3 Feb 2022 12:37:27 +0000 Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::486c:1c10:65ef:90f9]) by PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::486c:1c10:65ef:90f9%7]) with mapi id 15.20.4930.022; Thu, 3 Feb 2022 12:37:26 +0000 From: Fabian Stelzer To: git@vger.kernel.org Cc: Fabian Stelzer , Henning Schild , "brian m . carlson" , Hans Jerry Illikainen Subject: [PATCH] gpg-interface: fix for gpgsm v2.3 Date: Thu, 3 Feb 2022 13:37:24 +0100 Message-Id: <20220203123724.47529-1-fs@gigacodes.de> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: FR3P281CA0028.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::19) To PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9f28f79a-7586-45d3-1a18-08d9e711ef6e X-MS-TrafficTypeDiagnostic: DB6PR1001MB1398:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F8iSoNJTm0E7hezXJol+iIIryR08khlAn/vV2y9MlywntWpF04JO7jQOfGbopO1kAiDDet7efBXQixaTVDc+Yg7k3uaModsD4NNGnNzVag7uJJDl4bmf9mZKA2gw+WlvgGKQTFpZeqS2YOveqF0KvAduY8jhZaxuzWcdgOdPBWQlnA8B8/s4H8jnGzNfEw8pT4iUPkq46Js1sL/h94p+psJefwf1rbf0u+qyMOZF2J5jvBz5pn4oPftKUNsFY5Ru6mfVeDXWhDbI9puSltXOqie8qOwWmDrRyv6PkRK2NMQ53hacse/A9yt6VOFgI8Z+shzKCF4EZEd3aQgqEYx3nyWEDP/fBXQ3csdeDDKdbzAeERGU+GXuoMCv/8CrdDKer7H5jb9S8sSgYgaI07I9cK5Ie68AtVI4c3ISQEclLWPoJYfUVp8y0KyLWaszBsp/OX0l3Upg5Ogso9eypkatX/g3twaEbFT7QicKaiDl5cgkY3VYVFMxViAA02uAa7zZTBTMm1HFt/zoGMpoG5Geg0yb8GxG7SzNlPJkpUahwqsQD4y00RH7fRvxF3caFwh8/kF7GxiyZHh1KDW71olHiLVxTjTf8N8rvrKQeYti/GmkFvr8wcbK3oUUD+vY0UOPAfMxzAhs+enmMypsE3gXHQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(4636009)(346002)(136003)(376002)(366004)(396003)(39830400003)(86362001)(2616005)(508600001)(1076003)(4326008)(5660300002)(6486002)(6506007)(8936002)(26005)(6512007)(6916009)(316002)(54906003)(66476007)(66556008)(8676002)(2906002)(186003)(36756003)(83380400001)(38100700002)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: i4G8Q26CHlKICazOGWLAwBD5D4nzrJKu/TiilwPCkDpAQxxwnnkBI/gKBY/L8vyNS/m4MP9UAdBJcgccvPmNOcyWFl3Cerf4fdtXOH2OXwR3KO3HfIvrEgDEu7T9P7UTBADyMS6iKblozxEqjssZIK56UzIvds8/qvGmV59RGrALm8kA33894T2w/Yw2xVF4l3wFz66nups8yBxhBAdlU++S6c4uVVtiEraBjVBJ657FvRhsTYE4ih+nhcBAfH+98eW+U9Sc81ZbpJEOWUiyOb9xqubVxvSv9m5fryDr6NaEIdvQ6i7PiBVE6o7AMfv0Jfp5z0885P2nSAqkLw1NYaFjA2mhVQW4zmTaNaHQI7xqGa9eaAywVX55LiEnzAUliJ4AZ+Bo3/ECF5aYWf41DSPc8vlwEtpFZ66rGE1MA2tYFyWqh/sx2Jemh5UGP/IFBTTU3o1xigR+fqUxkY/ytWHc9F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c4+f+GGngbkIGUMs/jB/RjZjVbh57ou3sF3lXlFdDkQYh4+rcPPI0zmUy/n+oNgN0OV8FIAZ+px2MnKXeHBVAUcv2FFf+HnAXPl2eXdBccJmdZuXBnKiAgf/HGWI0bGy+veF6wI1rU/J0pDcoE= X-OriginatorOrg: gigacodes.de X-MS-Exchange-CrossTenant-Network-Message-Id: 9f28f79a-7586-45d3-1a18-08d9e711ef6e X-MS-Exchange-CrossTenant-AuthSource: PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2022 12:37:26.8316 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 80e41b3b-ea1f-4dbc-91eb-225a572951fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 72eHELQy0jPcsb2PftrgYy7hitcpeRgA24RL0zEgv24zUwmwSfddjDXDVsRrnoQqWoZ0RLtNuS1EjSAKgqaG7NV3Y2qUhIkEnR8V1V7PpRc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR1001MB1398 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org gpgsm v2.3 changed some details about its output: - instead of displaying `fingerprint:` for keys it will print `sha1 fpr:` and `sha2 fpr:` - some wording of errors has changed - signing will omit an extra debug output line before the [GNUPG]: tag This change adjusts the gpgsm test prerequisite to work with v2.3 as well by accepting `sha1 fpr:` as well as `fingerprint:` and allows both variants of errors for unknown certs. Checking for successful signature creation will omit the leading NL in its search string. Signed-off-by: Todd Zullinger Signed-off-by: Todd Zullinger --- I am not a user of gpgsm but noticed that the GPGSM test prereq was disabled on my runs so i investigated. The `fix` seems rather trivial and I tried to test this as thorough as possible. I ran the test suite on machines available to me (fedora35, centos8) and did a full CI run on github without any issues. But if you actually use gpgsm with git please give this a go and let me know if I missed anything. gpg-interface.c | 2 +- t/lib-gpg.sh | 4 ++-- t/t4202-log.sh | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gpg-interface.c b/gpg-interface.c index b52eb0e2e0..299e7f588a 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -939,7 +939,7 @@ static int sign_buffer_gpg(struct strbuf *buffer, struct strbuf *signature, signature, 1024, &gpg_status, 0); sigchain_pop(SIGPIPE); - ret |= !strstr(gpg_status.buf, "\n[GNUPG:] SIG_CREATED "); + ret |= !strstr(gpg_status.buf, "[GNUPG:] SIG_CREATED "); strbuf_release(&gpg_status); if (ret) return error(_("gpg failed to sign the data")); diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh index 3e7ee1386a..6c2dd4b14b 100644 --- a/t/lib-gpg.sh +++ b/t/lib-gpg.sh @@ -73,8 +73,8 @@ test_lazy_prereq GPGSM ' --import "$TEST_DIRECTORY"/lib-gpg/gpgsm_cert.p12 && gpgsm --homedir "${GNUPGHOME}" -K | - grep fingerprint: | - cut -d" " -f4 | + grep -E "(fingerprint|sha1 fpr):" | + cut -d":" -f2- | tr -d " " | tr -d "\\n" >"${GNUPGHOME}/trustlist.txt" && echo " S relax" >>"${GNUPGHOME}/trustlist.txt" && diff --git a/t/t4202-log.sh b/t/t4202-log.sh index 5049559861..08556493ce 100755 --- a/t/t4202-log.sh +++ b/t/t4202-log.sh @@ -1931,7 +1931,10 @@ test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 miss git merge --no-ff -m msg signed_tag_x509_nokey && GNUPGHOME=. git log --graph --show-signature -n1 plain-x509-nokey >actual && grep "^|\\\ merged tag" actual && - grep "^| | gpgsm: certificate not found" actual + ( + grep "^| | gpgsm: certificate not found" actual || + grep "^| | gpgsm: failed to find the certificate: Not found" actual + ) ' test_expect_success GPGSM 'log --graph --show-signature for merged tag x509 bad signature' ' From patchwork Thu Feb 24 10:06:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Stelzer X-Patchwork-Id: 12758283 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AF58C433F5 for ; Thu, 24 Feb 2022 10:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233094AbiBXKHJ (ORCPT ); Thu, 24 Feb 2022 05:07:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230228AbiBXKHH (ORCPT ); Thu, 24 Feb 2022 05:07:07 -0500 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150048.outbound.protection.outlook.com [40.107.15.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9006B64C0 for ; Thu, 24 Feb 2022 02:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bIIQoVeZ4sZSWQ4BDfH0qM3TGrfLdthIY4dvTa7nKlhQRlwfKfCKRmTLPWlbiqxccgbokUcveAJGaWjZmPXkqkKXRIexy0WPuvyAeYx2fQMasVOhaJf/lxJpszimTb9orOho16mDeahNZiF/ZSWz77WFY/nb40xkj0mvE3i4x27zfRpBxEU05OiW6GdGqRMnK7jZCGrQrtYnIrahGIT/Mbr9ldE/j+7FLJ+b3mgczyJdaqx01EnoDF9fmclPjQABFyn/Ow89AjN6fPXw9ubxCVSUoyc68Wf3SL/K2FR3JDqW7nIvggFqS8/p7lSJwQRlmxZJIs5CtFmlxTkKSI4iZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9mp3CMNMTbgO/xPeP+EKXAIAuT1Fom572fodin7/55c=; b=MD1IZFiCIwlZdd2TlZwNZUm9xyjKAKCkj25tPwc1/hgFEMZCM+m15cmp8wRT4te257HCcI8Jekxlg91N99z5Kx5clSrIqjClqqGViNdDTGxvzKmX5pyTt/K8+iUBKq+4Mcz3f6SDf27yTz7JZ5i6YvbFHHFNmQDrQTN46aKJVutAD96dMZ6XszXNoNLensI+v5JTGizWnXIeiKcQenmdbQYmySRmVxnJQLlPZVwRvvAl0cATm3kSxWdWKppoN60jS9dmAr/Mz7aNrjnp/eokrnrAIugZZ+xZmvdqL67+bR1hlNnUGFu2MHI+m6YPrcZyCPkXeE/26K5DdrI0LhnyWA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=gigacodes.de; dmarc=pass action=none header.from=gigacodes.de; dkim=pass header.d=gigacodes.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gigacodes.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9mp3CMNMTbgO/xPeP+EKXAIAuT1Fom572fodin7/55c=; b=u9r2qspt02MPIZ+lXRPcM5knyh5WUrYKJXRemm1jHz59oznGZ39pLf1iApNYH82snYsWXzfX+X6xOOv+XZaTTiYKqrIZVPdwVRh5X+eJY0Jq+gU8e1BwqlcVxTieWyEyldOi8wDWqmQyZTfaWXYpv+zC7VhMgm8UhxGb0ErWwqE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=gigacodes.de; Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) by VE1PR10MB2941.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:106::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.24; Thu, 24 Feb 2022 10:06:33 +0000 Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::116e:6242:98da:22ba]) by PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::116e:6242:98da:22ba%7]) with mapi id 15.20.5017.024; Thu, 24 Feb 2022 10:06:33 +0000 From: Fabian Stelzer To: git@vger.kernel.org Cc: Todd Zullinger , Henning Schild , "brian m . carlson" , Hans Jerry Illikainen , Junio C Hamano Subject: [PATCH 2/3] t/lib-gpg: reload gpg components after updating trustlist Date: Thu, 24 Feb 2022 11:06:27 +0100 Message-Id: <20220224100628.612789-2-fs@gigacodes.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220203123724.47529-1-fs@gigacodes.de> References: <20220203123724.47529-1-fs@gigacodes.de> X-ClientProxiedBy: AM6P193CA0100.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::41) To PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 449f8982-672d-4f49-b20c-08d9f77d5599 X-MS-TrafficTypeDiagnostic: VE1PR10MB2941:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EsgvaGXciNv8KTX3//VWEUWlQLHluJzvv2Ig6TS2RN1MqXqediuIVxAAgmBoujv7A5hrySxfbRw9UOJqkWP6O3faQX1GxcI0zcnnyXp0inuUwMHlWLCtcBDxOLa1KCvYoEXj8vNer6OmWwiReDtTocecGTHHcrlDaYDpC0R+HCL5d8cOLq3wZ3AWPW56jZawQrj7tgYx2l4IbZ2Ukeor1CD1aSGhLbF82lJ58eZiPUDLpOfoag4sC8LGgxPb64v4IcdpB/aq/crIiV1A/bnu9oiYZVHramUrVhPs/4RF3WcPlW361tbRxJbSzhh0+dgCVIbuYJowEPzvaej+1uTer0SrFn774R8nqLZS9A6T9GWrL48tWUYpyVbuyRo5J05oSX/1mBoQy3BjC8Wql50H6KUDRirXhP4QUShI+kXRYv5cv3Nd1OXkEFS76JTCvCg9Sa/h9WoezMIXPneFQA8j52F8nJ4RBrG8TVoEBOV3c7Y9MoOsOa9Yy+aAUSy103ntiQPYYPS26JDROfc4gm6ZlUYuAdM0C1H916osG9QVJj7bF6u1jx5q18advLiFwVhxbaHumg9P44e5BdhAsR+9pPguaGvxVkgZb1xfbrKBBk0kBOjYkWqvATyiQf+0VjGZWCMWz8puDir12mufVR4KUQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(4636009)(39840400004)(396003)(136003)(366004)(376002)(346002)(26005)(86362001)(2906002)(1076003)(66946007)(66556008)(186003)(8676002)(8936002)(66476007)(4326008)(6506007)(6666004)(5660300002)(2616005)(6486002)(38100700002)(54906003)(36756003)(316002)(6916009)(508600001)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NUySGDzlF71955oGTB5JfpOxS3N0QhKGvRGqgJPdhXgN53b7ye0JwvFmuRMBT+iWLoC/wbRMKCb6292hnVIEZzwV6nbsbcxRYuOGq9ohdWek2QFnaZ52uU33Nk0qvmfK9aJgxWSBJdw9t138KaOscVfuyUfWRgu7F0xe15uXEPpwT3PHHxnn3o72JJJoADvREUCBtysRBdYj322cWT/+OnKZJ9eW2X7NoeHnUq80SVk+LltCp5JQAMbuso4kMPRsdQJ4UgvFWsEkoi/hDJWDedtUjRQ0GYaAT3SioRqgwGkKrpuFW6FygXqwrwTLf1BJPrD0LCuVvVOI7IGZxDR5okrHFw1M/OIQSB+K49B8xoAzIakaynTSs91i03W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Wg6YA/IHv2Txeh3h4TR1rlGyymFiP5yL74Vvb7Vfw6/RHM5aTCoe72bqkCBQZ0wH1GCg9T6AZ++8mhfWiyfTMXabIpig8y7x52JrTKOeX36ZYMXC9l15EsqwQDX+8PNkI4vo1XW2Ds8UHz8EAv6CWBj4NGTrpL3ypBTYBjCTozAZ+qgc0OxcGjR5p9OM3myGu912CSTn9cjeFoesXqIVlZTSHgbbu1znSaa0OJCNSsG1WeOOV8/lguXvqU= X-OriginatorOrg: gigacodes.de X-MS-Exchange-CrossTenant-Network-Message-Id: 449f8982-672d-4f49-b20c-08d9f77d5599 X-MS-Exchange-CrossTenant-AuthSource: PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2022 10:06:32.9838 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 80e41b3b-ea1f-4dbc-91eb-225a572951fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +CauERL9IohKl1D+WWGpPhRKUDiz0G9HzHIpK1N2hHBTIwASoqMDJVSvtklADOt+v7xaq26FdTf/ia7o9dNAfJmLZLpKYVNyRiqDvcGQ+wM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR10MB2941 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Todd Zullinger With gpgsm from gnupg-2.3, the changes to the trustlist.txt do not appear to be picked up without refreshing the gpg-agent. Use the 'all' keyword to reload all of the gpg components. The scdaemon is started as a child of gpg-agent, for example. We used to have a --kill at this spot, but I removed it in 2e285e7803 (t/lib-gpg: drop redundant killing of gpg-agent, 2019-02-07). It seems like it might be necessary (again) for 2.3. Signed-off-by: Todd Zullinger --- t/lib-gpg.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh index e997ce10ea..2bad35e61a 100644 --- a/t/lib-gpg.sh +++ b/t/lib-gpg.sh @@ -75,6 +75,7 @@ test_lazy_prereq GPGSM ' gpgsm --homedir "${GNUPGHOME}" -K --with-colons | awk -F ":" "/^(fpr|fingerprint):/ {printf \"%s S relax\\n\", \$10}" \ >"${GNUPGHOME}/trustlist.txt" && + (gpgconf --reload all || : ) && echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \ -u committer@example.com -o /dev/null --sign - From patchwork Thu Feb 24 10:06:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Stelzer X-Patchwork-Id: 12758284 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D80E9C433F5 for ; Thu, 24 Feb 2022 10:06:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233152AbiBXKHL (ORCPT ); Thu, 24 Feb 2022 05:07:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232187AbiBXKHH (ORCPT ); Thu, 24 Feb 2022 05:07:07 -0500 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00064.outbound.protection.outlook.com [40.107.0.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F31B99FD4 for ; Thu, 24 Feb 2022 02:06:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jWOcBBOhOjloUhazrkKbT2QcnqyHuQyUQpHWG8W20R8GBMyQ3x+K1tEaeH8JuNTy9TIKuJfVwsnpIR0kaN6sh+24cJOms5sYsITdSlw8lHjbSiYSO14euk+jKQ12aIk8+9589jKBGxyEjge9L/ic3x/YYR86LBo5xoDwvW1E9/0rsjkrvrlPPJetBm2Lu6VelXpVrMg7LByqCfwNZ/22Amf41ykX9fD41t+0XqKhnVJmH7gYktEneTcp4NYjKgpiFGa/byj9VwDShHvZyc+ma2oAhHp+II4nZzGlgV4jHGBvfTFcqwsHamyZQ7LQvJD45mlSGos4weSOo8qV1VF3UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2dbjYIUSUiqVyL3Lcz9VDfZyMKEuUxGhxOkyXLF6cmw=; b=OVwEDQOAEM4mByGKotOl2mI9ms2wZIF11pcK2K6ZFUrkDSD4yV8i6F7qgMr7wubg/bbPVp1ooslIb4AUoh1i9Sk/unGaV9WGL/qhL/UoivlQyueD0lEliAD4dtjrd6FnkiPd1Ju/1WAkdMhR06s3QsHnTajKcb5Mb0u/yT99SU8zgaFDdttQb1/HYY0/Y6o8+BhkZ92xvm22OqbEZv8Fmv3I6QQZxxsjWdwPKdHU8Qzs94G0jHao6PtpXbQsxiwGsI5ww7lj9T7rwlDnVBBuZ7W3+nqww/UvUSwBRPcyPWXNnzlFoCQ4hhegTvmdzk6DaISV+JUL0DOtPu/HBlvZNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=gigacodes.de; dmarc=pass action=none header.from=gigacodes.de; dkim=pass header.d=gigacodes.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gigacodes.de; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2dbjYIUSUiqVyL3Lcz9VDfZyMKEuUxGhxOkyXLF6cmw=; b=RMsnN50HjeBYQt38mGBS9+wEnmTs36AEg2wXo9ixWgJBPI456DfOlTkJH9tI0CIk5aoNQ6WTbBVEWTdFIdtsjklm3IeLZt3VVdW7wpE3V9oaVhWFA0UfakisiR1tqETs3W4PDUWawh3dH5qhjWOK83wS+IAQJHKAR33djJ9+AlM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=gigacodes.de; Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) by PR3PR10MB3898.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:42::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.24; Thu, 24 Feb 2022 10:06:34 +0000 Received: from PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::116e:6242:98da:22ba]) by PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM ([fe80::116e:6242:98da:22ba%7]) with mapi id 15.20.5017.024; Thu, 24 Feb 2022 10:06:34 +0000 From: Fabian Stelzer To: git@vger.kernel.org Cc: Todd Zullinger , Henning Schild , "brian m . carlson" , Hans Jerry Illikainen , Junio C Hamano Subject: [PATCH 3/3] t/lib-gpg: kill all gpg components, not just gpg-agent Date: Thu, 24 Feb 2022 11:06:28 +0100 Message-Id: <20220224100628.612789-3-fs@gigacodes.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220203123724.47529-1-fs@gigacodes.de> References: <20220203123724.47529-1-fs@gigacodes.de> X-ClientProxiedBy: AM6P192CA0060.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::37) To PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:12e::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 33deb776-8103-4dcf-f88e-08d9f77d5666 X-MS-TrafficTypeDiagnostic: PR3PR10MB3898:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HQYwNBG9MJCiJ6c40qE8aoWakdh0NgvlvJG25QwOl6N2oxVwHA7sMAD+yBGRasqN8vtB3aWkJnxO2xGqzv+9aFGmaRWv58cdcsL74VAAh9c1QBFtThOH+9l+6Wz3FOntAabASGSKgXgwnsLD4iK0q642Wz5Na+mdnQxGvzNES3geNTuHyOkV0r/uS/vtElVarcNO0rphBWz+6GfH3MO+Wfyha6sCsBiwDewxWn/hIx1/oFEdYACEheIcFkpBv4NdqE+VQ/N+jqd3pCIydz2woAISymHJGkglsZanxLtUl5lE9ZhsuXIqn+/Tq1/GStu6z48H+XJlW2dfVpFPa8K3oHGbn0F5ANVOkg++NdAG6IpDLMHoRpKOtzAmiqHTxh99b0Scm1Q3+zmQ3SWakeJtyfY/kyutK3w8mUPLUFmlhTk/SQee51xU060azM1M/i6y47FWhHaqcZAFkBLX8ZGpuRnLdKtqK0EnObLM+EvZ1EBdJtADuRkDgtOmGAKGRnVWWVJjlXnAB4pN0RxxIn6XyBmsD25vARzQhRas9ndDA/GXAFJA7qgQeeAoL/v1R+Dy5XCDSJ1U7jX6/MXb2nM8DVcVO0g9OMXrel0R2wr3IzRqS1tOXio/UMXA88kX0c0h1Jdsvu7SFDyElXKPP+MDuA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(346002)(396003)(39840400004)(376002)(136003)(6506007)(6512007)(6666004)(86362001)(83380400001)(6486002)(1076003)(508600001)(2616005)(186003)(26005)(8676002)(6916009)(316002)(36756003)(38100700002)(54906003)(5660300002)(2906002)(8936002)(66556008)(66946007)(4326008)(66476007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ac181Wk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MHfCt+3Qj+JMZmBVBB/tOEdsSuOSvsdNwhRQZBejwmWI81eTxLzLubPUhxIGHpQrvaDsyg7c8tCf+jNhdRvaVnRIQ5IQX9hUUN2nwgv5O7D4ht7MQXWGIevNtmFPYgljOu3OvLJmjgD0LvvzvPRP7atijLHYOINnD/PIXtSFzKig0Q0wseNA7lKrH9SbqytZRkkRhdynnQMMfGXT98bWCeW1x5cvrDVZPL3vrC6tivXcbZ4HDZDY4xl+UPspbVIWbbspWf0WOCEzp/EYRAJjoitkX83P9Wdbk+VmI3+nOv7tx1x/nmpbgfUARpv9lwvhc6EF0ntjQbCTEgTfmnJ28ArOzLfeiJwYUo9amzQdbNZvOVfz4gkw33bk87RdBHWOH1OgkKwe+w3i50zyvy8PgqqWchC3onsbgmUfynXdvYGvjw23brMknUzzQgDuqheJWrUJRO5QE/M6dL2HKv+2eSCF2sihINp6nNn6VaQZIdWOn1uQq9hn/U1VWDAm1xNxN1ZWS4rbj+ozei1rs2cbZiHzipdzlQDJ3aeV4RnhmJUuct7UMgjd4HLSOF+S3Z9qJVGVU35ikrCHv/K+JpJA2DmghQYFCKn+4u8Vu7AOM0DdIVgM0GtKrJEHT1iu+rM= X-OriginatorOrg: gigacodes.de X-MS-Exchange-CrossTenant-Network-Message-Id: 33deb776-8103-4dcf-f88e-08d9f77d5666 X-MS-Exchange-CrossTenant-AuthSource: PAXPR10MB4734.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2022 10:06:34.3447 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 80e41b3b-ea1f-4dbc-91eb-225a572951fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iMQoathAdjiq4n2jrYEWyZQLZyYbpjY89T+n8Rg9E7zq9c4fPY75T7YQ0o7US3jtM6eEBOfB6Zt7QTeBWnzAbTKsrrcqgJUE3KfTyCaw0Co= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR10MB3898 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Todd Zullinger The gpg-agent is one of several processes that newer releases of GnuPG start automatically. Issue a kill to each of them to ensure they do not affect separate tests. (Yes, the separate GNUPGHOME should do that already. If we find that is case, we could drop the --kill entirely.) In terms of compatibility, the 'all' keyword was added to the --kill & --reload options in GnuPG 2.1.18. Debian and RHEL are often used as indicators of how a change might affect older systems we often try to support. - Debian Strech (old old stable), which has limited security support until June 2022, has GnuPG 2.1.18 (or 2.2.x in backports). - CentOS/RHEL 7, which is supported until June 2024, has GnuPG 2.0.22, which lacks the --kill option, so the change won't have any impact. Signed-off-by: Todd Zullinger --- t/lib-gpg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh index 2bad35e61a..8b9fb6e932 100644 --- a/t/lib-gpg.sh +++ b/t/lib-gpg.sh @@ -40,7 +40,7 @@ test_lazy_prereq GPG ' # > lib-gpg/ownertrust mkdir "$GNUPGHOME" && chmod 0700 "$GNUPGHOME" && - (gpgconf --kill gpg-agent || : ) && + (gpgconf --kill all || : ) && gpg --homedir "${GNUPGHOME}" --import \ "$TEST_DIRECTORY"/lib-gpg/keyring.gpg && gpg --homedir "${GNUPGHOME}" --import-ownertrust \