From patchwork Wed Nov 25 07:26:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lee, Chun-Yi" X-Patchwork-Id: 332471 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 267F2C5519F for ; Wed, 25 Nov 2020 07:28:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD80320665 for ; Wed, 25 Nov 2020 07:28:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GAuDDIGo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727952AbgKYH1d (ORCPT ); Wed, 25 Nov 2020 02:27:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727320AbgKYH1d (ORCPT ); Wed, 25 Nov 2020 02:27:33 -0500 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 589F8C0613D4; Tue, 24 Nov 2020 23:27:33 -0800 (PST) Received: by mail-pf1-x443.google.com with SMTP id t8so1483707pfg.8; Tue, 24 Nov 2020 23:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EtMyIIa0dfE/QxK1mo3o94wUXlDlUpOZPp8wYKgkTzw=; b=GAuDDIGoz/9BjdCLAX04/32hETUiy4Y/DNu0ABD2vXYvye7w29Sg5wLDbijD0LT1Od G8qBzBfvisETGWWgel0V7vLklretDFquuVvOiGj24DcwR5FnI6SItOXI6YTEoP2IRSUD Vw/r4wq1z1BBUnSnqwnUjo0kDGT7idCBPtBW8Ye2iU61M+c3buiJDZTHPt78YcwMWx6e 9fwKRKiL/Dt5QfvYZ6X00w57TRIu+0oDizsMty0JAGM3YWXUzozLewXdNZ72W/PSKdXG nw7FvozffiqqXXN1+XejOdjT9c57FzTRde39pGP5oPuEZFzSblL6Rl7N6MxmeefgTjv2 0F+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EtMyIIa0dfE/QxK1mo3o94wUXlDlUpOZPp8wYKgkTzw=; b=ZXMLY8/V0FdC/T7df6Two0BKXzIVJPYj+wfxfT2v815DMio0bkzDuCZCkBKx2TOmTe Ju4vJlPu+MfyUY0452cR3oHpEgij4f9OIKfNHCzNxFs+hTvOhBacAcQtX3cacKq2Opqy 7HO5T5KZDjaH0QonW7EHjlUsj+xciwT0VmhB1lF/XQyKJm7j06dhGgWZVLWeS/Xlz2YN g3BvHHZtps72MW8S8k0G9AF1T34XNyehB50wX8Df+5BYUb4woOz3bL73SA6UeD1topVE aeyIUsuos0KL0dko3vPmx2DX5rLoq3PvFzJwpylf+IglvBkmyFn2bcR6oxUPZTIq275Q ajHA== X-Gm-Message-State: AOAM532atMzZSwfGD8TqXqREUL28GZSbAlbjnX6naxGd/9Pd8mCm3da4 jcutglRrvOLgofj49cseD2WeapdC6gI= X-Google-Smtp-Source: ABdhPJxtv1hHifHhJ432ltFaM2mpBjgORSGHWd1aQFRx5D9QizTblsSkNjhiNT6hwmnCsCce6Y7J3g== X-Received: by 2002:a17:90a:6041:: with SMTP id h1mr2601701pjm.35.1606289253026; Tue, 24 Nov 2020 23:27:33 -0800 (PST) Received: from linux-l9pv.suse ([124.11.22.254]) by smtp.gmail.com with ESMTPSA id q7sm1006055pfh.91.2020.11.24.23.27.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Nov 2020 23:27:32 -0800 (PST) From: "Lee, Chun-Yi" X-Google-Original-From: "Lee, Chun-Yi" To: David Howells Cc: Herbert Xu , "David S . Miller" , Ben Boeckel , Randy Dunlap , Malte Gell , keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, "Lee, Chun-Yi" Subject: [PATCH 4/4] Documentation/admin-guide/module-signing.rst: add openssl command option example for CodeSign EKU Date: Wed, 25 Nov 2020 15:26:53 +0800 Message-Id: <20201125072653.15657-5-jlee@suse.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20201125072653.15657-1-jlee@suse.com> References: <20201125072653.15657-1-jlee@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Add an openssl command option example for generating CodeSign extended key usage in X.509 when CONFIG_CHECK_CODESIGN_EKU be enabled. Signed-off-by: "Lee, Chun-Yi" --- Documentation/admin-guide/module-signing.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/admin-guide/module-signing.rst b/Documentation/admin-guide/module-signing.rst index f8b584179cff..bc184124d646 100644 --- a/Documentation/admin-guide/module-signing.rst +++ b/Documentation/admin-guide/module-signing.rst @@ -170,6 +170,12 @@ generate the public/private key files:: -config x509.genkey -outform PEM -out kernel_key.pem \ -keyout kernel_key.pem +When ``CONFIG_CHECK_CODESIGN_EKU`` option be enabled, the following openssl +command option should be added for generating CodeSign extended key usage in +X.509:: + + -addext "extendedKeyUsage=codeSigning" + The full pathname for the resulting kernel_key.pem file can then be specified in the ``CONFIG_MODULE_SIG_KEY`` option, and the certificate and key therein will be used instead of an autogenerated keypair.