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

Add expiration validation test(s) #145

Open
atc0005 opened this issue Jan 24, 2023 · 0 comments
Open

Add expiration validation test(s) #145

atc0005 opened this issue Jan 24, 2023 · 0 comments
Assignees
Labels
Milestone

Comments

@atc0005
Copy link
Owner

atc0005 commented Jan 24, 2023

NOTE:

The Go Playground example in the References section below explicitly sets the x509.VerifyOptions.CurrentTime value to aid in testing certificate verification:

	chains, err := leafCert.Verify(x509.VerifyOptions{
		Intermediates: interPool,
		Roots:         rootPool,
		KeyUsages:     []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},

		// WARNING: Necessary on Playground. Remove in productive code!
		CurrentTime: time.Date(2019, 12, 18, 0, 0, 0, 0, time.UTC),
	})

I should use a similar approach and add test coverage for certificate expiration.

As part of this, I should search out code directly performing date evaluation and extend (if needed) to allow setting/injecting a known date test value.

References

@atc0005 atc0005 added the tests label Jan 24, 2023
@atc0005 atc0005 added this to the Future milestone Jan 24, 2023
@atc0005 atc0005 self-assigned this Jan 24, 2023
@atc0005 atc0005 transferred this issue from another repository Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant