Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes unit tests under go 1.16, fix for UTC timestamp parsing, adds go modules support #75

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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