Skip to content

Conversation

@ioquatix
Copy link
Member

Modernize the gem and workflows.

Types of Changes

  • Maintenance.

@ioquatix
Copy link
Member Author

ioquatix commented Jul 27, 2022

@rhenium I noticed on ruby head, certificate validation is failing. Any idea why?

1) Async::RSpec::SSL Async::RSpec::SSL::ValidCertificate can validate client certificate
     Failure/Error: expect(certificate_store.verify(certificate)).to be_truthy

I can investigate but it seems a bit odd.

@rhenium
Copy link

rhenium commented Jul 27, 2022

certificate.not_before = Time.now
certificate.not_after = Time.now + 3600

I wonder if updating this with certificate.not_before = Time.now - 1 would solve it.

I've seen similar random errors in ruby/openssl, and making a change like the above appears to have fixed it.

I concluded it was likely because Ruby's Time.now and OpenSSL's verification code use a different way to get the current time. Time.now uses clock_gettime(CLOCK_REALTIME); OpenSSL uses time() (which works more similar to clock_gettime(CLOCK_REALTIME_COARSE) on Linux). But I didn't actually verify this.

@ioquatix
Copy link
Member Author

@rhenium thanks so much for that insight it will save me a lot of time to investigate. I'll try it out.

@ioquatix ioquatix merged commit f13a3c3 into main Jun 5, 2023
@ioquatix ioquatix deleted the modernize-gem branch June 5, 2023 03:17
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.

3 participants