Backend specific ifdefs in sha2.h

Started by Daniel Gustafssonalmost 7 years ago4 messageshackers
Jump to latest
#1Daniel Gustafsson
daniel@yesql.se

The #ifdef guards in sha2.h are using USE_SSL when they in fact are guarding
the inclusion of OpenSSL specific code. This has never caused any issues as
there only is a single supported TLS backend in core so far, but since we’ve
spent a significant amount of energy on making the TLS backend non-hardcoded
it seems we should fix this too. The Makefile around sha2.c/sha2_openssl.c is
already testing for openssl rather than ssl (which given src/Makefile.global
variables makes perfect sense of course).

cheers ./daniel

Attachments:

sha2_ifdefs.patchapplication/octet-stream; name=sha2_ifdefs.patch; x-unix-mode=0644Download+3-4
#2Michael Paquier
michael@paquier.xyz
In reply to: Daniel Gustafsson (#1)
Re: Backend specific ifdefs in sha2.h

On Thu, Jun 13, 2019 at 09:32:28AM +0200, Daniel Gustafsson wrote:

The #ifdef guards in sha2.h are using USE_SSL when they in fact are guarding
the inclusion of OpenSSL specific code. This has never caused any issues as
there only is a single supported TLS backend in core so far, but since we’ve
spent a significant amount of energy on making the TLS backend non-hardcoded
it seems we should fix this too. The Makefile around sha2.c/sha2_openssl.c is
already testing for openssl rather than ssl (which given src/Makefile.global
variables makes perfect sense of course).

Right, good catch. I would not back-patch that though as currently
USE_SSL <=> USE_OPENSSL. Any suggestions or thoughts from others?
--
Michael

#3Daniel Gustafsson
daniel@yesql.se
In reply to: Michael Paquier (#2)
Re: Backend specific ifdefs in sha2.h

On 13 Jun 2019, at 10:29, Michael Paquier <michael@paquier.xyz> wrote:

I would not back-patch that though as currently
USE_SSL <=> USE_OPENSSL.

Right, there is no use in backporting of course.

cheers ./daniel

#4Michael Paquier
michael@paquier.xyz
In reply to: Daniel Gustafsson (#3)
Re: Backend specific ifdefs in sha2.h

On Thu, Jun 13, 2019 at 10:31:23AM +0200, Daniel Gustafsson wrote:

Right, there is no use in backporting of course.

And applied now, in time for beta2.
--
Michael