We use MySQL's test SSL certificates for mysql-test.
They are valid for 5 years, and distributions (e.g. RedHat) replace them with certificates with longer lifespan. Otherwise tests start to fail, especially for old versions, that are no longer supported by Oracle, but still used in distributions.
Just to make their life easier we can generate test certificates valid for 20 years (as in RedHat) or even longer.
See the attached RedHat patch.