A.3. 使用客户端证书
在客户端将证书返回到代理之前,红帽构建的 Apache Qpid Proton DotNet 库必须告知要使用的证书。客户端证书文件 client.crt
添加到连接过程中要使用的证书列表中。
ConnectionOptions connectionOptions = new(); connectionOptions.SslOptions.ClientCertificateCollection.Add( X509Certificate.CreateFromCertFile(certfile) );
ConnectionOptions connectionOptions = new();
connectionOptions.SslOptions.ClientCertificateCollection.Add(
X509Certificate.CreateFromCertFile(certfile)
);
在本例中,certfile
是个人证书存储中安装的 client.p12
证书的完整路径。