New and improved patch, to address issues mentioned by Howard, and to clean up some memory leaks.
ftp://ftp.openldap.org/incoming/openldap-2.4.21-tls_m_c-InitContext-PEM-20100202.patch
Note: This new version depends on Mozilla NSS 3.12.6 (currently unreleased) and currently unreleased patches of PEM NSS in order to avoid a couple of memory leaks.