From: Xeno Campanoli Date: 2009-06-03T02:31:39+09:00 Subject: Re: Something Not going with my LDAP using SSL Brian Candler wrote: > This isn't really going anywhere, so I'll ask the same question one more > time. What happens if you do this in irb? > > $ irb > irb(main):001:0> require 'openssl' > => true > > Do you get "true" like I do, or something else? irb(main):001:0> require 'openssl' => true irb(main):002:0> > >> I am not finding LDAP::SSLConn or SSLConn in my /usr tree > ... >> Can you recommend a way to get the sources off Ubuntu? > > 1. Go to google > 2. Type "ruby LDAP::SSLConn" > > The top hit is the ruby-ldap project in Sourceforge. So that's the > easiest way to look at the current source. Okay great. I will take your suggestion and fit this in as my secondary project today. I should be able to get this. > > The next question is, how did you install ruby-ldap? I believe it got installed by installing apt-get libactiveldap-ruby, which was what I originally intended to use, but then all the simplest examples for what I wanted were for plain ruby-ldap, so I checked it and it had already been installed. Perhaps I need to apt-get install from another package though. > > (1) If you installed it using 'gem install ...' then the code will be in > your gems directory, which I believe is /var/lib/gems/1.8 in Ubuntu (I > don't have an Ubuntu box with Ubuntu ruby to hand right now) > > (2) If you installed it from an Ubuntu package, then maybe it has been > broken in a Debian way to separate out the ssl functionality. > > $ apt-cache search ldap | grep ruby > libactiveldap-ruby - an object-oriented interface to LDAP for Ruby > libactiveldap-ruby-doc - an object-oriented interface to LDAP for Ruby > libactiveldap-ruby1.8 - an object-oriented interface to LDAP for Ruby > libldap-ruby1.8 - OpenLDAP library binding for Ruby 1.8 Actually, that is the exact command I used to find it. > > So if you have libldap-ruby1.8 installed, you can find the files using > > dpkg-query -L libldap-ruby1.8 > > If this contains only compiled binaries (e.g. .so libraries) then you > can get the Ubuntu source > > apt-get source libldap-ruby1.8 > > which will create the source inside a new directory under the current > directory. Okay. That's what I needed. Last time I did stuff like this was in 2002 I think and I used tgz files and such. > > The debian/changelog suggests that ssl support should be included: > > libldap-ruby (0.8.0-1) unstable; urgency=low > > * new upstream version. > * enabled ssl support. > > However the dependencies in debian/control don't list > libopenssl-ruby1.8, so I'm not entirely convinced it's correct. > > Anyway, all the C code is there for you to look at. If it were me, I > would remove the debian libldap-ruby1.8 and install ruby-ldap again from > source, checking carefully all the configure options to ensure that ssl > is enabled. You'll also need the build dependencies of course; at least > build-essential, libssl-dev and libldap2-dev Okay. The onus is on me then. I will likely follow your instructions exactly. I should be able to get started before noon if I'm not pulled off by a fire. Thank you very much again for your support Brian. Sincerely, Xeno > > Good luck, > > Brian.