Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-40146

vio_gencert function doesn't set serial number

    XMLWordPrintable

Details

    • Bug
    • Status: In Testing (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 11.4, 11.8, 12.3
    • 11.4, 11.8, 12.3
    • SSL
    • None
    • Q4/2026 Server Maintenance

    Description

      According to RFC 5280 the serial id of a X509 certificate must be a positive integer.

      Unfortunately the self generated certificate generated in function vio_gencert() doesn't set the serial number which leads to a warning in python's cryptographic module:

      $ openssl s_client -starttls mysql -connect 127.0.0.1:3306 -showcerts </dev/null 2>/dev/null | openssl x509 -noout -serial 
      serial=00
      

      CryptographyDeprecationWarning: Parsed a serial number which wasn't positive (i.e., it was negative or zero), which is disallowed by RFC 5280. Loading this certificate will cause an exception in a future release of cryptography
      

      How to fix:
      See attached patch.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            georg Georg Richter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0d
                0d
                Remaining:
                Time Spent - 0.25h Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - 0.25h Remaining Estimate - 3h
                0.25h

                Git Integration

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