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.
Bug 828787 - TLS error messages overwriting in tlsm_verify_cert()
Summary: TLS error messages overwriting in tlsm_verify_cert()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openldap
Version: 6.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Jan Vcelak
QA Contact: David Spurek
URL:
Whiteboard:
: 863456 (view as bug list)
Depends On: 810462
Blocks: 836160
TreeView+ depends on / blocked
 
Reported: 2012-06-05 11:38 UTC by Jan Vcelak
Modified: 2018-11-30 21:39 UTC (History)
7 users (show)

Fixed In Version: openldap-2.4.23-29.el6
Doc Type: Bug Fix
Doc Text:
Cause: Self-signed certificate without Basic Constraint Extension is used as a server TLS certificate. TLS client is configured to ignore any TLS certificate validation errors. Consequence: Client cannot connect to the server and a wrong message about missing Basic Constraint Extension is emitted. Fix: Patch applied to preserve the original TLS certificate validation error if Basic Constraint Extension is not found in the certificate. Result: Client can connect to the server, error message about untrusted certification authority which signed the server certificate is emitted, the connection will continue as expected.
Clone Of: 810462
Environment:
Last Closed: 2013-02-21 09:45:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0364 0 normal SHIPPED_LIVE openldap bug fix and enhancement update 2013-02-20 20:52:54 UTC

Description Jan Vcelak 2012-06-05 11:38:23 UTC
+++ This bug was initially created as a clone of Bug #810462 +++

Description of problem:

Connecting to a server with self-signed certificate without basic constraint extension fails. This kind of error seems to stop connecting even if TLS_REQCERT=never is set.

Version-Release number of selected component (if applicable):
openldap-2.4.26-7.fc16


How reproducible:


Steps to Reproduce:
1.
generate self-signed server certificate with:
certutil -d . -S -x -n ldap -s "CN=server" -t TC,,
2.
setup permissions, setup slapd, setup client
3.
ldapsearch -x -ZZ -H ldap://server
  
Actual results:

TLS: certificate [CN=server] is not valid - CA cert is not valid
TLS: certificate [CN=server] is not valid - error -8172:Peer's certificate issuer has been marked as not trusted by the user..
TLS: error: connect - force handshake failure: errno 21 - moznss error -8157
TLS: can't connect: TLS error -8157:Certificate extension not found..
ldap_err2string
ldap_start_tls: Connect error (-11)
        additional info: TLS error -8157:Certificate extension not found.


Expected results:

successful connection


Additional info:

--- Additional comment from jvcelak on 2012-04-26 10:11:59 CEST ---

This is not right. My configuration was wrong, no certificates were available. But the error message is wrong, it is completely unrelated to the problem which happened.

The original error can was overwritten with the error from the report in tlsm_verify_cert(). While walking through the verification log, basic extension from the certificate is requested in case there is a SEC_ERROR_CA_CERT_INVALID error. If the extension is not a part of the certificate, the original error is overwritten.

PR_GetError() and PR_SetError() should fix that.

--- Additional comment from jvcelak on 2012-05-28 14:18:50 CEST ---

Created attachment 587230 [details]
proposed patch

Broken version:

$ ldapsearch -x -ZZ
ldap_start_tls: Connect error (-11)
        additional info: TLS error -8157:Certificate extension not found.

Fixed version:

$ ../_build/clients/tools/ldapsearch -x -ZZ
ldap_start_tls: Connect error (-11)
        additional info: TLS error -8172:Peer's certificate issuer has been marked as not trusted by the user.

--- Additional comment from jvcelak on 2012-05-28 14:21:43 CEST ---

The patch fixes the issue with LDAPTLS_REQCERT=never as well.

--- Additional comment from jvcelak on 2012-06-05 11:54:31 CEST ---

Submitted upstream:
http://www.openldap.org/its/index.cgi?findid=7287

--- Additional comment from jvcelak on 2012-06-05 13:36:48 CEST ---

Committed upstream:
http://www.openldap.org/devel/gitweb.cgi?p=openldap.git;a=commit;h=dc3842f

Comment 5 Jan Vcelak 2012-09-25 16:10:23 UTC
Resolved in: openldap-2.4.23-29.el6

Comment 7 Jan Vcelak 2012-10-22 07:24:32 UTC
*** Bug 863456 has been marked as a duplicate of this bug. ***

Comment 10 errata-xmlrpc 2013-02-21 09:45:56 UTC
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-2013-0364.html


Note You need to log in before you can comment on or make changes to this bug.