[英]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)。
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> .
请查看
Enable LDAP over SSL with a third-party certificate 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.
提到的
ca_certs_file<\/code>是您服务器的公共 ROOT CA,它可能是自签名的。
"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.