Skip to content

Commit a28d2be

Browse files
committed
Remove workaround for OpenLDAP NSS issue
The NSS issue has been fixed in Fedora update openldap-2.4.45-2.fc26 and openldap-2.4.45-4.fc27. Fedora users can now execute all tests. Includes documentation for build requirements and minimum versions on Fedora. See: https://bugzilla.redhat.com/show_bug.cgi?id=1520990 Closes: python-ldap#60 Closes: python-ldap#51 Signed-off-by: Christian Heimes <cheimes@redhat.com>
1 parent 084ffe0 commit a28d2be

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

Doc/installing.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,29 @@ on the local system when building python-ldap:
132132
.. _Cyrus SASL: https://www.cyrusimap.org/sasl/
133133

134134

135+
Debian
136+
------
137+
138+
Packages for building and testing::
139+
140+
apt-get install build-essential python3-dev python2.7-dev libldap2-dev \
141+
libsasl2-dev slapd ldap-utils python-tox valgrind
142+
143+
144+
Fedora
145+
------
146+
147+
Packages for building and testing::
148+
149+
dnf install "@C Development Tools and Libraries" openldap-devel \
150+
python2-devel python3-devel python3-tox valgrind clang-analyzer
151+
152+
.. note::
153+
154+
``openldap-2.4.45-2`` (Fedora 26), ``openldap-2.4.45-4`` (Fedora 27) or
155+
newer are required.
156+
157+
135158
setup.cfg
136159
=========
137160

Lib/slapdtest/_slapdtest.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,13 @@ def skip_unless_ci(reason, feature=None):
7676
return identity
7777

7878

79-
def requires_tls(skip_nss=False):
79+
def requires_tls():
8080
"""Decorator for TLS tests
8181
8282
Tests are not skipped on CI (e.g. Travis CI)
83-
84-
:param skip_nss: Skip test when libldap is compiled with NSS as TLS lib
8583
"""
8684
if not ldap.TLS_AVAIL:
8785
return skip_unless_ci("test needs ldap.TLS_AVAIL", feature='TLS')
88-
elif skip_nss and ldap.get_option(ldap.OPT_X_TLS_PACKAGE) == 'MozNSS':
89-
return skip_unless_ci(
90-
"Test doesn't work correctly with Mozilla NSS, see "
91-
"https://bugzilla.redhat.com/show_bug.cgi?id=1519167",
92-
feature="NSS"
93-
)
9486
else:
9587
return identity
9688

Tests/t_cext.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def test_invalid_controls(self):
817817
l.sasl_interactive_bind_s, 'who', 'SASLObject', post=(1,))
818818
self.assertInvalidControls(l.unbind_ext)
819819

820-
@requires_tls(skip_nss=True)
820+
@requires_tls()
821821
def test_tls_ext(self):
822822
l = self._open_conn(bind=False)
823823
# StartTLS needs LDAPv3
@@ -827,7 +827,7 @@ def test_tls_ext(self):
827827
l.set_option(_ldap.OPT_X_TLS_NEWCTX, 0)
828828
l.start_tls_s()
829829

830-
@requires_tls(skip_nss=False)
830+
@requires_tls()
831831
def test_tls_ext_noca(self):
832832
l = self._open_conn(bind=False)
833833
l.set_option(_ldap.OPT_PROTOCOL_VERSION, _ldap.VERSION3)
@@ -844,7 +844,7 @@ def test_tls_ext_noca(self):
844844
if not any(s in msg.lower() for s in candidates):
845845
self.fail(msg)
846846

847-
@requires_tls(skip_nss=True)
847+
@requires_tls()
848848
def test_tls_ext_clientcert(self):
849849
l = self._open_conn(bind=False)
850850
l.set_option(_ldap.OPT_PROTOCOL_VERSION, _ldap.VERSION3)
@@ -855,7 +855,7 @@ def test_tls_ext_clientcert(self):
855855
l.set_option(_ldap.OPT_X_TLS_NEWCTX, 0)
856856
l.start_tls_s()
857857

858-
@requires_tls(skip_nss=False)
858+
@requires_tls()
859859
def test_tls_packages(self):
860860
# libldap has tls_g.c, tls_m.c, and tls_o.c with ldap_int_tls_impl
861861
package = _ldap.get_option(_ldap.OPT_X_TLS_PACKAGE)

Tests/t_ldap_sasl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_external_ldapi(self):
7676
"dn:{}".format(self.server.root_dn.lower())
7777
)
7878

79-
@requires_tls(skip_nss=True)
79+
@requires_tls()
8080
def test_external_tlscert(self):
8181
ldap_conn = self.ldap_object_class(self.server.ldap_uri)
8282
ldap_conn.set_option(ldap.OPT_X_TLS_CACERTFILE, self.server.cafile)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy