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

HTTPS support #191

Closed
xtrinch opened this issue Apr 26, 2020 · 4 comments
Closed

HTTPS support #191

xtrinch opened this issue Apr 26, 2020 · 4 comments
Assignees

Comments

@xtrinch
Copy link

xtrinch commented Apr 26, 2020

Are there any plans to support HTTPS?

I am trying to use https://dexplorer.ark.io @ port 8443 as the node, and it seems that http:// is hardcoded in: https://github.com/ArkEcosystem/cpp-client/blob/751212f0abb395d3ac7b9859b0538842118d4080/src/http/iot/http.cpp#L41

I've made a workaround by removing the forced prefix and just passing the entire URL to cpp-client:

Ark::Client::Connection<Ark::Client::Api> connection("https://dexplorer.ark.io", 8443);

One other modification was necessary in:
https://github.com/ArkEcosystem/cpp-client/blob/751212f0abb395d3ac7b9859b0538842118d4080/src/host/host.cpp#L44
as this will match the first : in the URL and malform the url into https8443/api..., so it should use a match last:
snprintf(&out[out.find_last_of(":") + 1U], PORT_MAX_STRING_LEN, "%d", this->port_);

Other than that no additional modifications were necessary for HTTPS to work.

(& I am using nodemcu-32s with arduino framework)

@ghost
Copy link

ghost commented Apr 26, 2020

Thanks for opening this issue! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@sleepdefic1t
Copy link
Contributor

sleepdefic1t commented Apr 27, 2020

Hello, @xtrinch

Yes, we can add support for Https.

I have a working implementation tested and ready to go,
and am just waiting on some changes to be merged first.

Thank you for looking into this along with #192 👍

@sleepdefic1t sleepdefic1t added the Status: In Progress The issue or pull request is being worked on. label Apr 27, 2020
@sleepdefic1t
Copy link
Contributor

Updates merged to develop.
Feel free to let us know if you have any other questions or concerns.

Thanks again, @xtrinch 👍

@ghost
Copy link

ghost commented May 1, 2020

This issue has been closed. If you wish to re-open it please provide additional information.

@ghost ghost removed the Status: In Progress The issue or pull request is being worked on. label May 1, 2020
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

2 participants