Error while configuring LDAP over SSL : TLS certificate verification: Error - ssl

I am configuring OPENLDAP for SSL/TLS. I need to configure ldap for secure connection on port like 636.
I have already prepared configurations like LDAPTLS_CACERT="/etc/openldap/cacerts/ca.cert.pem". However while connecting with the server, I am facing below "TLS certificate verification: Error".
I am using below ldapsearch command to check the connection :
env LDAPTLS_CACERT="/etc/openldap/cacerts/ca.cert.pem" ldapsearch -H ldaps://192.168.1.XXX:636 -ZZ -d 1 -b "ou=MyTeam,ou=People,dc=geekforgeek,dc=local" -D "cn=ldapLoger,ou=LdapLoger,dc=geekforgeek,dc=local" -s base "(&(emailAddress=%v)(objectclass=ePerson))"
Following error i am getting as a result :
TLS trace: SSL3 alert write:fatal:unknown CA
TLS trace: SSL_connect:error in error
TLS trace: SSL_connect:error in error
TLS: can't connect: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed (self signed certificate in certificate chain).
ldap_err2string
ldap_start_tls: Can't contact LDAP server (-1)
additional info: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed (self signed certificate in certificate chain)```
Any input on why this error occurs! Please suggest.

Related

Why openssl retrive "no peer certificate available"?

I have a EC2 instance on AWS, that I want to make a curl in one specific website. When I try, a receive the error "OpenSSL SSL_connect: Connection reset by peer in connection to host" when I try to use the openssl s_client -connect host:443 -showcerts command to retrieve the ssl certificate, I receive the message:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 289 bytes
But, when I try to do it on my personal computer, I can do both: the openssl and the curl command without errors.

RabbitMq SSL setup TLS server: In state certify at ssl_handshake.erl:1368 generated SERVER ALERT: Fatal - Bad Certificate

Setting up Rabbitmq with SSL
TLS server: In-state certify at ssl_handshake.erl:1368 generated SERVER ALERT: Fatal - Bad Certificate
ERROR c.t.a.derived.broker.RabbitMQBroker - Received fatal alert: bad_certificate
What can cause these error?
What is the role of the common name while generating a certificate?
Probably the client doesn't trust the CA. Make sure the client has the CA available.

SSL certificate issues when communicating with Ably

I'm on a Windows system and when I try connecting to Ably, I'm getting the following errors(s):
cURL error: SSL certificate problem: self signed certificate in certificate chain
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
What am I doing wrong?
This error is caused by out of date root certificates on your server or local machine. In order to fix this problem, follow the instructions from one of the related issues:
PHP SSL certificate problem
Ruby certificate verify failed

Jenkins svn collabnet build failure

I am getting the below build error :
[ERROR] The svn blame command [svn blame --xml --non-interactive -x -w xxxxx.java] failed: svn: E230001: Unable to connect to a repository at URL 'xxx-xxxx.java'
svn: E230001: Server SSL certificate verification failed: certificate issued for a different hostname, issuer is not trusted
I am using Subversion Edge by Collabnet with jenkins to run the build. Could you please help me out?
Here is the wording of the error message:
svn: E230001: Server SSL certificate verification failed: certificate issued for a different hostname, issuer is not trusted
The error you are getting "Server SSL certificate verification failed: issuer is not trusted" means that there is a problem with the certificate installed on SVN Edge server. The client does not trust the certificate and displays the error. Therefore, you should look into the certificate-related problems on CollabNet Subversion Edge server.
The only possible way to ignore the error is to use --trust-server-cert command line option. You also have to add --non-interactive option because your CI machine runs the Subversion client non-interactively.
If you use Subversion 1.9 client, you can also use --trust-server-cert-failures option which is intended to ignore a wider range of invalid certificates than --trust-server-cert that can only ignore certificates issued by unknown or not trusted certificate authority.

Mosquitto TLS, works with MQTTfx but not mosquitto_pub (tlsv1 alert unknown ca)

Quite strange issue
I have mosquitto broker working with TLS
It is correctly accessible by an MQTTfx client set up for 'Enable SSL/TLS, TLSv1.2, CA certificate file'
The same ca.crt file is used by a openwrt mosquitto client issuing
# mosquitto_pub -h x.x.x.x -p 8883 --cafile /etc/mosquitto/certs/ca.crt -i 1.1.1.1 -t test -m 123 -d
it returns
Client 1.1.1.1 sending CONNECT
Error: A TLS error occurred.
At the orher end, the broker, shows
OpenSSL Error: error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
OpenSSL Error: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure
Socket error on client (null), disconnecting.
What is messing me up is the fact that the MQTTfx client instead is accepted, and it's using the same certificate..!
New connection from y.y.y.y on port 8883.
New client connected from y.y.y.y as 180ce1c04c1944e1964608221efbcf0a (c1, k60).
Sending CONNACK to 180ce1c04c1944e1964608221efbcf0a (0)
Should mean that the certificate is valid and trusted... isn't it?
What's wrong then with the other client using the exact same certificate file ?!?!
...at the end using --insecure option did the job.
Means verification of the server hostname in the server certificate.
Well it works, although using this option in a production environment potentially invalidates the use of encryption.