Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-260

Connection through SSL always gives error on one failed attempt

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Won't Fix
    • 2.3.3
    • N/A
    • None
    • None
    • OS: Windows 7

    Description

      Below are the steps to reproduce the issue,

      1. Connect to a server through SSL (Self-signed certificates in my case) without any Cipher.

      2. Connect to an Azure MySQL instance
      through SSL. By default, any server instance created will have SSL enabled. The CA certificate for Azure MySQL instance can be downloaded from, here

      3. Connecting to the Azure server with SSL gives 'Error No. 2026 Unknown SSL error'

      4. Entering a random string as Cipher to the Azure instance connection gives the error 'Error No. 2026 SSL connection error: no cipher match'

      5. Now connecting to a normal MySQL server with SSL (self-signed certificate) gives the error 'Error No. 2026 SSL connection error: no cipher match' though earlier it used to connect fine without Cipher.

      6. On entering a valid Cipher for the normal MySQL server like 'DHE-RSA-AES256-SHA', the connection works fine.

      Attachments

        Issue Links

          Activity

            georg Georg Richter added a comment -

            Hi,

            thank you for your bug report. Could you please provide some more information:

            • the openssl version
            • a tcpdump (pcap format) which contains the connect attempt and TLS handshake

            Thanks!

            georg Georg Richter added a comment - Hi, thank you for your bug report. Could you please provide some more information: the openssl version a tcpdump (pcap format) which contains the connect attempt and TLS handshake Thanks!
            georg Georg Richter added a comment -

            Microsoft Azure's MySQL servers are configured with yassl library, which doesn't support TLS v.1.2 protocol. Yassl isn't able to negotiate the protocol version according to RFC 4346 and RFC 5246 and just drops the connection. We fixed this behavior in MariaDB 10.2 server already.

            MariaDB Connector/C uses OpenSSL which by default offers TLS v.1.2 - as a workaround you can set the protocol version by using mysql_options(mysql, MARIADB_CONNECTION_TLS_VERSION, "TLS1.0") (available in Connector/C 3.0 only).

            georg Georg Richter added a comment - Microsoft Azure's MySQL servers are configured with yassl library, which doesn't support TLS v.1.2 protocol. Yassl isn't able to negotiate the protocol version according to RFC 4346 and RFC 5246 and just drops the connection. We fixed this behavior in MariaDB 10.2 server already. MariaDB Connector/C uses OpenSSL which by default offers TLS v.1.2 - as a workaround you can set the protocol version by using mysql_options(mysql, MARIADB_CONNECTION_TLS_VERSION, "TLS1.0") (available in Connector/C 3.0 only).

            People

              georg Georg Richter
              Sibin Sibin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.