简体   繁体   English

"ldap3 中的 ca 证书文件在哪里?"

[英]where is ca certs file in ldap3?

I am using ldap3 and want to create a conncetion over SSL.我正在使用 ldap3 并希望通过 SSL 创建连接。 I have seen that in order to so I must create a Tls object with the arugment "ca_certs_file".我已经看到,为此我必须创建一个带有参数“ca_certs_file”的 Tls 对象。 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>?例如在上面的代码中,我在哪里可以找到 <FILE_PATH>?

Where is it configured?它在哪里配置?

(The client machine is a Windows 10 and the server is a domain controller Windows Server 2019). (客户端机器是 Windows 10,服务器是域控制器 Windows Server 2019)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM