Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openssl_prefix to Configure and friends #22856

Draft
wants to merge 1 commit into
base: blead
Choose a base branch
from

Conversation

craigberry
Copy link
Contributor

In order to add TLS to the core, we need a library, and OpenSSL is as ubiquitous as it gets. So detect where it is with logic borrowed from Net::SSLeay.

Configure Outdated Show resolved Hide resolved
@jkeenan
Copy link
Contributor

jkeenan commented Dec 10, 2024

I configured with blead and with your branch on each of Ubuntu Linux 24.04 LTS and OpenBSD-6.9. I then examined the content of config.sh in blead and branch on both platforms. In both cases the difference (ignoring lines for Configuration time and cf_time) was:

982a983
> openssl_prefix='/usr'

Is that what you would expect?

@craigberry
Copy link
Contributor Author

I configured with blead and with your branch on each of Ubuntu Linux 24.04 LTS and OpenBSD-6.9. I then examined the content of config.sh in blead and branch on both platforms. In both cases the difference (ignoring lines for Configuration time and cf_time) was:

982a983
> openssl_prefix='/usr'

Is that what you would expect?

Thanks for testing. That looks like what I'd expect. The logic I'm replicating is from the Net::SSLeay Makefile.PL here. On most unixy platforms you should be able to do which openssl and chop off /bin/openssl from the end and what's left will be your prefix.

Configure Outdated
@@ -5356,6 +5357,21 @@ none) libs=' ';;
*) libs="$ans";;
esac

: see if OpenSSL is available
ossl_p_c='/home/linuxbrew/.linuxbrew/opt/openssl'
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this start with $libpth/$libspath

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a good question. I don't really have the data to know the answer for sure, having just lifted the candidate locations straight from the Net::SSLeay Makefile.PL. But keeping it simple and using infrastructure we already have are good things to do, so maybe I'll switch to iterating through $libpth. If it misses something weird, people can always add hints or make adjustments as needed later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now starts from $libpth.

In order to add TLS to the core, we need a library, and OpenSSL is
as ubiquitous as it gets.  So detect where it is with logic
borrowed from Net::SSLeay.
@craigberry craigberry force-pushed the craigb/openssl_prefix branch from dc994d0 to c2dc47d Compare December 10, 2024 20:21
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.

3 participants