goxmldsig
goxmldsig copied to clipboard
proposal: remove clockwork dependency
The current clockwork dependency is used in exactly one place.
type ValidationContext struct {
CertificateStore X509CertificateStore
IdAttribute string
Clock *Clock
}
This can easily be replaced with a method for getting the current time.
type ValidationContext struct {
CertificateStore X509CertificateStore
IdAttribute string
// Now is used to determine the current time. If not provided, time.Now is used.
Now func() time.Time
}
Basically what tls.Config does https://golang.org/pkg/crypto/tls/#Config
It's a breaking change so I wanted to see how y'all feel about it before sending a PR.
I'm open to that, I don't think it would break much. Is the goal just to reduce external dependencies?
Is the goal just to reduce external dependencies?
Yep!
How is the state of this change? Everything that reduces surface (prone to errors) is very welcome.