如何在Ubuntu上更改OPENSSLDIR? [英] How to change OPENSSLDIR on Ubuntu?

查看:438
本文介绍了如何在Ubuntu上更改OPENSSLDIR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试进行一些配置,以便在Ruby on Rails应用程序中使用SSL / HTTPS和Faraday gem。我按照法拉第

解决方案


如何在Ubuntu上更改OPENSSLDIR?


有两种方法。一种方式适用于所有版本的OpenSSL,第二种方式适用于OpenSSL 1.0.2及更低版本。



所有OpenSSL

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

直接 ./ config 使用 / usr / local / ssl 作为其位置。它是默认位置。



安装时会出现差异。 make install make install_sw 都安装到您选择的位置。 <您的安装位置> 可在 OPENSSLDIR 中找到,其在< openssl中定义/opensslconf.h>



OpenSSL 1.0.2及以下

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

直接 ./ config 使用 / usr / local / ssl 作为其位置。它是默认位置。



make install make install_sw 都安装到您选择的位置。 <您的安装位置> 可在 OPENSSLDIR 中找到,其在< openssl中定义/opensslconf.h>



IF 您使用 - openssldir 使用OpenSSL 1.1.0,然后 make install_sw 不尊重您的位置。


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.

解决方案

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.

这篇关于如何在Ubuntu上更改OPENSSLDIR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆