-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect via TLS #34
Comments
This is a bug that's not very easy to debug since |
It looks writing and closing do not use the SSL stream ( mysql-haskell/Database/MySQL/TLS.hs Line 69 in 9aa839c
|
I see, it's introduced by this commit, Can you revert this and report the result? |
I don't use this package. The issue just caught my eye while looking at packages removed from stackage. |
Im running a MySQL server with a CA. I want to connect to this server with server verification.
This is my setup. It's an edited variant of the bench TLS script.
I compile this script with
ghc -o test MySQLHaskellTLS.hs
And then run
./test 1
The certificate is valid and signed by the CA. Also the CN and SAN is correct.
The error I get is
test: Short read, expected 4 bytes
I've ran Wireshark and it looks like the TLS handshake works as expected, but when I run the first query the above error pops up. If I look into the package send over the network it seems like the ssl packages is not encrypted, because the SQL query is readable in plain text. I've added a Wireshark file.
The pcap file has 2 connections in it. The first one is when the connection goes wrong (With Haskell TLS) and the second connection is when I connect with the mysql client in my cli. The messages that's most interesting is the message on
Arrival Time: Jun 26, 2019 10:18:26.635008878 CEST
in the first stream and has as infoIgnored Unknown Record
.haskell-tls-bug.zip
Edit:
I've tried to connect with mysql-haskell-openssl and then the SSL connection works as intended.
The text was updated successfully, but these errors were encountered: