本文整理汇总了Python中NaServer.set_hostname_verification方法的典型用法代码示例。如果您正苦于以下问题:Python NaServer.set_hostname_verification方法的具体用法?Python NaServer.set_hostname_verification怎么用?Python NaServer.set_hostname_verification使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NaServer
的用法示例。
在下文中一共展示了NaServer.set_hostname_verification方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: import NaServer [as 别名]
# 或者: from NaServer import set_hostname_verification [as 别名]
response = s.set_style("CERTIFICATE")
if (response):
print("Unable to set style: " + response.results_reason() + "\n")
sys.exit(2)
response = s.set_client_cert_and_key(cert_file, client_key)
if (response):
print(response.results_reason() + "\n")
sys.exit(2)
if (dossl or need_server_cert_verification):
response = s.set_server_cert_verification(need_server_cert_verification)
if (response):
print(response.results_reason() + "\n")
sys.exit(2)
if (need_server_cert_verification):
response = s.set_hostname_verification(need_hostname_verification)
if (response):
print(response.results_reason() + "\n")
sys.exit(2)
if (ca_file):
response = s.set_ca_certs(ca_file)
if (response):
print(response.results_reason() + "\n")
sys.exit(2)
#
# Set the TCP port used for API invocations on the server.
#
if (use_port != -1) :
s.set_port(use_port)