Skip to content

Commit

Permalink
Use config accessors in certificate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-ng committed May 23, 2024
1 parent 1bb9c40 commit 2630893
Show file tree
Hide file tree
Showing 23 changed files with 316 additions and 230 deletions.
1 change: 1 addition & 0 deletions src/etc/inc/auth.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,7 @@ function ldap_setup_caenv($ldap, $authcfg) {
ldap_set_option($ldap, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_HARD);
} else {
$caref = lookup_ca($authcfg['ldap_caref']);
$caref = $caref['item'];
$cert_details = openssl_x509_parse(base64_decode($caref['crt']));
$param = array('caref' => $authcfg['ldap_caref']);
$cachain = ca_chain($param);
Expand Down
1 change: 1 addition & 0 deletions src/etc/inc/captiveportal.inc
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ function captiveportal_init_webgui_zone($cpcfg) {

if (isset($cpcfg['httpslogin'])) {
$cert = lookup_cert($cpcfg['certref']);
$cert = $cert['item'];
$crt = base64_decode($cert['crt']);
$key = base64_decode($cert['prv']);
$ca = ca_chain($cert);
Expand Down
Loading

0 comments on commit 2630893

Please sign in to comment.