Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Add SAN field to the x509 certificate #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kenwer
Copy link

@kenwer kenwer commented Oct 6, 2020

I was getting the following error when running the TLS example:

=== RUN   Example_tls
2020/09/29 13:48:13 http: TLS handshake error from [::1]:63266: remote error: tls: bad certificate
--- FAIL: Example_tls (0.94s)
got:
Ping failed: Http client get failed: Get "https://localhost:63265": x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0

This patch adds the SAN field to the x509 certificate so it doesn't rely just on legacy Common Name field to fix this error.

Add SAN field to the x509 certificate so it doesn't rely just on legacy Common Name field. This prevents a TLS connection error on modern environments.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant