Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-488

Use java.net.URL to read keyStore and trustStore again

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.6.0, 2.0.1
    • 1.6.1, 2.0.2
    • Other
    • None

    Description

      When using the connection parameters trustStore and keyStore until Version 1.5.4, it was possible to specifiy values in java.net.URL-syntax. To read the files via InputStream, org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol and org.mariadb.jdbc.internal.protocol.tls.MariaDbX509TrustManager used code like this:

      inStream = new URL(keyStoreUrl).openStream();

      Since Version 1.5.5, the constructor java.io.FileInputStream(String) is used to create the java.io.InputStream, the consequence being that trustStore and keyStore have to point to a file in the file system. Before version 1.5.5 it was possible to point to a file in a jar for example, because the URL's protocol would be used.

      Do you see any chance to support a behaviour similar to the older versions? An interesting use case for this might be, that you could build a module for data access, which encapsulated functionality to build a project specific connection string, say for a number of different databases. This module would also include JKS stores and would be distributed as a jar.

      In general, I think it should not be necessary to keep resources as plain files in the file system.

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            marc.budde Marc Budde
            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.