Using certificate with Common Name (CN) error: x509: certificate relies on legacy Common Name field, use SANs instead

I am using certificate with no SAN (so, only using Common Name) for my API. I got this error:

level=error msg="http: proxy error: x509: certificate relies on legacy Common Name field, use SANs instead

Based on this: Tyk Gateway v4.3, we need to add GODEBUG environment variable of value x509ignoreCN=0 as we are using Tyk version 5.2.2. But the error remains. Reading some articles online, it’s said that the GODEBUG environment support for Go version 1.17 above has been removed. So, is there any solution or workaround? We don’t want to change our certificate.

Hi,

I’m sorry, there’s still no work around. Golang beyond 1.17 doesn’t support certificates using CNs.

Cheers,
Pete