From patchwork Wed Sep 18 01:26:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1163642 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="F03x6f3j"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46Y2PN5FCcz9s4Y for ; Wed, 18 Sep 2019 11:26:16 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 443A7C21E9F; Wed, 18 Sep 2019 01:24:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 75F4AC21E50; Wed, 18 Sep 2019 01:24:06 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CCA32C21E5B; Wed, 18 Sep 2019 01:23:46 +0000 (UTC) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by lists.denx.de (Postfix) with ESMTPS id 5F2FFC21DFB for ; Wed, 18 Sep 2019 01:23:42 +0000 (UTC) Received: by mail-pg1-f170.google.com with SMTP id n9so3011036pgc.1 for ; Tue, 17 Sep 2019 18:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZaJHSAn1YsfUj2jTL2rmxcmOd/yNAZycnFEGXJJsriI=; b=F03x6f3jvvKB95mNyKe1bxV3pzEF5lIZ3YUKWSucVrG/xn/66O2lwzaeM4p++xMMvK m2ylV44rPSQVXua/9/qEuEWIfwba6q6FYfKTxCXqFzf3o6pTEO3gDKm3d54VwoBiAx2G NPzYGKK++mb4E2BWdEZAhVmFNqXGwnpuAYcxQzHfkjSaPXs8xbFJdZArGM3LT3A2fG0S KlKArMjdSu7eD48WWzjEwuXkjyY/lQsXycc2tAJzlDqF7HEIkh6kVHsCCMe/gDaaKWZe h/yn4s16vm5T56fqAvVknF3FVwrx4UXrpxa7+99vIgFvdnuKAVMv4Mc8SxWfy40SQPtD HB2w== 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:mime-version:content-transfer-encoding; bh=ZaJHSAn1YsfUj2jTL2rmxcmOd/yNAZycnFEGXJJsriI=; b=h40FmgtASCh/EycA2hYoc8bivWhT5Zg5HmZFBl70WgrYhl4ygkigpQb0zhPxFJ0iia dkRGJqtuFvVM/idSGLjWLjzrCWlubNZBm1EjHBdwFVYhzTSLZ/c4EPhdwisUDbuPhl+p MpBMNhiZmMR/fmNRaeeI09lOFm+w234IEdOF75DvgX+urFN55+O5s5MQq3wj3/u9ijVm 3Gvk3wt6mlmMCEj1FbJkl9+oG4tZewbiQLGtexOvEBe6twKKUHFe+mpDiYaZOlz2jhPq qnDcpjmUPJqjsNXifRV7Fr0L7TFy07OaGRU7YkHDnKw1xtCbNSQjfd8IlNzCBk6aZJ8Y cimg== X-Gm-Message-State: APjAAAXwQnbQMRZ0wcyw57rFXcA5DTvsNs8mR0XYO8AnsNTrZxMS00t0 pmQUK+rjbkNtCFaa9uZ3yLz1Qw== X-Google-Smtp-Source: APXvYqw6b9BLLvAmYyz/EfPMDd0jDDp1V+5IBo9aM0alae0It0bDOZU+pLqyf1DsAjJioLnojk3M/g== X-Received: by 2002:a63:db49:: with SMTP id x9mr1632975pgi.44.1568769820927; Tue, 17 Sep 2019 18:23:40 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id n66sm6579075pfn.90.2019.09.17.18.23.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Sep 2019 18:23:40 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, agraf@csgraf.de, trini@konsulko.com Date: Wed, 18 Sep 2019 10:26:32 +0900 Message-Id: <20190918012643.25192-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190918012643.25192-1-takahiro.akashi@linaro.org> References: <20190918012643.25192-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [RFC 04/15] include: image.h: add key info to image_sign_info X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" For FIT verification, all the properties of a public key come from "control fdt" pointed to by fdt_blob. In UEFI secure boot, on the other hand, a public key is located and retrieved from dedicated signature database stored as UEFI variables. Added two fields may hold values of a public key if fdt_blob is NULL, and will be used in rsa_verify_with_pkey() to verify a signature in UEFI sub-system. Signed-off-by: AKASHI Takahiro --- include/image.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/image.h b/include/image.h index 97b6a82d9754..685f5181c829 100644 --- a/include/image.h +++ b/include/image.h @@ -1136,6 +1136,8 @@ struct image_sign_info { struct checksum_algo *checksum; /* Checksum algorithm information */ struct padding_algo *padding; /* Padding algorithm information */ struct crypto_algo *crypto; /* Crypto algorithm information */ + const void *key; + int keylen; const void *fdt_blob; /* FDT containing public keys */ int required_keynode; /* Node offset of key to use: -1=any */ const char *require_keys; /* Value for 'required' property */