AmadeusITGroup / kassette

kassette is a development server, used mainly for testing, which proxies requests and is able to easily manage local mocks.
MIT License
9 stars 15 forks source link

fix: allow connection to legacy unsafe servers #484

Closed divdavem closed 11 months ago

divdavem commented 11 months ago

This PR adds the SSL_OP_LEGACY_SERVER_CONNECT flag when connecting to legacy remote servers for increased compatibility. Note that it allows man-in-the-middle attacks, but those attacks are already possible anyway because of the rejectUnauthorized option which allows any certificate on the server. kassette is a test tool that is not designed to run in a production environment.

This PR fixes the following error that can happen when this flag is not set:

78250000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled
codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (31510de) 91.52% compared to head (256b7d9) 91.52%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #484 +/- ## ======================================= Coverage 91.52% 91.52% ======================================= Files 36 36 Lines 1192 1192 Branches 268 268 ======================================= Hits 1091 1091 Misses 50 50 Partials 51 51 ``` | [Flag](https://app.codecov.io/gh/AmadeusITGroup/kassette/pull/484/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AmadeusITGroup) | Coverage Δ | | |---|---|---| | [e2e](https://app.codecov.io/gh/AmadeusITGroup/kassette/pull/484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AmadeusITGroup) | `80.03% <ø> (ø)` | | | [ut](https://app.codecov.io/gh/AmadeusITGroup/kassette/pull/484/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AmadeusITGroup) | `59.89% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AmadeusITGroup#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

divdavem commented 11 months ago

@fbasso Thank you for your review!