【发布时间】:2018-03-14 01:47:31
【问题描述】:
下面的客户端代码在 python 中工作,并使用双向 TLS 连接连接到远程服务器,其中客户端拥有私钥和公钥,远程服务器拥有公钥。
有谁知道如何用 C# 编写这段代码 使用 keyfile\cer 组合或 .pfx 文件。
import ssl
import urllib
from http import client
import requests
key_file_path = "*[Path]*\Keyfile.key"
cert_file_path = "*[Path]*\ird_taxlab_co_nz.crt"
response = requests.get('*[URL OF SERVICE]*', cert=(cert_file_path, key_file_path))
【问题讨论】:
-
看
HttpWebRequest...