Closed y2k2mt closed 6 years ago
@y2k2mt I get this when running the spec on your branch:
$ crystal spec
Package libssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libssl' found
Package libcrypto was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcrypto.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcrypto' found
I found this issue: https://github.com/crystal-lang/crystal/issues/4745 and by running
$ export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
I was able to run the spec cleanly.
What is the situation here? Is every Crystal/openssl user on Mac currently required to set PKG_CONFIG_PATH manually?
Sorry for late reply. It seems like required because Mac OSX 10.13 switched OpenSSL to LibreSSL. In order to keep clean dependency, do you think this feature should be an extension(separated) library?
I am not sure how to handle this yet. I wouldn't like this to be a separate library. The requirement for an environment variable on MacOS X is ugly, but on the other, this is probably a relevant feature. I tend to go with the environment variable.
@y2k2mt I have merged your PR, thanks!
I have renamed the option sslcontext
to ssl_context
in the process.
@stefanwille Thank you, too!
Thanks for the PR! I will read it in the next days.