Skip to content

Commit

Permalink
fix certificate loading
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRoehm committed Sep 27, 2022
1 parent b4257a1 commit 700d7b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ldapserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var ldap = require('ldapjs');
var parseDN = require('ldapjs').parseDN;
const c = require('./constants');
const log = require('./logging');
const fs = require('fs');

log.loglevel = log.loglevels.debug;

Expand All @@ -19,8 +20,8 @@ startUp = (server, ldapjs, cb) => {
};

exports.getLdapServer = (server) => {
if (server.crt && server.key) {
var ldapCert = fs.readFileSync(server.crt, { encoding: 'utf8' });
if (server.cert && server.key) {
var ldapCert = fs.readFileSync(server.cert, { encoding: 'utf8' });
var ldapKey = fs.readFileSync(server.key, { encoding: 'utf8' });
ldapjs = ldap.createServer({
log: log.logger,
Expand Down

0 comments on commit 700d7b4

Please sign in to comment.