set ssl variables also when session not yet exists
This commit is contained in:
parent
d0f6befa7e
commit
7654fdfd3c
|
@ -44,15 +44,20 @@ include_once '2factor.inc';
|
||||||
* Sets the environment variables for custom SSL CA certificates.
|
* Sets the environment variables for custom SSL CA certificates.
|
||||||
*/
|
*/
|
||||||
function setSSLCaCert() {
|
function setSSLCaCert() {
|
||||||
// set SSL certificate if set
|
$config = null;
|
||||||
if (isset($_SESSION['cfgMain'])) {
|
if (isset($_SESSION['cfgMain'])) {
|
||||||
$sslCaPath = $_SESSION['cfgMain']->getSSLCaCertPath();
|
$config = $_SESSION['cfgMain'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$config = new LAMCfgMain();
|
||||||
|
}
|
||||||
|
// set SSL certificate if set
|
||||||
|
$sslCaPath = $config->getSSLCaCertPath();
|
||||||
if ($sslCaPath != null) {
|
if ($sslCaPath != null) {
|
||||||
putenv('LDAPTLS_CACERT=' . $sslCaPath);
|
putenv('LDAPTLS_CACERT=' . $sslCaPath);
|
||||||
putenv('TLS_CACERT=' . $sslCaPath);
|
putenv('TLS_CACERT=' . $sslCaPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets language settings for automatic translation
|
* Sets language settings for automatic translation
|
||||||
|
|
Loading…
Reference in New Issue