Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
- openldap client tool settings contain TLS_REQCERT=never, remote LDAP server has certificate, which was issued by CA whose certificate is expired, the client tries to connect to that server
- the connection fails as the CA certificate is expired
- patch was applied to ignore expired CA certificate, when TLS_REQCERT is set to 'never'
- the connection to server while TLS_REQCERT=never is set succeeds, even if the certificate issuer's certificate is not valid
Description of problem:
Setting TLS_REQCERT=never is ignored, when the server certificate is before/after validity period. In that moment, connection fails.
Version-Release number of selected component (if applicable):
openldap-2.4.23-15.el6
openldap-2.4.24-3.fc15
How reproducible:
Set up certificates in slapd to allow TLS/SSL. The certificate can be invalid (invalid issuer, invalid server name, etc.).
Run: LDAPTLS_REQCERT=never ldapsearch -x -ZZ ...
The execution will be successful, TLS will be used.
Change your system time out of the validity period of the certificate. Run the same command again. The command will fail this time.
[root@rhel6-i686 ~]# date 010101012020
St led 1 01:01:00 CET 2020
[root@rhel6-i686 ~]# LDAPTLS_REQCERT=never ldapsearch -x -ZZ -d1
...
TLS: file slapd.pem does not end in [.0] - does not appear to be a CA certificate directory file with a properly hashed file name - skipping.
TLS: loaded CA certificate file /etc/openldap/cacerts/da4d55fe.0 from CA certificate directory /etc/openldap/cacerts.
TLS: certificate [E=root,CN=localhost.localdomain,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--] is not valid - error -8181:Unknown code ___f 11.
TLS: certificate [E=root,CN=localhost.localdomain,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--] is not valid - error -8162:Unknown code ___f 30.
TLS: certificate [E=root,CN=localhost.localdomain,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--] is not valid - error -8162:Unknown code ___f 30.
TLS: error: connect - force handshake failure: errno 0 - moznss error -8162
TLS: can't connect: TLS error -8162:Unknown code ___f 30.
ldap_err2string
ldap_start_tls: Connect error (-11)
additional info: TLS error -8162:Unknown code ___f 30
Additional info:
openldap-2.4.25-1.fc16 is not affected.
Not completely true. All versions of OpenLDAP with MozNSS are affected. When the issuer certificate is expired, the connection will terminate.
When the certificate validation is disabled (e.g. TLS_REQCERT=never), another error has to be ignored - SEC_ERROR_EXPIRED_ISSUER_CERTIFICATE.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
- openldap client tool settings contain TLS_REQCERT=never, remote LDAP server has certificate, which was issued by CA whose certificate is expired, the client tries to connect to that server
- the connection fails as the CA certificate is expired
- patch was applied to ignore expired CA certificate, when TLS_REQCERT is set to 'never'
- the connection to server while TLS_REQCERT=never is set succeeds, even if the certificate issuer's certificate is not valid
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2011-1514.html
Description of problem: Setting TLS_REQCERT=never is ignored, when the server certificate is before/after validity period. In that moment, connection fails. Version-Release number of selected component (if applicable): openldap-2.4.23-15.el6 openldap-2.4.24-3.fc15 How reproducible: Set up certificates in slapd to allow TLS/SSL. The certificate can be invalid (invalid issuer, invalid server name, etc.). Run: LDAPTLS_REQCERT=never ldapsearch -x -ZZ ... The execution will be successful, TLS will be used. Change your system time out of the validity period of the certificate. Run the same command again. The command will fail this time. [root@rhel6-i686 ~]# date 010101012020 St led 1 01:01:00 CET 2020 [root@rhel6-i686 ~]# LDAPTLS_REQCERT=never ldapsearch -x -ZZ -d1 ... TLS: file slapd.pem does not end in [.0] - does not appear to be a CA certificate directory file with a properly hashed file name - skipping. TLS: loaded CA certificate file /etc/openldap/cacerts/da4d55fe.0 from CA certificate directory /etc/openldap/cacerts. TLS: certificate [E=root,CN=localhost.localdomain,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--] is not valid - error -8181:Unknown code ___f 11. TLS: certificate [E=root,CN=localhost.localdomain,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--] is not valid - error -8162:Unknown code ___f 30. TLS: certificate [E=root,CN=localhost.localdomain,OU=SomeOrganizationalUnit,O=SomeOrganization,L=SomeCity,ST=SomeState,C=--] is not valid - error -8162:Unknown code ___f 30. TLS: error: connect - force handshake failure: errno 0 - moznss error -8162 TLS: can't connect: TLS error -8162:Unknown code ___f 30. ldap_err2string ldap_start_tls: Connect error (-11) additional info: TLS error -8162:Unknown code ___f 30 Additional info: openldap-2.4.25-1.fc16 is not affected.