Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2018 18:45:10 -0400
From:      "Jason E. Hale" <jhale@freebsd.org>
To:        Alexey Dokuchaev <danfe@freebsd.org>
Cc:        "Jason E. Hale" <jhale@freebsd.org>, ports-committers <ports-committers@freebsd.org>,  svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r481881 - in head/archivers/libunrar5: . files
Message-ID:  <CAJE75NHiqxx1WAd2qL66fCAXYse3xS%2BRYrXcL-oFBS_FfCktag@mail.gmail.com>
In-Reply-To: <20181028104811.GB20356@FreeBSD.org>
References:  <201810120735.w9C7ZlgE052626@repo.freebsd.org> <20181028104811.GB20356@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 28, 2018 at 6:48 AM Alexey Dokuchaev <danfe@freebsd.org> wrote:
>
> On Fri, Oct 12, 2018 at 07:35:47AM +0000, Jason E. Hale wrote:
> > New Revision: 481881
> > URL: https://svnweb.freebsd.org/changeset/ports/481881
> >
> > Log:
> >   Fix build with OpenSSL 1.1.x
> >
> >   Reported by:        pkg-fallout (head)
> >
> > ...
> > ++#if OPENSSL_VERSION_NUMBER < 0x10100000L
> >  +  EVP_CIPHER_CTX_init(&ctx);
> >  +  EVP_CipherInit_ex(&ctx, cipher, NULL, key, initVector, Encrypt);
> >  +  EVP_CIPHER_CTX_set_padding(&ctx, 0);
>
> Shouldn't it read 0x10100005L instead?
>
> >   class Rijndael
> >   {
> >     private:
> >  +#ifdef OPENSSL_AES
> > ++#if OPENSSL_VERSION_NUMBER < 0x10100000L
> >  +    EVP_CIPHER_CTX ctx;
> > ++#else
> > ++    EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
> > ++#endif
>
> This looks fishy; I think EVP_CIPHER_CTX_new() should be called in ctor and
> EVP_CIPHER_CTX_free() in dtor (the latter is missing altogether).
>

You're probably right. I just synced the patches with those in
archivers/unrar which uses the same source code. I will investigate it
further. Thanks!

- Jason



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJE75NHiqxx1WAd2qL66fCAXYse3xS%2BRYrXcL-oFBS_FfCktag>