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
1
vote
1 answer

C# SslStream Reading Issues

Guys i'm using SslStream as a server to test my app, but i have issues reading from the stream. I'm using the following code: while (true) { int read = sslStream.Read(buffer, 0, buffer.Length); string…
Anonymous
  • 748
  • 3
  • 10
  • 22
1
vote
1 answer

SslStream: using check data available to perform polling IO

A while ago i wrote some basic Http webserver in vb.net. I tried to avoid blocking IO, so basically i made one polling thread for all current connections. While True For Each oNetworkstream In lstNetworkstream If…
jnv
  • 43
  • 4
1
vote
1 answer

SslStream separate thread

I'm trying to display on the screen any data that comes from the ssl stream (From a website). Since I don't know when the data are going to arrive, I used another thread which keeps reading from the stream until bytes have been read. This works…
Orestis P.
  • 805
  • 7
  • 27
1
vote
1 answer

SslStream.AuthenticateAsServer exception - The server mode SSL must use a certificate with the associated private key

I am developing a proxy server application similar to CCProxy. Its working fine for HTTP but not HTTPS. Its throwing exception when AuthenticateAsServer() method is called on SslStream object. I also don't know whether I have supplied proper…
Aditya Bokade
  • 1,708
  • 1
  • 28
  • 45
1
vote
1 answer

Connect to APNS Service using Mono on Ubuntu

I am trying to establish a connection to Apple's APNS Service. I am running Mono on Ubuntu. The code being used to make the connection works in a Windows environment with no issue. The code is part of an NT Service (system process), not a web site…
1
vote
0 answers

SslStream Unable to read data from the transport connection

I am trying to make use of async await in Secure Stream Layer but i am facing this problem Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. how could i handle the closing…
Roman Ratskey
  • 5,101
  • 8
  • 44
  • 67
1
vote
1 answer

Socket.ReceiveAsync and SslStream

It seems that I cannot get the benefit of ReceiveAsync when using SslStream since I will have to do the reading through SslStream, which only supports the Begin* End* async model. Is it possible to just use SslStream until authentication is done,…
Rabbit
  • 1,741
  • 2
  • 18
  • 27
1
vote
1 answer

C# Relay on SslStream for Encryption

Can i relay on SslStream to encrypt all my sent&received data so i don't have to hash the data or add any other encryption algorithm ?
Daniel Eugen
  • 2,712
  • 8
  • 33
  • 56
1
vote
2 answers

c# Using SslStream.WriteAsync at high speeds

i am facing an annoying problem with SslStream.WriteAsync here is the code public void Send(PacketWriter writer) { var buffer = writer.GetWorkspace(); _sslStream.WriteAsync(buffer, 0, buffer.Length); } When writing the data at extremely…
Daniel Eugen
  • 2,712
  • 8
  • 33
  • 56
1
vote
1 answer

Asynchronous SslStream Error

I created an Asynchronous SslStream Listener but it did not receive the message from the client properly The Listener Code Code Removed joran i don't want the code to be here anymore Here is the message i try to send to the server "Hello From…
Daniel Eugen
  • 2,712
  • 8
  • 33
  • 56
1
vote
3 answers

HTTPS Proxy server in C#

I´m working on HTTPS proxy server.It should be a console application. I would like to find a manual or example for it.I found lot of pieces or non working samples. I try example from MSND for SSLStream but unsuccessfully. Does anyone have some…
Tomas Horvath
  • 97
  • 1
  • 1
  • 3
1
vote
2 answers

Connectivity issues with SSL Socket Server

Socket Server with SSLStream some times refuses new connections from clients. I used the telent hostname port, and it says Connecting To host... Could not open connection to the host, on port 6002: Connect failed I used netstat -a , and I see TCP…
dabididabidi
  • 41
  • 1
  • 6
0
votes
1 answer

SSL TCP SslStream Server throws unhandled exception "System.Security.Cryptography.CryptographicException: cannot find the original signer"

I'm trying to create a C# TCP server to receive TCP data with SslStream on a Windows 2008 server from a client (objective C mobile application) sending TCP data. I'm using Microsoft's sample code (NOTE: my modified version of that code is at the end…
Stewie
  • 185
  • 11
0
votes
1 answer

C++/CLI Authenticate software through x509 certificate

My project is to create a client-server communication that uses the Secure Socket Layer (SSL) security protocol to authenticate the server and the client. I used c++/cli language, SslStream class and i've created the certificates to authenticate…
DropTheCode
  • 465
  • 1
  • 7
  • 14
0
votes
2 answers

Why does sslStream.AuthenticateAsServer require no UAC and alternatives

While tweaking a web proxy code, I noticed that if I run the code in an app with UAC (User Access Control) I get an exception Here is the location where the exception is thrown: sslStream.AuthenticateAsServer(_certificate, false, SslProtocols.Tls |…
Dinis Cruz
  • 4,161
  • 2
  • 31
  • 49