Skip to content

Conversation

neheb
Copy link

@neheb neheb commented Aug 6, 2020

Signed-off-by: Rosen Penev rosenp@gmail.com

@alfredh
Copy link
Collaborator

alfredh commented Aug 7, 2020

can you please include which OS and openssl version the warning comes from ?

please include the relevant build output.

@neheb
Copy link
Author

neheb commented Aug 7, 2020

Output is basically the opposite of this: https://travis-ci.org/github/baresip/baresip/jobs/715650996

Tested on OpenWrt with OpenSSL deprecated APIs disabled.

This can be simulated by passing -DOPENSSL_API_COMPAT=0x10100000L and -Werror=implicit-function-declaration .

@alfredh
Copy link
Collaborator

alfredh commented Aug 8, 2020

can you make sure that the patch works with all supported versions of OpenSSL:

  • OpenSSL version 1.0.2
  • OpenSSL version 1.1.0
  • OpenSSL version 1.1.1
  • LibreSSL version 2.x

https://github.com/baresip/baresip/wiki/Supported-platforms#supported-versions-of-openssl

@@ -56,7 +60,7 @@ static int print_system_info(struct re_printf *pf, void *arg)

#ifdef USE_OPENSSL
err |= re_hprintf(pf, " OpenSSL: %s\n",
SSLeay_version(SSLEAY_VERSION));
OpenSSL_version(OPENSSL_VERSION));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it not better to check for the version that the function was added ?

#if VERSION >= X
OpenSSL_version(OPENSSL_VERSION);
#else
SSLeay_version(SSLEAY_VERSION);
#endif

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's done above.

@alfredh
Copy link
Collaborator

alfredh commented Aug 8, 2020

this fails to build on OpenBSD 6.6. with LibreSSL 3.0.2:

modules/debug_cmd/debug_cmd.c:11:1: warning: "OPENSSL_VERSION" redefined
In file included from modules/debug_cmd/debug_cmd.c:9:
/usr/include/openssl/crypto.h:329:1: warning: this is the location of the previous definition

@neheb
Copy link
Author

neheb commented Aug 8, 2020

this fails to build on OpenBSD 6.6. with LibreSSL 3.0.2:

modules/debug_cmd/debug_cmd.c:11:1: warning: "OPENSSL_VERSION" redefined
In file included from modules/debug_cmd/debug_cmd.c:9:
/usr/include/openssl/crypto.h:329:1: warning: this is the location of the previous definition

I'll fix when I can.

@alfredh
Copy link
Collaborator

alfredh commented Aug 15, 2020

hi @neheb when are you planning to update the PR ?

Signed-off-by: Rosen Penev <rosenp@gmail.com>
@neheb
Copy link
Author

neheb commented Aug 15, 2020

Maybe now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants