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

migrating from c-lightning-REST to clnrest.py #6931

Closed
4ezb2 opened this issue Dec 9, 2023 · 2 comments · Fixed by #7431
Closed

migrating from c-lightning-REST to clnrest.py #6931

4ezb2 opened this issue Dec 9, 2023 · 2 comments · Fixed by #7431
Assignees
Milestone

Comments

@4ezb2
Copy link

4ezb2 commented Dec 9, 2023

short bug description:

after migrating to the "new" built-in plugin clnrest.py instead of using c-lightning-REST, my lightningd logs show the following error:

Warning: option `ssl_version` is deprecated and it is ignored. Use ssl_context instead.

my failed attempt to solve issue

changing linenumber 160 from ssl_version to ssl_context in /lightning/plugins/clnrest/clnrest.py results in this log:

Error: Value is not callable: _SSLMethod.PROTOCOL_TLSv1_2

final words

any pointers or help to resolve this issue would be much appreciated. other than this little warning message, my migration was successful thanks to the very helpful documentation provided by you guys.

@4ezb2 4ezb2 changed the title migrating from c-lightning-REST to the built in plugin clnrest.py migrating from c-lightning-REST to clnrest.py Dec 9, 2023
ShahanaFarooqui added a commit to ShahanaFarooqui/lightning that referenced this issue Jun 25, 2024
Reference: migrating from c-lightning-REST to clnrest.py ElementsProject#6931

Changelog-None.
ShahanaFarooqui added a commit to ShahanaFarooqui/lightning that referenced this issue Jun 25, 2024
Reference Issue ElementsProject#6931: Fixes `Warning: option `ssl_version` is deprecated and it is ignored. Use ssl_context instead.`

Changelog-None.
@ShahanaFarooqui ShahanaFarooqui linked a pull request Jun 25, 2024 that will close this issue
@ShahanaFarooqui ShahanaFarooqui added this to the v24.08 milestone Jun 25, 2024
@ShahanaFarooqui
Copy link
Collaborator

Replacing ssl_version with "ssl": ssl.SSLContext(protocol=ssl.PROTOCOL_TLS_SERVER) fixes the issue.

Curl example with https:

curl --cacert /path/to/certs/ca.pem --header 'Rune: ZrAK...E9MA==' --request POST --url https://127.0.0.1:3010/v1/getinfo

@4ezb2
Copy link
Author

4ezb2 commented Jun 26, 2024

Much appreciated. Thanks. Can confirm that your fix works!

rustyrussell pushed a commit that referenced this issue Jun 28, 2024
Reference Issue #6931: Fixes `Warning: option `ssl_version` is deprecated and it is ignored. Use ssl_context instead.`

Changelog-None.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants