From mboxrd@z Thu Jan 1 00:00:00 1970 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.8 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,USER_AGENT_GIT autolearn=ham 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 962E7C432BE for ; Thu, 26 Aug 2021 21:55:47 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BC0B60F5C for ; Thu, 26 Aug 2021 21:55:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0BC0B60F5C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5738083210; Thu, 26 Aug 2021 23:55:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fpaSsQWU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B093A83211; Thu, 26 Aug 2021 23:55:43 +0200 (CEST) Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D720F83140 for ; Thu, 26 Aug 2021 23:55:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-ot1-x330.google.com with SMTP id l7-20020a0568302b0700b0051c0181deebso5379836otv.12 for ; Thu, 26 Aug 2021 14:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=htdJj+GBLVxV0n/+DFJMV6l8RXwV7RHu5VP4hwpK3NU=; b=fpaSsQWUcV5B5UToYwP9ngiYXAfdZkomB9KY3oIcsh4X3Wb9FjqkNF+px5qXoUnJ7S dVlSyUHu14bOqSdnzhqF7NiXQUvO+9fDebAGzk3W1jK2vJXEV8Ozx+uA8bw8e9dX/3qQ QuvrJrIg5bHt24HYDveC3oGNion0pFKTT8zJbogkJMbZo/Q83aMXRK1Xx+snIOeeW9O1 KdSENQ27dQs4CpXiPSEN2fU2EM6G82AeMTGx4mJZf+OjdWUcIBdXHpy18N+FAxDj1C0W mNi2SsNJGg8SPvXJwVXrDSyxPAoeU2SivJjOKDW+iuXreBREO+bUhSZSxXLQJVn1RvPB fXPA== 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:mime-version :content-transfer-encoding; bh=htdJj+GBLVxV0n/+DFJMV6l8RXwV7RHu5VP4hwpK3NU=; b=Oh1XAuVgcvHERvtUj5wSgoHXBoHVuYCC2N6k2xbvZwOkbmJ6gUBAYZRCQ+IrOPMgp5 SOJp380l6pPjhr+kkI/aLO7hosvfWwD0E8toEO7hVOmei4qQna9bIwWeDVzjTBE1kCsI 85cPKDeDL+Q372guho63/jyd/AOA6sigw8wHnl1mJnF8fI4dHWubSm09RwQHi1mK0c1G ATmQV0pcSuhglJy6VXXM+G+FCHJFg6aILcK9oXNGD9W8Jy0qNyUPuNGn1Uk5mbKSsLId uZq5d7rqKZ/9tuNs/tCu6ND/zcxcbJo1+6ZDFdZnCX2nYy4YZOuDoQMg9NcRzKVc+R4K aX/g== X-Gm-Message-State: AOAM531ZBsBsSHpAG/D1RH6MRudu/qp54dUK0MDvnIr5TwjmP3cvZ//f fM7UAeoS1n1AcM1SdnABZrs3RArjCMs= X-Google-Smtp-Source: ABdhPJxm0plefNw4Qc6bWny4Su3yhZEm9F4T2/3U22HPL7ZHa0bPe530KD4V3eo9r9T94in0NQnPhQ== X-Received: by 2002:a05:6830:86:: with SMTP id a6mr5269345oto.88.1630014939145; Thu, 26 Aug 2021 14:55:39 -0700 (PDT) Received: from nuclearis3.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id i188sm924953oih.7.2021.08.26.14.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 14:55:38 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de Cc: sjg@chromium.org, Alexandru Gagniuc Subject: [PATCH] mkimage: Don't disable encryption based on CONFIG_FIT_CIPHER Date: Thu, 26 Aug 2021 16:55:33 -0500 Message-Id: <20210826215533.256327-1-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean We want the u-boot tools to be target agnostic, as explained in commit cb9faa6f98ae (" tools: Use a single target-independent config to enable OpenSSL") Making mkimage features depend on CONFIG_FIT_CIPHER is contrary to that goal. Thus, always enable cihper features in mkimage, and ignore the value of CONFIG_FIT_CIPHER for host-only code. Signed-off-by: Alexandru Gagniuc --- include/image.h | 5 ----- tools/image-host.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/image.h b/include/image.h index e20f0b69d5..381ee91eb5 100644 --- a/include/image.h +++ b/include/image.h @@ -1432,14 +1432,9 @@ static inline int fit_image_check_target_arch(const void *fdt, int node) * device */ #if defined(USE_HOSTCC) -# if defined(CONFIG_FIT_CIPHER) # define IMAGE_ENABLE_ENCRYPT 1 # define IMAGE_ENABLE_DECRYPT 1 # include -# else -# define IMAGE_ENABLE_ENCRYPT 0 -# define IMAGE_ENABLE_DECRYPT 0 -# endif #else # define IMAGE_ENABLE_ENCRYPT 0 # define IMAGE_ENABLE_DECRYPT CONFIG_IS_ENABLED(FIT_CIPHER) diff --git a/tools/image-host.c b/tools/image-host.c index d3a882ec29..82cb238f54 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -562,7 +562,7 @@ int fit_image_cipher_data(const char *keydir, void *keydest, printf("Failure getting cipher node\n"); return -1; } - if (!IMAGE_ENABLE_ENCRYPT || !keydir) + if (keydir) return 0; return fit_image_process_cipher(keydir, keydest, fit, image_name, image_noffset, cipher_node_offset, data, size, cmdname); -- 2.31.1