Bug 655069 - [RFE] OpenLDAP should support SHA2 algorithms
Summary: [RFE] OpenLDAP should support SHA2 algorithms
Keywords:
Status: CLOSED DUPLICATE of bug 676384
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: openldap
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jan Vcelak
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On: 676384
Blocks: 554476
TreeView+ depends on / blocked
 
Reported: 2010-11-19 14:35 UTC by Joshua Roys
Modified: 2013-03-04 01:28 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-01 21:09:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
backport (471 bytes, patch)
2010-11-19 20:27 UTC, Joshua Roys
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 683368 0 medium CLOSED [RFE] Support SHA2 based certificates 2021-02-22 00:41:40 UTC

Internal Links: 683368

Description Joshua Roys 2010-11-19 14:35:18 UTC
Description of problem:
OpenLDAP doesn't support SHA2 algorithms

Version-Release number of selected component (if applicable):
openldap-2.3.43-12.el5_5.2

How reproducible:
ldapsearch -d3 -v -x -H ldaps://some-server-with-a-sha2-cert/ -b $base '(uid=foo)'
  
Actual results:
TLS certificate verification: Error, certificate signature failure
[...]
        additional info: error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest algorithm

Expected results:
successful connection

Additional info:
Please backport https://github.com/openldap/openldap/commit/b6ae077e1f1b660a4acbcff14c752ffc4ac265e6
Upstream bug: http://www.openldap.org/lists/openldap-bugs/200907/msg00011.html

Thanks.

Comment 1 Joshua Roys 2010-11-19 20:27:37 UTC
Created attachment 461645 [details]
backport

Here's the backport.  Build tested only.  Unfortunately I can't test this very easily right now- our testing environment has gone down...

Comment 2 Joshua Roys 2010-11-30 01:15:50 UTC
Installing the openldap packages I built causes ldapsearch to work... but nss_ldap still fails with the same error.

New steps to reproduce (switching from a working, non-ssl/tls setup to a broken setup):

In /etc/ldap.conf,
- change "uri ldap://ldap/" to "uri ldaps://ldap/"
- add a line "debug 1023"
Ensure "ldap" is on the appropriate lines in /etc/nsswitch.conf (passwd, shadow, group, ...).
Run `getent passwd`
CTRL-C

Annoyingly, without the "debug" line, nss_ldap claims to be unable to contact the ldap server.

I'm going to try rebuilding the nss_ldap package tomorrow.

Comment 3 Joshua Roys 2010-11-30 17:00:58 UTC
Rebuilding the nss_ldap package against my openldap packages gets LDAP auth over SSL/TLS to work (when the CA/server cert has a SHA2 signature).  Tested successfully on four machines.

Comment 6 RHEL Program Management 2011-01-11 20:31:00 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 7 RHEL Program Management 2011-01-11 23:16:30 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 11 Pierre Carrier 2011-02-22 15:58:51 UTC
Looks to me like the proposed patch has significant potential implications, notably by exposing new ciphers (not verified).
I could easily imagine performance regressions.
IMHO, such a change would deserve a release note during a minor release.

It would need to be tested, but I'd be reassured by some simpler change like:
+ EVP_add_digest(EVP_sha256());


WIth best regards,

-- 
Pierre Carrier, Technical Support Engineer
Production Support, EMEA office
Global Support Services
Red Hat, Inc.

Comment 12 Tomas Mraz 2011-02-25 16:00:22 UTC
The proposed patch will not add any new ciphersuites to the SSL library - they have to be explicitly added to the SSL library ciphersuite list. It will just allow these hashes in the certificates which cannot result in performance regressions.

Comment 13 Tomas Mraz 2011-05-02 07:36:11 UTC
Note that this problem is solved already by the openssl update in RHEL 5.7.

Comment 14 Joshua Roys 2011-05-02 12:37:53 UTC
Tomas,

Do you mean openssl-0.9.8e-12.el5_5.7 ?  I still see the same issue with this update.

# grep -i reqcert /etc/openldap/ldap.conf 
TLS_REQCERT always
# rpm -q openssl
openssl-0.9.8e-12.el5_5.7
# ldapsearch -v -x -H ldaps://$HOST/ -b dc=ctisl,dc=gtri,dc=org '(uid=foo)'
ldap_initialize( ldaps://$HOST/ )
ldap_bind: Can't contact LDAP server (-1)
	additional info: error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest algorithm

Comment 15 Tomas Mraz 2011-05-02 12:51:06 UTC
No, the update was not yet released publicly. It will be in the openssl-0.9.8e-18.el5 package. I apologize for the confusion.

Comment 16 RHEL Program Management 2011-05-31 13:23:42 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 18 J.H.M. Dassen (Ray) 2011-06-01 19:47:24 UTC
(In reply to comment #13)
> Note that this problem is solved already by the openssl update in RHEL 5.7.

Tomas, if I've understood you correctly, the OpenSSL change for bug #676384
is in itself sufficient to address this issue, and no change to the OpenLDAP
packages is required to support SHA2 algorithms. If that's indeed the case,
can you please mark this entry as CLOSED DUPLICATE of 676384?

Comment 19 Tomas Mraz 2011-06-01 21:09:14 UTC
Yes.

*** This bug has been marked as a duplicate of bug 676384 ***


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