mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix openssl path
This commit is contained in:
parent
5459701254
commit
2ec95f1ffb
@ -26,7 +26,7 @@
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
pfSense_BUILDER_BINARIES: /usr/local/bin/openssl
|
||||
pfSense_BUILDER_BINARIES: /usr/bin/openssl
|
||||
pfSense_MODULE: crypto
|
||||
|
||||
DISABLE_PHP_LINT_CHECKING
|
||||
@ -35,7 +35,7 @@
|
||||
function crypt_data($val, $pass, $opt) {
|
||||
$file = tempnam("/tmp", "php-encrypt");
|
||||
file_put_contents("{$file}.dec", $val);
|
||||
exec("/usr/local/bin/openssl enc {$opt} -aes-256-cbc -in {$file}.dec -out {$file}.enc -k " . escapeshellarg($pass));
|
||||
exec("/usr/bin/openssl enc {$opt} -aes-256-cbc -in {$file}.dec -out {$file}.enc -k " . escapeshellarg($pass));
|
||||
if (file_exists("{$file}.enc"))
|
||||
$result = file_get_contents("{$file}.enc");
|
||||
else {
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
DISABLE_PHP_LINT_CHECKING
|
||||
|
||||
pfSense_BUILDER_BINARIES: /usr/local/sbin/openvpn /usr/local/bin/openssl /sbin/ifconfig
|
||||
pfSense_BUILDER_BINARIES: /usr/local/sbin/openvpn /usr/bin/openssl /sbin/ifconfig
|
||||
pfSense_MODULE: openvpn
|
||||
|
||||
*/
|
||||
@ -115,7 +115,7 @@ function openvpn_create_key() {
|
||||
|
||||
function openvpn_create_dhparams($bits) {
|
||||
|
||||
$fp = popen("/usr/local/bin/openssl dhparam {$bits} 2>/dev/null", "r");
|
||||
$fp = popen("/usr/bin/openssl dhparam {$bits} 2>/dev/null", "r");
|
||||
if (!$fp)
|
||||
return false;
|
||||
|
||||
@ -225,7 +225,7 @@ function openvpn_get_digestlist() {
|
||||
|
||||
function openvpn_get_engines() {
|
||||
$openssl_engines = array('none' => 'No Hardware Crypto Acceleration');
|
||||
exec("/usr/local/bin/openssl engine -t -c", $openssl_engine_output);
|
||||
exec("/usr/bin/openssl engine -t -c", $openssl_engine_output);
|
||||
$openssl_engine_output = implode("\n", $openssl_engine_output);
|
||||
$openssl_engine_output = preg_replace("/\\n\\s+/", "|", $openssl_engine_output);
|
||||
$openssl_engine_output = explode("\n", $openssl_engine_output);
|
||||
|
||||
@ -856,8 +856,8 @@ function system_webgui_start() {
|
||||
$cert = array();
|
||||
$cert['refid'] = uniqid();
|
||||
$cert['descr'] = gettext("webConfigurator default");
|
||||
mwexec("/usr/local/bin/openssl genrsa 1024 > {$g['tmp_path']}/ssl.key");
|
||||
mwexec("/usr/local/bin/openssl req -new -x509 -nodes -sha256 -days 2000 -key {$g['tmp_path']}/ssl.key > {$g['tmp_path']}/ssl.crt");
|
||||
mwexec("/usr/bin/openssl genrsa 1024 > {$g['tmp_path']}/ssl.key");
|
||||
mwexec("/usr/bin/openssl req -new -x509 -nodes -sha256 -days 2000 -key {$g['tmp_path']}/ssl.key > {$g['tmp_path']}/ssl.crt");
|
||||
$crt = file_get_contents("{$g['tmp_path']}/ssl.crt");
|
||||
$key = file_get_contents("{$g['tmp_path']}/ssl.key");
|
||||
unlink("{$g['tmp_path']}/ssl.key");
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
pfSense_BUILDER_BINARIES: /usr/local/bin/voucher /usr/local/bin/openssl
|
||||
pfSense_BUILDER_BINARIES: /usr/local/bin/voucher /usr/bin/openssl
|
||||
pfSense_MODULE: captiveportal
|
||||
*/
|
||||
|
||||
@ -56,8 +56,8 @@ if (empty($cpzone)) {
|
||||
}
|
||||
|
||||
if($_REQUEST['generatekey']) {
|
||||
exec("/usr/local/bin/openssl genrsa 64 > /tmp/key64.private");
|
||||
exec("/usr/local/bin/openssl rsa -pubout < /tmp/key64.private > /tmp/key64.public");
|
||||
exec("/usr/bin/openssl genrsa 64 > /tmp/key64.private");
|
||||
exec("/usr/bin/openssl rsa -pubout < /tmp/key64.private > /tmp/key64.public");
|
||||
$privatekey = str_replace("\n", "\\n", file_get_contents("/tmp/key64.private"));
|
||||
$publickey = str_replace("\n", "\\n", file_get_contents("/tmp/key64.public"));
|
||||
exec("rm /tmp/key64.private /tmp/key64.public");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user