Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enforce lowlevel ciphers for legacy environments by ctx.set_ciphers #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions check_brevisone
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def get_data(base_url, timeout, insecure):
# Default context for connection
ctx = ssl.create_default_context()
if insecure is True:
ctx.set_ciphers("DHE-RSA-AES256-GCM-SHA384:@SECLEVEL=1")
Copy link
Member

Choose a reason for hiding this comment

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

Any reason for this specific cipher?

If possible, we want to use something as broad as possible, that works for everyone

Copy link
Member Author

Choose a reason for hiding this comment

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

I took this specific cipher due to the output of openssl s_client --connect smsgw1.invalid.local:443 --cipher 'ALL:@SECLEVEL=1'

However, i am pretty sure any of the ciphers on the medium level would fit:
image

https://docs.brevis.one/current/de/Content/Installation/Setting%20Up%20the%20Gateway/General%20configuration.htm

Copy link
Member

Choose a reason for hiding this comment

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

I think that might be too specific for your use case/

Suggested change
ctx.set_ciphers("DHE-RSA-AES256-GCM-SHA384:@SECLEVEL=1")
ctx.set_ciphers("ALL:@SECLEVEL=0")

If we can do something like this, that would probably work for most users.

ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE

Expand Down