LDAP client connectivity issue

Connection to the LDAP server cannot be established.

Failed to establish TLS encryption.
Verify that the correct CA Certificate is installed and the Server Certificate is valid.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave HoweSoftware and Hardware EngineerCommented:
sounds like the LDAP server's certificate failed to validate - what are you using to access the LDAPS source?
linuxpersonAuthor Commented:
during LDAP server installation its generated the following certificate.

┌Basic Settings─────────────────────────────────────────────┐
  │                                 │           │[x] Enable TLS                                             │
  │                                 │           │[x] Enable LDAP over SSL (ldaps) interface                 │
  │                                 │           │[x] Use common Server Certificate                          │
  │                                 │           └─────────────────────────────────────────

Import Certificate─────────────────────────────────────────┐
  │                                 │           │CA Certificate File (PEM Format)                           │
  │                                 │           │/etc/ssl/certs/YaST-CA.pem▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ [Browse...]│
  │                                 │           │                                                           │
  │                                 │           │Certificate File (PEM Format)                              │
  │                                 │           │/etc/ssl/servercerts/servercert.pem▒▒▒▒▒▒▒▒▒▒▒▒ [Browse...]│
  │                                 │           │                                                           │
  │                                 │           │Certificate Key File (PEM Format - Unencrypted)            │
  │                                 │           │/etc/ssl/servercerts/serverkey.pem▒▒▒▒▒▒▒▒▒▒▒▒▒ [Browse...]│
  │                                 │           └───────────────────────────────────────────────────────────┘

From LDAP client I am providing the location of CA Cert to download. I am not sure why I am not able to download it.

CA Certificate URL for Download

 Could not download the certificate file from specified URL.
Dave HoweSoftware and Hardware EngineerCommented:
Ah, suse linux, probably sles.

on (iirc the security tab) there should be a yast tool to generate keys, but personally I usually suggest XCA (or if you have an existing ca, use that)

you will want to create one keypair with the CA template, and export the cert (only) as pem
you will want to create one keypair with the Server template, and export the cert AND the secret key as pem files.
you can then import them in the yast tool.
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

linuxpersonAuthor Commented:
I tried to with yast2 still i got the issue.

I did download openLDAP and installed instead of using suse linux ldap
Dave HoweSoftware and Hardware EngineerCommented:
Try with the standalone tool then; the resulting key and cert need to be in pem format, and you need to add/update two lines in slapd.conf to define TLSCertificateFile and TLSCertificateKeyFile as the location of  the cert and key respectively.
linuxpersonAuthor Commented:
I already added these lines.

TLSCipherSuite          HIGH:MEDIUM:+TLSv2:+SSLv3:RSA
TLSCACertificateFile    /etc/openldap/cacerts/example.pem
TLSCertificateFile      /etc/openldap/cacerts/example.pem
TLSCertificateKeyFile   /etc/openldap/cacerts/example.pem
TLSVerifyClient         allow

when i tried to execute this line

/openldap/openldap-install/libexec/slapd -h ldaps://

I am getting

Apr 27 21:40:48 ldap01 slapd[21037]: daemon: TLS not supported (ldaps://)
Apr 27 21:40:48 ldap01 slapd[21037]: slapd stopped.
Apr 27 21:40:48 ldap01 slapd[21037]: connections_destroy: nothing to destroy.
Dave HoweSoftware and Hardware EngineerCommented:
ok. and does /etc/openldap/cacerts/example.pem have a valid entry for each of the three types you detail there (CA cert, server cert, server private key) ?

I note different paths from YAST above, so would suggest:

TLSCACertificateFile    /etc/ssl/certs/YaST-CA.pem
TLSCertificateFile      /etc/ssl/servercerts/servercert.pem
TLSCertificateKeyFile   /etc/ssl/servercerts/serverkey.pem

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Security

From novice to tech pro — start learning today.