Resolving x509: Common Name certificate error

If you're getting an error x509: certificate relies on legacy Common Name field, use SANs instead:

PrivX 16 dropped support for certificates without SAN extension. Modern browsers have already done it some time ago. You should upgrade to certificates that use correct extensions.