You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Secure LDAP service requires a TLS client that supports and initiates a TLS session using SNI (Server Name Indication). If the TLS client does not support SNI, then the TLS server (ldap.google.com) returns a self-signed certificate that will not pass CA validation checks, to indicate that SNI is required.
Using
net/ldap
withldap.google.com:636
:will result in this error:
This is because of Google Secure LDAP's behavior: https://support.google.com/a/answer/9190869?hl=en
To use SNI we have to add a call to
conn.hostname
in this part of the code (before callingconn.connect
): https://github.com/ruby-ldap/ruby-net-ldap/blob/master/lib/net/ldap/connection.rb#L98I tested this by hard coding
conn.hostname
toldap.google.com
:This fixed the error with regards to the certificate.
I'm planning on submitting a PR for this, but I figured I might open an issue first to see if I didn't miss anything.
The text was updated successfully, but these errors were encountered: