Skip to content

Conversation

ixti
Copy link
Member

@ixti ixti commented Dec 20, 2020

Resolves: #633

@ixti ixti changed the title Swith to GH-Actions [#633] Swith to GH-Actions Dec 20, 2020
@ixti ixti changed the title [#633] Swith to GH-Actions Switch to GH-Actions Dec 20, 2020
@ixti ixti marked this pull request as draft December 20, 2020 09:24
@ixti
Copy link
Member Author

ixti commented Dec 20, 2020

Tests are failing due to SSL errors, which are caused by invalid config and/or incorrectly generated certificates. As we do some hackety hackery to mimic different ssl weirdiness, it might be the problem of misconfiguration, but I can't figure out what exactly isn't correct.

@ixti
Copy link
Member Author

ixti commented Dec 20, 2020

I tend to disable failing specs temporarily and address those as a separate pr (help is super welcomed).

@tarcieri wdyt?

Copy link
Member

@tarcieri tarcieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an open issue for the SSL-related failures: #627. I'm also not sure what's up there... I'm guessing something changed related to either accepted algorithms or hostnames.

Otherwise, this looks good!

* Use GitHub Actions for CI
* Update Coveralls integration: generate lcov report with SimpleCov and
  send it after the test suite using coveralls GitHub Actions plugin
* Update and cleanup RSpec config
* Cleanup Rakefile
* Remove active_model dependency (certificate_authority was fixed)

PS: GH Actions syntax is ugly.
  Should we switch to Cirlce CI or GitLab CI? XD

Resolves: #633
@ixti ixti force-pushed the ixti/switch-to-gh-actions branch from 446845d to ddaddd2 Compare December 20, 2020 14:56
Specs are failing due to some misconfiguration caused by new OpenSSL.
TODO: #627
@ixti ixti force-pushed the ixti/switch-to-gh-actions branch from ddaddd2 to 2ae6a71 Compare December 20, 2020 16:14
@ixti ixti marked this pull request as ready for review December 20, 2020 16:15
ixti added 7 commits December 27, 2020 18:03
We were not testing those on Travis-CI, thus to simplify migration I've
deicded to disable those. Once everything is fixed and stabilized we
will add those too.
Just to make sure we're using expected ones
- use stub_const
- consistently normalize URIs
/cc @tarcieri Probably we should just add dependency on gem itself?
jRuby is using outdated openssl gem bundled in, which don't have
validate_hostname getter on SSLContext.
@ixti ixti merged commit 9bb0136 into master Dec 28, 2020
@ixti ixti deleted the ixti/switch-to-gh-actions branch December 28, 2020 04:05
@@ -36,8 +36,9 @@ def start_tls(host, ssl_socket_class, ssl_context)
connect_ssl

return unless ssl_context.verify_mode == OpenSSL::SSL::VERIFY_PEER
return unless ssl_context.respond_to?(:verify_hostname) && ssl_context.verify_hostname
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In hindsight, this should probably have been:

return if ssl_context.respond_to?(:verify_hostname) && !ssl_context.verify_hostname

...so as to only support explicitly disabling hostname verification. As is, it seems hostname verification won't be performed on JRuby at all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #636 as a follow-up to this comment.

tarcieri added a commit that referenced this pull request Dec 28, 2020
Following up on this comment:

#634 (review)

The previous logic skipped hostname verification entirely if the
`verify_hostname` method is not defined for `OpenSSL::SSL::SSLContext`,
which is currently the case for JRuby.

This commit changes the logic so if that method is undefined, hostname
verification is still performed. Otherwise, hostname verification would
always be skipped on Rubies which don't define a `verify_hostname`
method.

Note that this was *just* introduced in #634 which was merged 10 hours
ago, so I think this was caught quickly enough simply correcting it
suffices and there isn't additional security-related followup here
(e.g. CVE)
tarcieri added a commit that referenced this pull request Dec 28, 2020
Following up on this comment:

#634 (review)

The previous logic skipped hostname verification entirely if the
`verify_hostname` method is not defined for `OpenSSL::SSL::SSLContext`,
which is currently the case for JRuby.

This commit changes the logic so if that method is undefined, hostname
verification is still performed. Otherwise, hostname verification would
always be skipped on Rubies which don't define a `verify_hostname`
method.

Note that this was *just* introduced in #634 which was merged 10 hours
ago, so I think this was caught quickly enough simply correcting it
suffices and there isn't additional security-related followup here
(e.g. CVE)
@ixti
Copy link
Member Author

ixti commented Dec 29, 2020

Thanks for the fix

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.

Migrate to GitHub Actions
2 participants