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
4
votes
1 answer

How to ignore signature hash algorithm requested by server during TLS1.2 handshake?

I have a C# application making a successful TCP TLS 1.0 connection with mutual authentication to another company's server. It is implemented using SslStream class. We are just one of many clients of this very large organisation. This TCP link above…
Puzzled
  • 213
  • 3
  • 12
4
votes
0 answers

C# Disable SslStream buffer cache

I'm writing a web scraping application which creates a lot of concurrent HttpRequests to various websites using proxies. Most of these websites have SSL enabled. My application uses a lot of memory which was strange so I decided to investigate and…
4
votes
2 answers

C# SSLStream Read Function Throws IOException

Im trying to create my own HTTPS proxy Server. For some reason, i got an exception when I try to read from sslstream object. Here is it: An unhandled exception of type 'System.IO.IOException' occurred in System.dll Additional information: Unable to…
michal_h
  • 51
  • 7
4
votes
3 answers

.Net SslStream Write/Read issue

When I read an a .Net SSLStream, I can't seem to read it all in one go. The read method always gets the first byte only. I need to loop to get the remaining data no matter the data or buffer size. Example : Client var message = new…
J-F
  • 41
  • 1
  • 4
4
votes
1 answer

X509Certificate2 the server mode SSL must use a certificate with the associated private key

I use SslStream to build a web server. However, the code below throws an exception when AuthenticateAsServer. static X509Certificate cert; protected virtual Stream GetStream(TcpClient client) { var ss = new SslStream(client.GetStream(),…
Mark Yuan
  • 850
  • 1
  • 8
  • 17
4
votes
1 answer

.NET Remoting over SSL with TCPChannel

I need to secure my .NET Remoting by SSL. I'm using TCPChannel and I can't switch to HTTPChannel and use IIS to add the SSL. Thus, what I figured out, I need to create my own Sink that will encrypt the streams going to/from Client/Server. For that,…
4
votes
1 answer

Timeout: BeginAuthenticateAsClient vs AuthenticateAsClient

I'm developing a .NET service which tries to establish a secure connection to a server. The service does not know in advance if the server supports secure connections. That's why I simply try to establish a secure connection and if that fails I'll…
sqeez3r
  • 495
  • 6
  • 16
4
votes
1 answer

Unable to send APNS message with Distribution Certificate

I have setup and successfully tested APNS messaging with a development certificate and gateway.sandbox.push.apple.com. When I change over to my distribution certificate and gateway.push.apple.com the messages aren't getting through and I am getting…
4
votes
1 answer

understanding server/proxy/client certificates with .NET sslstream

I'm creating a TCP proxy with C# using TcpListener for the proxy server and TcpCLient for the communication between client and proxy and between proxy and target server. This works really nice. I also have to support SSL and TLS encrypted…
Juergen Gutsch
  • 1,774
  • 2
  • 17
  • 28
3
votes
2 answers

Sending GET Commands over SSLStream in C#?

I am writing an http automation framework and my problem is communicating with an authenticated http secured connection. After doing some research, I discovered the SslStream object in C# which made for easy integration with my existing client…
noodlejs
  • 301
  • 2
  • 8
3
votes
2 answers

C# SSL secure sockets

I have a fine, working communicator application, written in C#. Now I need to implement a secure connection to the server. I've tried changing Socket and TcpClient objects into SslStream, but I got a few errors. Firstly I generated a .cer…
Mateusz Chromiński
  • 2,742
  • 4
  • 28
  • 45
3
votes
1 answer

C# dotnet SslStream truststore

I am developing a C# SSL Client. This is oneway certificate validation. My client needs to do a server certificate validation. I have added RemoteCertificateValidationCallback to SslStream. At present, I have created a root CA cert and issued a…
3
votes
1 answer

Wait for \n instead of EOF C# SslStream

I'm using SslStream to accept clients. This code reads 2048 bytes from the socket and returns them as a String. When I tried to connect using a client I wrote in Java, the server did not reply and was stuck on this line: bytes =…
IshaySela
  • 143
  • 6
3
votes
1 answer

NetworkStream.DataAvailable property does not return the right result when using SslStream

I've got an application with a persistent socket (it's open when the application starts and closed along with the application). This socket is used by a server to push some data. Since this connection could be either HTTP or HTTPS, I wrote this code…
Rodolphe
  • 1,689
  • 1
  • 15
  • 32
3
votes
4 answers

Connect to Server via SSL with various Cipher strengths and algorithms in C#

Searched around a bit, found different tools to check weak ciphers. How can I determine what ciphers/alogrithms the Server supports via .net/c#? I can test sslv2, sslv3 and tls via (ssl.protocols.ssl2/ssl3/tls): TcpClient client = new…
JKK
  • 55
  • 1
  • 4
1 2
3
15 16