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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E0F25C433EF for ; Fri, 18 Mar 2022 14:38:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5ED958363B; Fri, 18 Mar 2022 15:38:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="WWjgUrnc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 047818366A; Fri, 18 Mar 2022 15:38:06 +0100 (CET) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (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 1AF09820A3 for ; Fri, 18 Mar 2022 15:38:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x431.google.com with SMTP id t24so1824591wra.2 for ; Fri, 18 Mar 2022 07:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=a9/kYL4CBuTXf/qqQZmXX6ZyqWsoXiyVkJLNCIbsjgw=; b=WWjgUrncy/blrjGsrX8Rco9IHAQ9d52pS+MxWBM9imCztH2ljAeQbnCStwWcW5uEVW D/m3Rc1ErLLlkvkWnucq72WjDJzMe6WGexBOH5rZYUDXlPJzmsW4c4asx77kFedwFZpo ykKrkosFHi4ylZX28Kw/bUWx+6yBtlprXYT6V5dqOqNaORENll+1Dgf2dQa8uz/Db5MJ 2QDyNFFhrJVoabVHYS7xNy3TcovVqnqHIDUcskbSlgt38EPoKJecBOBeaH1EUGcolbSy xkpLWIQgi7SD1bTbAYT9MH89dkHw353JqLRWzmBwFEwjFxlplb+kOEQrsENO72k3TPDm mxMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=a9/kYL4CBuTXf/qqQZmXX6ZyqWsoXiyVkJLNCIbsjgw=; b=uJKYlur0NaIm4vZxFx33xCAAZ8Gg5U+NubEqLwfHU0GHJcKTb76cCQ88/dBZP5bzyk 5bXOmFLhSMcXhSq2lDfDrjYzTDou08sOHL4O+2YuCNVNJL4z5V6u4iIGkioWFWHK+ffz ZlutMdrPve0LGch1VZNnbHZ2KMgXuGM2Hge1YOZZDBmrJLjzGcOaVTlCBZvAUog6Y5ix +Dh3375VrM1Dcedy6t5bqXz2sD0pdOeT45DExILkKAifKabsut989q+p5r5irhVI9956 SCr4XK+NDyJ98nizoDai9y2skEu2S59dEsJOAAM02N3ZbAR0JrgTgmbPT/ULhyBr1CiQ v0VA== X-Gm-Message-State: AOAM530gTlM8mvxCZb5RuEjDqW25TC2X1t3jYYcDIB7MY8xMAAkWY+6R kEEla4FB0H9DMZDArvqhmTihjA== X-Google-Smtp-Source: ABdhPJyQwIt+gAXt3Y5taqYaRV3jFpjTqiHWSsH/ueaE4n4qu10ptf9OGM+BWReDEpO7Knv8EH53fQ== X-Received: by 2002:adf:dd0c:0:b0:203:f0c0:f1a5 with SMTP id a12-20020adfdd0c000000b00203f0c0f1a5mr5423967wrm.523.1647614282550; Fri, 18 Mar 2022 07:38:02 -0700 (PDT) Received: from hades (athedsl-4461682.home.otenet.gr. [94.71.4.98]) by smtp.gmail.com with ESMTPSA id n18-20020a5d6612000000b00203fbd39059sm534532wru.42.2022.03.18.07.38.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Mar 2022 07:38:02 -0700 (PDT) Date: Fri, 18 Mar 2022 16:37:59 +0200 From: Ilias Apalodimas To: Dhananjay Phadke Cc: u-boot@lists.denx.de, Simon Glass , Alexandru Gagniuc , Takahiro Akashi Subject: Re: [PATCH] lib/crypto: support sha384/sha512 in x509/pkcs7 Message-ID: References: <20220315171932.3662368-1-dphadke@linux.microsoft.com> <1cf53107-f696-e722-69fd-0b20a0705d54@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1cf53107-f696-e722-69fd-0b20a0705d54@linux.microsoft.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean On Fri, Mar 18, 2022 at 07:10:43AM -0700, Dhananjay Phadke wrote: > On 3/18/2022 12:44 AM, Ilias Apalodimas wrote: > > +cc Akashi-san who initially ported those. > > > > > > On Tue, 15 Mar 2022 at 19:19, Dhananjay Phadke > > wrote: > > > > > > Set digest_size SHA384 and SHA512 algorithms in pkcs7 and x509, > > > (not set by ported linux code, but needed by __UBOOT__ part). > > > > > > EFI_CAPSULE_AUTHENTICATE doesn't select these algos but required for > > > correctness if certificates contain sha384WithRSAEncryption or > > > sha512WithRSAEncryption OIDs. > > > > > > > Does the rest of the code parse those? Or expects -ENOPKG for the > > unsupported certificates? > > Yes these OIDs are parsed by Linux code, see x509_note_pkey_algo(). > U-Boot code allocates digest buf for invoking hash_calculate(), that > needs this digest_size. > > I've verified such certs (chain) with pkcs7_verify_one(). Ah right, I probably missed that as well when I sent 8699af63b8a5 ("lib/crypto: Enable more algorithms in cert verification") Thanks! > > Thanks, > Dhananjay Reviewed-by: Ilias Apalodimas