-
Notifications
You must be signed in to change notification settings - Fork 633
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
How to send a https request with boost beast #825
Comments
There are HTTPS examples for both clients and servers in the example/ directory, have you tried them? Here: https://github.com/boostorg/beast/tree/develop/example/http |
`#include "example/common/root_certificates.hpp" #include <boost/beast/core.hpp> #include <boost/beast/http.hpp> #include <boost/beast/version.hpp> #include <boost/asio/connect.hpp> #include <boost/asio/ip/tcp.hpp> #include <boost/asio/ssl/stream.hpp> #include #include #include #pragma comment(lib, "libeay32") using tcp = boost::asio::ip::tcp; // from <boost/asio/ip/tcp.hpp> namespace ssl = boost::asio::ssl; // from <boost/asio/ssl.hpp> namespace http = boost::beast::http; // from <boost/beast/http.hpp>
int main(int argc, char** argv) {
}` Error: handshake: dh key too small |
the server dose not have a certificate with the https! |
The beat example only comes with a couple of root certificates. Most likely your server was signed with a root certificate that is not one that comes with the example code. You will need to do more sophisticated certificate verification. Unfortunately that is beyond the scope of the beast examples. |
If you're going to quote code please use triple backqoutes ``` |
Has this issue been resolved? |
It looks like there is nothing more than I can do to help with this issue so I will go ahead and close it. Feel free to create a new issue if you continue to encounter difficulties. Also, when quoting code, consider surrounding it with triple backquotes (```) in order that it be correctly formatted. |
Dear vinniefalco:
I really love this library, but I don't know how to send a https with the beast, the server dose not have a certificate with the https
The text was updated successfully, but these errors were encountered: