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

vio_gencert function doesn't set serial number

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.4
    • None
    • SSL
    • None

    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:
            1 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.