Attachment 'ldap_tls_rhel4.patch'
Download 1 diff -uNr moin-1.5.8.orig/MoinMoin/auth.py moin-1.5.8/MoinMoin/auth.py
2 --- moin-1.5.8.orig/MoinMoin/auth.py 2007-02-07 06:31:27.000000000 -0800
3 +++ moin-1.5.8/MoinMoin/auth.py 2007-06-11 17:06:16.000000000 -0700
4 @@ -362,18 +362,21 @@
5 ldap.set_option(ldap.OPT_NETWORK_TIMEOUT, cfg.ldap_timeout)
6
7 starttls = cfg.ldap_start_tls
8 - if ldap.TLS_AVAIL:
9 - for option, value in (
10 - (ldap.OPT_X_TLS_CACERTDIR, cfg.ldap_tls_cacertdir),
11 - (ldap.OPT_X_TLS_CACERTFILE, cfg.ldap_tls_cacertfile),
12 - (ldap.OPT_X_TLS_CERTFILE, cfg.ldap_tls_certfile),
13 - (ldap.OPT_X_TLS_KEYFILE, cfg.ldap_tls_keyfile),
14 - (ldap.OPT_X_TLS_REQUIRE_CERT, cfg.ldap_tls_require_cert), # ldap.OPT_X_TLS_NEVER - this is needed for self-signed ssl certs
15 - (ldap.OPT_X_TLS, starttls),
16 - #(ldap.OPT_X_TLS_ALLOW, 1),
17 - ):
18 - if value:
19 - ldap.set_option(option, value)
20 + try:
21 + if ldap.TLS_AVAIL:
22 + for option, value in (
23 + (ldap.OPT_X_TLS_CACERTDIR, cfg.ldap_tls_cacertdir),
24 + (ldap.OPT_X_TLS_CACERTFILE, cfg.ldap_tls_cacertfile),
25 + (ldap.OPT_X_TLS_CERTFILE, cfg.ldap_tls_certfile),
26 + (ldap.OPT_X_TLS_KEYFILE, cfg.ldap_tls_keyfile),
27 + (ldap.OPT_X_TLS_REQUIRE_CERT, cfg.ldap_tls_require_cert), # ldap.OPT_X_TLS_NEVER - this is needed for self-signed ssl certs
28 + (ldap.OPT_X_TLS, starttls),
29 + #(ldap.OPT_X_TLS_ALLOW, 1),
30 + ):
31 + if value:
32 + ldap.set_option(option, value)
33 + except AttributeError:
34 + pass
35
36 server = cfg.ldap_uri
37 if verbose: request.log("LDAP: Trying to initialize %s." % server)
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.