From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666AbbBYNSZ (ORCPT ); Wed, 25 Feb 2015 08:18:25 -0500 Received: from cantor2.suse.de ([195.135.220.15]:33675 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751286AbbBYNSY (ORCPT ); Wed, 25 Feb 2015 08:18:24 -0500 Message-ID: <54EDCB9E.4080602@suse.cz> Date: Wed, 25 Feb 2015 14:18:22 +0100 From: Michal Marek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: David Howells CC: rusty@rustcorp.com.au, keyrings@linux-nfs.org, dmitry.kasatkin@gmail.com, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH 4/5] MODSIGN: Provide a utility to append a PKCS#7 signature to a module [ver #3] References: <20150206145834.17303.59753.stgit@warthog.procyon.org.uk> <20150206145914.17303.58238.stgit@warthog.procyon.org.uk> In-Reply-To: <20150206145914.17303.58238.stgit@warthog.procyon.org.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015-02-06 15:59, David Howells wrote: > + if (argc == 5) { > + dest_name = argv[4]; > + replace_orig = false; > + } else { > + ERR(asprintf(&dest_name, "%s.~signed~", module_name) < 0, > + "asprintf"); > + replace_orig = true; > + } > + > + ERR_load_crypto_strings(); > + ERR_clear_error(); The error queue initialization should be done before the first use of the ERR() macro. Or the asprintf check should be open-coded, because it has nothing to do with openssl. Michal