Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • TLS/SSL
    • None

    Description

      MySQL has removed MYSQL_OPT_SSL_ENFORCE in favour of MYSQL_OPT_SSL_MODE which isn't supported on MariaDB. This means that <database:tls> doesn't work on MariaDB.

      Attachments

        Issue Links

          Activity

            The module already has

            342
            #if defined LIBMYSQL_VERSION_ID && LIBMYSQL_VERSION_ID > 80000
            343
                            unsigned int ssl = config->getBool("ssl") ? SSL_MODE_REQUIRED : SSL_MODE_PREFERRED;
            344
                            mysql_options(connection, MYSQL_OPT_SSL_MODE, &ssl);
            345
            #endif
            

            A fix for MariaDB would've been

                             mysql_options(connection, MYSQL_OPT_SSL_MODE, &ssl);
            +#elif defined MARIADB_PACKAGE_ID
            +                unsigned my_bool ssl = config->getBool("ssl"), on= 1;
            +                mysql_optionsv(connection, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &ssl);
            +                mysql_optionsv(connection, MYSQL_OPT_SSL_ENFORCE, &on);
             #endif
            

            I can do a pull request, if it'd be easier

            serg Sergei Golubchik added a comment - The module already has 342 #if defined LIBMYSQL_VERSION_ID && LIBMYSQL_VERSION_ID > 80000 343 unsigned int ssl = config->getBool( "ssl" ) ? SSL_MODE_REQUIRED : SSL_MODE_PREFERRED; 344 mysql_options(connection, MYSQL_OPT_SSL_MODE, &ssl); 345 #endif A fix for MariaDB would've been mysql_options(connection, MYSQL_OPT_SSL_MODE, &ssl); +#elif defined MARIADB_PACKAGE_ID + unsigned my_bool ssl = config->getBool("ssl"), on= 1; + mysql_optionsv(connection, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &ssl); + mysql_optionsv(connection, MYSQL_OPT_SSL_ENFORCE, &on); #endif I can do a pull request, if it'd be easier

            People

              georg Georg Richter
              rsilen Robert Silén
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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