Questions tagged [sslstream]

.NET class that provides a stream used for client-server communication that uses TLS/SSL security protocols to authenticate the server and optionally the client.

Documentation: https://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx

231 questions
0
votes
0 answers

How to get Packet Sequence Number in SslStream?

I developed a Tls Server (On .Net 6.0) that listens on port 12345 for incoming traffic. I want to extract Sequence Number of received packets in my Tls Server. For first step I check sslStream.InnerStream but this method doesn't exist on SslStream…
Shahroozevsky
  • 343
  • 4
  • 17
0
votes
0 answers

How to Decompress content from http response using .NET Core 3.1 using TcpClient and SslStream?

I'm having a problem and i'm not using HttpClient because i'm having a problem about invalid headers that can not be read after PostAsync() invoked. My solution for that, was to implement the automation using TcpClient with SslStream. This way works…
0
votes
0 answers

.NET 6 SslStream connection fails: "Received an unexpected EOF or 0 bytes from the transport stream"

I can successfully connect to a company server using openssl: openssl s_client -connect {ip_address}:{tcp_port} -cert client.pem -key client.key -CAfile ca.cer The output shows the negotiated protocol is TLS 1.2. I'd like to implement this…
kol
  • 27,881
  • 12
  • 83
  • 120
0
votes
1 answer

How to enable imap clients to use self-signed certificate of the imap server?

I am creating an IMAP server in C#. I need to enable SSL connection security in it. I am using Thunderbird as an IMAP client to test my server. I tried following Microsoft link to enable SSL in IMAP server application…
Fatima A.
  • 41
  • 13
0
votes
0 answers

How to authenticate the client using SslStream class

I got the problem with my code I'm trying to create sslStream between client and server but I'm getting the next error: Request error: System.Security.Authentication.AuthenticationException: Cannot determine the frame size or a corrupted frame was…
0
votes
0 answers

TLS 1.3 with .Net Framework 4.8

I'm trying to setup a test enviroment to test tls 1.3 with .Net Framework 4.8   This is the client code: public class Tls13Client { public static void Main() { string serverIP = "127.0.0.1"; int serverPort = 8888; …
Matteo
  • 1
  • 2
0
votes
0 answers

Protobuf.net deserialization exception C#

I'm creating a desktop remote control for my LAN computers, I have 2 clients and a server. The connection is based on Ssl stream (over Tcp Stream) When both of the clients are connected, I can choose which one to watch (using a combo box). However,…
Lior v
  • 464
  • 3
  • 12
0
votes
1 answer

HTTPS Get Requests with TCP Client dotnet

I want to receive the html of a webpage given it's address var url = "https://www.stackoverflow.com/questions" var uri = new Uri(url); var host = uri.Host; client.Connect(host, 443); using SslStream sslStream = new SslStream(client.GetStream(), …
IOEnthusiast
  • 105
  • 6
0
votes
0 answers

C# .NET 7 SSLStream Hash Strength and Key Exchange Strength of 0

I'm just putting together an app with SSL, and I've managed to get to the point of establishing a connection and sending a message between the client and server. However, I've noticed that stream.HashAlgorithm and stream.KeyExchangeAlgorithm return…
Megukaphii
  • 41
  • 1
  • 5
0
votes
0 answers

Send Client Certificate and Private Key to Server with SSL

I have been working on Windows application in C#, which will act as TCP client and communicate with server. Tool has to send Certificate and Private key to Server, once the server authentication is successful there will a handshake at TLS level. I…
0
votes
0 answers

How can I Authenticate TcpClient I mean not with sslClientStream.AuthenticateAsServer, Is there another way?

I want to read sslClientStream and it needs AuthenticateAsServer, But I'm looking for another way to read sslClientStream without AuthenticateAsServer. I'm newbie in TLS,SSL subject Thanks for any help.
TBT
  • 55
  • 1
  • 1
  • 4
0
votes
0 answers

.NET client application not picking up the RSA-PSS+SHA256

I had added RSA-PSS/SHA256 algorithm to the Windows 11 registry, but .NET Client isn't picking it as part of "Signature Hash algorithms" while initiating the "Client Hello" handshake for a TLS connection with the Server. Is there any other way of…
subbaraoc
  • 1,123
  • 1
  • 8
  • 27
0
votes
0 answers

TLS1.3 connection failing with Invalid token on Windows when using .NET application

I am on Windows 11 and had enabled TLS1.3 in Registry. I am using a .NET application with TLS enabled,but while communicating with the server i get the following exception 000003E1 03:10:39.068084 8908.1 ThreadId:1,…
subbaraoc
  • 1,123
  • 1
  • 8
  • 27
0
votes
0 answers

C# - Verify Remote Server Using X509Certificate Chain file

I have made a client-server connection with TLS/SSL handshake (using SSLStream) and I want to make my client to verify the server using a certificate signed by personal CA made by OpenSSL. I have successfully tested it as a localhost connection,…
0
votes
1 answer

SslStream AuthenticateAsClient method getting "The handshake failed due to an unexpected packet format" error

Our code uses TcpClient and SslStream in C# encounter an error The handshake failed due to an unexpected packet format. when calling AuthenticateAsClient method, the SMTP server is smtp.office365.com, we tried many ways but all not working. Tried:…
Leon
  • 282
  • 2
  • 10