Skip to content

TLS issue with passport-ldapauth #154

@zhenwan

Description

@zhenwan

Tried passport-ldapauth provided sample code of "Active Directory over SSL example", always get following errors:
Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1116:19)
at Object.onceWrapper (events.js:293:19)
at emitNone (events.js:91:20)
at TLSSocket.emit (events.js:188:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)

I am using self-signed certificate on openldap docker image 1.1.9. Not sure if it is passport-ldapauth issue or docker-openldap issue. Hope someone knows how to solve this.

Activity

zhenwan

zhenwan commented on Oct 13, 2017

@zhenwan
Author

it seems this issue has nothing to do with passport-ldapauth. I tried ldapjs with following simple code, got the exact same error:

var ldap = require('ldapjs');
var client = ldap.createClient({
  url: 'ldaps://mycompany.com:636',
  tlsOptions: {
         rejectUnauthorized: true,
         ca: [
              fs.readFileSync('/filepath/ldap.crt')
            ]
   }
});
goeland86

goeland86 commented on Jan 5, 2018

@goeland86

I have the same issue with TLS-enabled connections when trying to use Apache Directory Studio on the LDAP instance... plain connection works effortlessly, but TLS fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zhenwan@goeland86

        Issue actions

          TLS issue with passport-ldapauth · Issue #154 · osixia/docker-openldap