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

RSA, SSLStream - Key Exchange

i'm using SSLStream to communicate a client and a server using OpenSSL certificates. And the client that i will use is a machine that has it's own software, that needs to use RSA cryptography. I made a server and a client, just to test, using my…
Enzo Tiezzi
  • 208
  • 1
  • 6
0
votes
1 answer

SslStream.Read results in IOException

I'm trying to use SslStream to connect to a website to pass a request, but I'm getting the following IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond…
user1538717
0
votes
0 answers

Possible to disable download of issuer certificates in SslStream?

When using an SslStream to connect to an internal, trusted server using a self-signed CA certificate, I want to disable automatic downloading of issuer certificates. The reason is that the certificate is broken in a way that it points to an invalid…
Krumelur
  • 31,081
  • 7
  • 77
  • 119
0
votes
1 answer

Relaying an HTTPS request with proxy on C#

I've build a proxy with some logic on request headers. I use sockets. Before even any connect occurs, inside my proxy I parse headers, add authentification and forward the request to target host. And now I've stumbled upon following issues: I have…
Dmitry Dyachkov
  • 1,715
  • 2
  • 19
  • 46
0
votes
1 answer

Read from SslStream

I'm reading from an SslStream as follows: byte[] data = new byte[tcp.ReceiveBufferSize]; int bytesRead = -1; do { bytesRead = stream.Read(data, 0, data.Length); using (MemoryStream ms = new MemoryStream(data, 0, bytesRead)) using…
Ivan-Mark Debono
  • 15,500
  • 29
  • 132
  • 263
0
votes
1 answer

Identify users with TCP connections

When using C# and TCP, what is the best approach to let a client identify himself using a username and password and then allow multiple packets to be sent from the server to the client and from the client to the server without sending the username &…
Eli_Rozen
  • 1,301
  • 4
  • 20
  • 31
0
votes
1 answer

How to read from SSLStream when you don't know the length?

Guys i'm trying to use SSLStream to test my app and so far it goes well (the client/server auth successfully), but the problem i have is reading: How to know whether or not i have reached the end? Microsoft's example with "EOF" simply does not work…
Anonymous
  • 748
  • 3
  • 10
  • 22
0
votes
1 answer

Data remains in SslStream after read

I'm developing a peer-to-peer software, that uses .net's SslStream for secure communication. I use BeginRead() and EndRead() to read the data from the stream asynchronously. (Don't mind the weird callback method too much.. it's from a framework I…
PogoMips
  • 3,497
  • 8
  • 27
  • 34
0
votes
1 answer

What do I need from my certificate to use SSL in .NET?

The server mode SSL must use a certificate with the associated private key. I have my Base64-encoded .crt file and another huge text file with lots of info, from my certificate provider, which includes the private RSA key in an equivalent format. I…
Vercas
  • 8,931
  • 15
  • 66
  • 106
0
votes
1 answer

Issues with SslStream decryption?

I am sending an https request to a server using TcpClient and SslStream, it generally works, and I am able to see headers coming back in plaintext, but the page content is gibberish. I am not sure what I am doing wrong. Here is a code snippet: using…
RadAway
  • 33
  • 5
0
votes
1 answer

About STARTTLS SMTP Command

Is STARTTLS command exclusive for TLS channels or can it be used with SSL channels ? Is there any TlsStream which can be used , as SslStream since .Net4 does not support TLS even if it is available as member of the SslProtocols enumeration.
Abinonos
  • 27
  • 5
0
votes
0 answers

How to know size of packet sent in SslStream Asynchronous Socket

How to know size of packet sent in SslStream Asynchronous Socket, since EndWrite doesn't have output? public void DataSent(IAsyncResult result) { SslStream stream = null; try { if (result != null) …
new bie
  • 2,745
  • 6
  • 24
  • 26
0
votes
1 answer

SslStream responds differently when accessed as COM object

I am working with an on a project where the bulk of the code is C++. The shop is migrating to C# in the long run, so where possible we are making new code in C# and exposing to C++ via COM. I have wrapped an System.Net.Sockets.SslStream and a little…
Sqeaky
  • 1,876
  • 3
  • 21
  • 40
0
votes
2 answers

C# Is using Socket.Connected breaks the SslStream?

I want to know whether using Socket.Connected to determine if the socket still connected breaks the SslStream or not.
Daniel Eugen
  • 2,712
  • 8
  • 33
  • 56
0
votes
1 answer

sslstream "The BeginWrite method cannot be called when another write operation is pending"

I am having a bit of trouble getting the sslstream to work with sending multiple message after each other. The way i call my client to send data client.Send(objectOne); client.Send(objectTwo); the error message i receive is: The BeginWrite method…
trembon
  • 748
  • 7
  • 15
1 2 3
15
16