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=-6.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT 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 06761C282D7 for ; Wed, 30 Jan 2019 13:25:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA5A52184D for ; Wed, 30 Jan 2019 13:25:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726332AbfA3NZY (ORCPT ); Wed, 30 Jan 2019 08:25:24 -0500 Received: from vmicros1.altlinux.org ([194.107.17.57]:36718 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfA3NZY (ORCPT ); Wed, 30 Jan 2019 08:25:24 -0500 Received: from imap.altlinux.org (imap.altlinux.org [194.107.17.38]) by vmicros1.altlinux.org (Postfix) with ESMTP id 5885472CC6D; Wed, 30 Jan 2019 16:25:22 +0300 (MSK) Received: from altlinux.org (sole.flsd.net [185.75.180.6]) by imap.altlinux.org (Postfix) with ESMTPSA id 431674A4A16; Wed, 30 Jan 2019 16:25:22 +0300 (MSK) Date: Wed, 30 Jan 2019 16:25:21 +0300 From: Vitaly Chikunov To: Mimi Zohar Cc: Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org Subject: Re: [PATCH] ima-evm-utils: remove redundant call to OpenSSL_add_all_algorithms Message-ID: <20190130132521.edhtrv54labxlbyc@altlinux.org> References: <20190127023916.2425-1-vt@altlinux.org> <1548851697.20210.91.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1548851697.20210.91.camel@linux.ibm.com> User-Agent: NeoMutt/20171215-106-ac61c7 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Wed, Jan 30, 2019 at 07:34:57AM -0500, Mimi Zohar wrote: > On Sun, 2019-01-27 at 05:39 +0300, Vitaly Chikunov wrote: > > Because of call to OPENSSL_add_all_algorithms_conf() calling > > OpenSSL_add_all_algorithms() is not needed. There was not be any > > problems though because double initialization is permitted. > > --- > > src/libimaevm.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/src/libimaevm.c b/src/libimaevm.c > > index 7501303..b038d0c 100644 > > --- a/src/libimaevm.c > > +++ b/src/libimaevm.c > > @@ -995,7 +995,6 @@ int sign_hash(const char *hashalgo, const unsigned char *hash, int size, const c > > > > static void libinit() > > { > > - OpenSSL_add_all_algorithms(); > > OPENSSL_add_all_algorithms_conf(); > > ERR_load_crypto_strings(); > > } > > The only difference between the two calls seems to be reading the > system openssl.cnf file. šIn the original call that is dependent on > OPENSSL_LOAD_CONF being defined. šCalling > OPENSSL_add_all_algorithms_conf(), forces reading the system > openssl.cnf. Yes. OPENSSL_LOAD_CONF is per application define, which is by default undefined. And instead of defining it, we could just call OPENSSL_add_all_algorithms_conf(), which is required for GOST support. Otherwise enabling Streebog via OPENSSL_CONF will not work. Thanks, > > Mimi