Nikey646 / VndbSharp

A C# Vndb API Library. #OriginalNamingScheme
MIT License
18 stars 4 forks source link

Logging in with TLS is broken #1

Closed micah686 closed 7 years ago

micah686 commented 7 years ago

Whenever I attempt to login with TLS enabled, Visual Studio throws up an AggregateException Error, of "Unable to login" Stepping through the code, it seems to fail with the initial response.

Nikey646 commented 7 years ago

Woops, i'll look into that, what is the exact Inner Exception object of AggregateException, and a StackTrace if you have one?

Nikey646 commented 7 years ago

Nevermind about my previous questions, forgot that was an exception i threw when the response from the login method wasn't "ok". The issue was that i was using the TcpClients stream to send and receive data, despite wrapping the NetworkStream from the TcpClient in a SslStream. Not entirely sure why this didn't just perform insecure operations with the NetworkStream from the TcpClient, but i was able to connect and receive data using the above commit.