sslstream

.NET 4.5 SslStream - Cancel a asynchronous read/write call?

我们两清 提交于 2020-01-21 19:42:59
问题 Is there any way to cancel a asynchronous read or write task on a SslStream? I have tried providing ReadAsync with a CancellationToken but it doesnt appear to work. When the following code reaches it's timeout (the Task.Delay), it calls cancel on the CancellationTokenSource which should cancel the read task, returns a error to the calling method, and the calling method eventually tries to read again, which raises a "The BeginRead method cannot be called when another write operation is pending

.NET 4.5 SslStream - Cancel a asynchronous read/write call?

旧城冷巷雨未停 提交于 2020-01-21 19:42:49
问题 Is there any way to cancel a asynchronous read or write task on a SslStream? I have tried providing ReadAsync with a CancellationToken but it doesnt appear to work. When the following code reaches it's timeout (the Task.Delay), it calls cancel on the CancellationTokenSource which should cancel the read task, returns a error to the calling method, and the calling method eventually tries to read again, which raises a "The BeginRead method cannot be called when another write operation is pending

.NET 4.5 SslStream - Cancel a asynchronous read/write call?

时光毁灭记忆、已成空白 提交于 2020-01-21 19:42:46
问题 Is there any way to cancel a asynchronous read or write task on a SslStream? I have tried providing ReadAsync with a CancellationToken but it doesnt appear to work. When the following code reaches it's timeout (the Task.Delay), it calls cancel on the CancellationTokenSource which should cancel the read task, returns a error to the calling method, and the calling method eventually tries to read again, which raises a "The BeginRead method cannot be called when another write operation is pending

Avoiding administrator access for SslStream.AuthenticateAsClient?

喜夏-厌秋 提交于 2020-01-13 06:54:10
问题 I have an application which uses the .NET SslStream class along with client and server certificates. This application works great on Windows XP. However on Windows 7 (probably Vista too), the below exception appears when calling SslStream.AuthenticateAsClient: System.ComponentModel.Win32Exception: The credentials supplied to the package were not recognized at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc) at

How to validate self-signed certification

一个人想着一个人 提交于 2020-01-02 08:43:09
问题 i will provide you with my question clearly so you can answer me I have a client-server (socket) connection that i secured using SslStream and as i know using ssl makes me sure that my client will only connect to my server And to do that i must add a function to my client to validate the server certification and make sure that the server is the real one (my server) but i really don't get how could i validate my self-signed certification and want your help Regards, and my thanks in advance 回答1

How to validate self-signed certification

大城市里の小女人 提交于 2020-01-02 08:41:24
问题 i will provide you with my question clearly so you can answer me I have a client-server (socket) connection that i secured using SslStream and as i know using ssl makes me sure that my client will only connect to my server And to do that i must add a function to my client to validate the server certification and make sure that the server is the real one (my server) but i really don't get how could i validate my self-signed certification and want your help Regards, and my thanks in advance 回答1

How do I identify my server name for server authentication by client in c#

允我心安 提交于 2019-12-31 12:24:53
问题 I have recently been trying to make a SSL encrypted Server/Client in C#. I have followed this tutorial on MSDN, however, it required a certificate to be created for the server and client usage using makecert.exe so I found an example and it created the certificate fine: makecert -sr LocalMachine -ss My -n "CN=Test" -sky exchange -sk 123456 c:/Test.cer but now the problem is the server starts and waits for clients, when the client connects it uses the machine name which as far as I can gather

How do I identify my server name for server authentication by client in c#

北慕城南 提交于 2019-12-31 12:23:10
问题 I have recently been trying to make a SSL encrypted Server/Client in C#. I have followed this tutorial on MSDN, however, it required a certificate to be created for the server and client usage using makecert.exe so I found an example and it created the certificate fine: makecert -sr LocalMachine -ss My -n "CN=Test" -sky exchange -sk 123456 c:/Test.cer but now the problem is the server starts and waits for clients, when the client connects it uses the machine name which as far as I can gather

How do I identify my server name for server authentication by client in c#

北慕城南 提交于 2019-12-31 12:22:32
问题 I have recently been trying to make a SSL encrypted Server/Client in C#. I have followed this tutorial on MSDN, however, it required a certificate to be created for the server and client usage using makecert.exe so I found an example and it created the certificate fine: makecert -sr LocalMachine -ss My -n "CN=Test" -sky exchange -sk 123456 c:/Test.cer but now the problem is the server starts and waits for clients, when the client connects it uses the machine name which as far as I can gather

Authentication failed because remote party has closed the transport stream

╄→гoц情女王★ 提交于 2019-12-27 17:09:52
问题 I am developing a TCP client to connect OpenSSL server with the certificate authentication. I have using .crt and .key files shared by server team. These certificates are generated by OpenSSL commands. I am using SslStream object to authenticate the Tcp client by calling SslStream.AuthenticateAsClient method by passing server IP , SslProtocols.Ssl3 and X509CertificateCollection . I am getting the following error: Authentication failed because the remote party has closed the transport stream