Skip to content

Conversation

dimalinux
Copy link

Unit test fixes

The unit tests, at least under go 1.16, were failing:

panic: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0

I put in new certificates, separating the client from the server certificate. The server certificate now has a subject alternative name section which includes both localhost and 127.0.0.1.

Timestamp parsing fixes

RFC 3339 timestamps do not have a fixed size length, but they also do not contain any spaces:
https://tools.ietf.org/html/rfc3339#section-5.8

I changed the code to terminate after the first space instead using the size of the formatting string to fix the issue.

Go modules support

Added go modules support.


If you are not happy with something or want something done better, let me know and I'll try to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant