Bug 1027618 - tls_reqcert try has bad behavior
tls_reqcert try has bad behavior
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: openldap (Show other bugs)
22
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Matus Honek
Fedora Extras Quality Assurance
:
Depends On: 1027613 1027796
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 03:39 EST by David Spurek
Modified: 2016-07-19 16:27 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1027613
Environment:
Last Closed: 2016-07-19 16:27:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Spurek 2013-11-07 03:39:55 EST
+++ This bug was initially created as a clone of Bug #1027613 +++

Description of problem:
'tls_reqcert try' option has bad behavior on client side. It should allow connection if certificate is not specified.

man page says:
try    The  server  certificate  is requested. If no cer‐
     tificate is provided, the  session  proceeds  nor‐
     mally.  If a bad certificate is provided, the ses‐
     sion is immediately terminated.

Version-Release number of selected component (if applicable):
openldap-2.4.35-6.el7

How reproducible:
always

Steps to Reproduce:
1.Setup ldap server with certificates
2.remove all TLS_CACERT and TLS_CACERTDIR from /etc/openldap/ldap.conf
3.set TLS_REQCERT try to /etc/openldap/ldap.conf
4. try ldapsearch -ZZ -x -H ldap://<server_name> '*'

Actual results:
ldapsearch fail:
ldap_start_tls: Connect error (-11)
	additional info: TLS error -8172:Peer's certificate issuer has been marked as not trusted by the user.


Expected results:
ldapsearch should pass

Additional info:

--- Additional comment from David Spurek on 2013-11-07 03:37:52 EST ---

if TLS_REQCERT allow is set then ldapsearch pass. TLS_REQCERT try and allow should have the same behavior in case if no ca cert is specified (according to description in man ldap.conf).
Comment 1 Jan Včelák 2014-08-01 21:53:35 EDT
I think the description talks about the server certificate, not CA certificate.

With the 'try' option, the server will be requested to send it's certificate. The server will send it and the validation will fail on the client side, because you have no CA configured.

The same will happen with 'allow'.

I believe that the 'try' and 'allow' options have no valid purpose at the moment. The server will always send it's certificate. And I guess that these two options are some relict of old SSL versions, where the server didn't have to authenticate to the client.

You should better check with the OpenLDAP upstream.
Comment 2 David Spurek 2014-08-04 03:07:01 EDT
I forgot add link to upstream discussion - http://www.openldap.org/lists/openldap-technical/201311/msg00099.html
Comment 4 Jaroslav Reznik 2015-03-03 10:11:36 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Comment 5 Fedora Admin XMLRPC Client 2015-04-29 06:50:26 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 6 Fedora End Of Life 2016-07-19 16:27:32 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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