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

Not thread safe, caching issues #6

Closed
sqrrrl opened this issue Jan 15, 2016 · 2 comments · Fixed by #22
Closed

Not thread safe, caching issues #6

sqrrrl opened this issue Jan 15, 2016 · 2 comments · Fixed by #22

Comments

@sqrrrl
Copy link
Member

sqrrrl commented Jan 15, 2016

The validator itself isn't thread safe due to the use of @problem to report back status. This requires creating a new instance each time (or at least being very careful in other ways.) Creating multiple instances however partially defeats the built-in caching of certificates.

Could use a refactoring to better separate out the certificate loading/caching from the validator. It's partially there in that a list of certs can be passed in to the validator, but that leaves a lot of implementation in the hands of users of the lib.

Should be a more complete solution than what is offered.

@gguuss
Copy link
Contributor

gguuss commented Jan 20, 2017

Resolved in this PR we should add tests and close when verified.

@hxiong388
Copy link
Contributor

While #10 definitely improves the thread safety by removing the @problem instance variable. But it's still not completely thread safe because it still uses Hash and Hash#merge! to cache the certificates.

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

Successfully merging a pull request may close this issue.

3 participants