Problems with SSL LDAP connection on Windows

I’m trying to make an Net::LDAP connection over SSL to Active Directory
so
that I can change/set account passwords. I was originally using adsi
via
Win32OLE but that is unbearably slow. When I try to connect on port 636
with encryption set to :simple_tls

This is what happens:

OpenSSL::SSL::SSLError:
from
C:/ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:1059:in
‘connect’
from
C:/ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:1059:in
‘setup_encryption’
from
C:/ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:1025:in
‘initialize’
from
C:/ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:700:in
‘new’
from
C:/ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4/lib/net/ldap.rb:700:in
‘bind’

It would appear to be a problem with OpenSSL. This is running on
Windows
(no choice there), I have OpenSSL installed on the machine but beyond
that
I’m not sure what’s going on.


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

Here is the code I used to create said problem:

ldap = Net::LDAP.new

ldap.host = ‘hostname’
ldap.port = 636
ldap.encryption :simple_tls
ldap.auth “username”,“password”
ldap.bind

On 9/6/07, Glen H. [email protected] wrote:

/lib/net/ldap.rb:1059:in
from C:/ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4
so loud, I can’t hear a word you’re saying."

-Greg Graffin (Bad Religion)


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

Let’s change the focus of my inquiry.

When I do the following:

connection = TCPSocket.new(“hostname”, 636)
context = OpenSSL::SSL::SSLContext.new
connection = OpenSSL::SSL::SSLSocket.new(connection, context)
connection.connect

I get OpenSSL::SSL::SSLError: in ‘connect’. No more details just the
SSL
error. Should the SSL library give useful error messages, in other
words
could something else be breaking and SSL isn’t passing the error message
all
the way back out?

On 9/6/07, Glen H. [email protected] wrote:

from C:/ruby/lib/ruby/gems/1.8/gems/ruby-net-ldap-0.0.4

I’m not sure what’s going on.


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)


“Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs