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

vio_gencert function doesn't set serial number

    XMLWordPrintable

Details

    • Can result in unexpected behaviour
    • 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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Git Integration

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