I am using ldap3 and want to create a conncetion over SSL. I have seen that in order to so I must create a Tls object with the arugment "ca_certs_file". My problem is, I cannot understand from where can I retrieve such a file.
from ldap3 import Server, Connection, NTLM, Tls
import ssl
tls=Tls(validate=ssl.CERT_REQUIRED, ca_certs_file=<FILE_PATH>)
server = Server("DONAIN.com", use_ssl=True, tls=tls)
conn = Connection(server, user="DOMAIN\\admin", password="PASSWORD", authentication=NTLM)
conn.bind()
For example in the above code, where do I find <FILE_PATH>?
Where is it configured?
(The client machine is a Windows 10 and the server is a domain controller Windows Server 2019).
You have to add this certificate manually on your server first. Please look at Enable LDAP over SSL with a third-party certification authority<\/a> . This article explains all needed steps to do this. The mentioned ca_certs_file<\/code> is the public ROOT CA of your server, which might be a self signed one.
"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.