From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1huaRe-0007cp-RM for barebox@lists.infradead.org; Mon, 05 Aug 2019 10:42:29 +0000 Message-ID: <1565001745.2323.5.camel@pengutronix.de> From: Lucas Stach Date: Mon, 05 Aug 2019 12:42:25 +0200 In-Reply-To: <779cf1615ca931b2687c6fa8a4b5f4e481f8af82.1564997015.git-series.r.czerwinski@pengutronix.de> References: <779cf1615ca931b2687c6fa8a4b5f4e481f8af82.1564997015.git-series.r.czerwinski@pengutronix.de> Mime-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v2 13/16] arm: uncompress: verify sha256 if enabled To: Rouven Czerwinski , barebox@lists.infradead.org QW0gTW9udGFnLCBkZW4gMDUuMDguMjAxOSwgMTE6MjMgKzAyMDAgc2NocmllYiBSb3V2ZW4gQ3pl cndpbnNraToKPiBBZGQgcGlnZ3lkYXRhIHZlcmlmaWNhdGlvbiBiZWZvcmUgdGhlIEFSTSB1bmNv bXByZXNzIGZ1bmN0aW9uLgo+IFRoaXMgY2FsY3VsYXRlcyB0aGUgc2hhMjU2c3VtIG9mIHRoZSBj b21wcmVzc2VkIGJhcmVib3ggYmluYXJ5IGFuZCBvbmx5Cj4gY29udGludWVzIGlmIHRoZSBidWls dGluIHNoYTI1NnN1bSBtYXRjaGVzIHRoZSBjYWxjdWxhdGVkIHNoYTI1NnN1bS4KPiAKPiA+IFNp Z25lZC1vZmYtYnk6IFJvdXZlbiBDemVyd2luc2tpIDxyLmN6ZXJ3aW5za2lAcGVuZ3V0cm9uaXgu ZGU+Cj4gLS0tCj4gwqBhcmNoL2F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