All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Chikunov <vt@altlinux.org>
To: Mimi Zohar <zohar@linux.ibm.com>
Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>,
	Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
	linux-integrity@vger.kernel.org,
	"Bruno E. O. Meneguele" <bmeneg@redhat.com>,
	Petr Vorel <pvorel@suse.cz>
Subject: Re: [PATCH] ima-evm-utils: remove redundant call to OpenSSL_add_all_algorithms
Date: Wed, 30 Jan 2019 16:53:42 +0300	[thread overview]
Message-ID: <20190130135342.wx7vcq7hyvxqtqxd@altlinux.org> (raw)
In-Reply-To: <1548855673.20210.102.camel@linux.ibm.com>

On Wed, Jan 30, 2019 at 08:41:13AM -0500, Mimi Zohar wrote:
> [Cc'ing Bruno, Petr]
> 
> On Wed, 2019-01-30 at 16:25 +0300, Vitaly Chikunov wrote:
> > 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.
> 
> I think this is basically a packaging question.  Instead of hard
> coding this change, it could be an autoconf option (eg.
> enable/disable-gost).

User already have control to load or not engines by editing or not the
config. But, if OpenSSL_add_all_algorithms() is used without defining
OPENSSL_LOAD_CONF (default) user will lose such option.

I think loading config is quite normal operation which is also default
for the openssl binary.

> 
> Bruno, Petr, any preference?
> 
> Thanks,
> 
> Mimi

  reply	other threads:[~2019-01-30 13:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-27  2:39 [PATCH] ima-evm-utils: remove redundant call to OpenSSL_add_all_algorithms Vitaly Chikunov
2019-01-30 12:34 ` Mimi Zohar
2019-01-30 13:25   ` Vitaly Chikunov
2019-01-30 13:41     ` Mimi Zohar
2019-01-30 13:53       ` Vitaly Chikunov [this message]
2019-01-30 15:59         ` Petr Vorel
2019-01-30 15:35     ` James Bottomley
2019-01-30 16:12       ` Vitaly Chikunov
2019-01-30 16:44         ` James Bottomley
2019-01-30 17:54           ` Vitaly Chikunov
2019-01-30 18:36             ` James Bottomley
2019-01-31  9:22               ` Vitaly Chikunov
2019-01-31 20:29                 ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190130135342.wx7vcq7hyvxqtqxd@altlinux.org \
    --to=vt@altlinux.org \
    --cc=bmeneg@redhat.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=pvorel@suse.cz \
    --cc=zohar@linux.ibm.com \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.