Bug 857455 - libldap does not load PEM certificate if certdb is used as TLS_CACERTDIR
Summary: libldap does not load PEM certificate if certdb is used as TLS_CACERTDIR
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: openldap
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Vcelak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 859858
TreeView+ depends on / blocked
 
Reported: 2012-09-14 13:32 UTC by Jan Vcelak
Modified: 2013-03-04 01:30 UTC (History)
4 users (show)

Fixed In Version: openldap-2.4.32-3.fc17
Clone Of:
: 859858 (view as bug list)
Environment:
Last Closed: 2012-11-16 07:33:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
patch (2.93 KB, patch)
2012-09-14 13:33 UTC, Jan Vcelak
no flags Details | Diff

Description Jan Vcelak 2012-09-14 13:32:32 UTC
Description of problem:

OpenLDAP library assumes wrongly that the specified certificate file is always in the Mozilla NSS certificate database, if the certificate database is set as TLS_CACERTDIR.

This might be a problem if the library consumer uses PEM certificates (TLS_CACERT, TLS_CERT, TLS_KEY) and TLS_CACERTDIR with Mozilla NSS database is set in system configuration file (ldap.conf).


Version-Release number of selected component (if applicable):
openldap-2.4.32-2.fc17


How reproducible:
always


Steps to Reproduce:
1. export LDAPTLS_CACERTDIR=/etc/openldap/certs
2. export LDAPTLS_CERT=/path/to/client.pem
3. export LDAPTLS_KEY=/path/to/client.pem
4. ldapsearch -Y EXTERNAL -H ldaps://server
  
Actual results:
TLS: certdb config: configDir='/etc/openldap/certs' tokenDescription='ldap(0)' certPrefix='' keyPrefix='' flags=readOnly
TLS: using moznss security dir /etc/openldap/certs prefix .
TLS: error: the certificate '/patk/to/client.pem' could not be found in the database - error -8174:security library: bad database..
TLS: error: could not initialize moznss security context - error -8174:security library: bad database.
TLS: can't create ssl handle.


Expected results:
success


Additional info:
Seems to be regression introduced by recent changes.

Comment 1 Jan Vcelak 2012-09-14 13:33:34 UTC
Created attachment 612876 [details]
patch

Patch & upstream submission:
http://www.openldap.org/its/index.cgi?findid=7389

Comment 2 Fedora Update System 2012-09-19 09:11:58 UTC
openldap-2.4.32-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/openldap-2.4.32-3.fc17

Comment 3 Fedora Update System 2012-09-19 09:13:28 UTC
openldap-2.4.32-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/openldap-2.4.32-3.fc18

Comment 4 Fedora Update System 2012-09-20 05:58:28 UTC
Package openldap-2.4.32-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openldap-2.4.32-3.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14390/openldap-2.4.32-3.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-10-08 02:24:42 UTC
openldap-2.4.32-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Jan Vcelak 2012-10-31 11:04:21 UTC
Not fixed entirely.

Comment 7 Fedora Update System 2012-10-31 12:11:09 UTC
openldap-2.4.33-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/openldap-2.4.33-3.fc17

Comment 8 Fedora Update System 2012-10-31 12:12:04 UTC
openldap-2.4.33-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/openldap-2.4.33-3.fc18

Comment 9 Fedora Update System 2012-10-31 18:07:13 UTC
Package openldap-2.4.33-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openldap-2.4.33-3.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17337/openldap-2.4.33-3.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-11-16 07:33:08 UTC
openldap-2.4.33-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2012-11-23 07:31:17 UTC
openldap-2.4.33-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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