How to change OPENSSLDIR on Ubuntu?

霸气de小男生 提交于 2019-12-11 13:59:25

问题


I'm trying to do some configuration so that I can use SSL/HTTPS with the Faraday gem in my Ruby on Rails app. I'm following the directions on the Faraday official site, but I'm stuck on a step. I don't know how to change the value of OPENSSLDIR (see image below). I've looked all over for a command to do this. Any help would be appreciated! My OS is Ubuntu.


回答1:


How to change OPENSSLDIR on Ubuntu?

There are two ways. One way works with all versions of OpenSSL, the second works with OpenSSL 1.0.2 and below.

All OpenSSL

./config ... --prefix=<your install location>

A straight ./config uses /usr/local/ssl as its location. Its the default location.

The difference emerges when you install. make install and make install_sw both install into the location you select. <your install location> is available in OPENSSLDIR, which is defined in <openssl/opensslconf.h>.

OpenSSL 1.0.2 and below

./config ... --openssldir=<your install location>

A straight ./config uses /usr/local/ssl as its location. Its the default location.

make install and make install_sw both install into the location you select. <your install location> is available in OPENSSLDIR, which is defined in <openssl/opensslconf.h>.

IF you use --openssldir with OpenSSL 1.1.0, then make install_sw does not honor your location.



来源:https://stackoverflow.com/questions/38337740/how-to-change-openssldir-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!