Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/256.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# thrift php客户端x509证书无法通过thrift csharp服务器x509证书进行验证_C#_Php_Thrift_X509 - Fatal编程技术网

C# thrift php客户端x509证书无法通过thrift csharp服务器x509证书进行验证

C# thrift php客户端x509证书无法通过thrift csharp服务器x509证书进行验证,c#,php,thrift,x509,C#,Php,Thrift,X509,将thrift php客户端与csharp服务器一起使用 我想验证thrift php客户端,我有一个客户端证书,例如test.pem。 thrift php客户端代码: $cer_key = file_get_contents("test.pem"); $cer = openssl_x509_read($cer_key); $socket = new TSSLSocket("server-host", 19140, $cer ); thrift csharp服务器验证代码: private

将thrift php客户端与csharp服务器一起使用 我想验证thrift php客户端,我有一个客户端证书,例如test.pem。 thrift php客户端代码:

$cer_key = file_get_contents("test.pem");
$cer = openssl_x509_read($cer_key); 
$socket = new TSSLSocket("server-host", 19140, $cer );
thrift csharp服务器验证代码:

private bool DefaultClientCertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
        return sslPolicyErrors == SslPolicyErrors.None;
}
当我在服务器上调试时,证书为空且sslPolicyErrors为RemoteCertificateNotAvailable, 所以我没有得到客户端证书。 但同样的事情在thrift csharp客户端和服务器中也能很好地工作。 如何发送x509类型的证书,该证书可以通过php客户端上csharp服务器中的x509证书进行验证