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

DH key too short on the server side #7

Open
caniko opened this issue Mar 31, 2024 · 0 comments
Open

DH key too short on the server side #7

caniko opened this issue Mar 31, 2024 · 0 comments

Comments

@caniko
Copy link

caniko commented Mar 31, 2024

Tried to access the API by using the CLI file, get_swc.py; got this error:

          No network connectivity. A working internet connection is required.
          Check with ISP and/or your local network infrastructure for failure.

Did some digging for 5 minutes, and found that this occurs in rest_wrapper.py under check_api_health(). After some debugging, I found out that it is a URLError; your DH keys are too short! DH keys are used to create a secure SSL connection, and I think the standard size of these keys have been increased since the creation of this API. The underlying network libraries no longer accept these short keys.

Found this:
https://stackoverflow.com/questions/64354210/python-dh-key-too-small-which-side-is-faulty

Short version: The issue seems to be in the server. Probably legacy software.

To repoduce with minimal work:

url = "http://neuromorpho.org/api/health"
req = Request(url)

response = urlopen(req)    # <---- should crash here

if json.loads(response.read().decode('utf-8'))['status'] != "UP":
    print("REST API not available.")
else:
    return True

Note, that I can open http://neuromorpho.org/api/health in the browser, and I do get "status": "UP". Meaning, the issue really is with the DH keys.

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

No branches or pull requests

1 participant