Questions tagged [beast]

The “Browser Exploit Against SSL/TLS” is a vulnerability of the TLS 1.0 protocol discovered in 2011.

See tag beast-websockets for C++ Beast HTTP/Websocket library

61 questions
2
votes
1 answer

Boost beast send json with byte array to client throw websocket

I have file which is converted from byte array to string processResultJson.append(reinterpret_cast(im->bits), sizeof(im->bits)); processResultJson.append(reinterpret_cast(im->bits),…
Khusayn
  • 37
  • 6
2
votes
3 answers

How can I reuse http::response in beast

I would like to periodically http GET some value from a website. with beast, the code is like: // Set up an HTTP GET request message http::request req{http::verb::get, target, version}; req.set(http::field::host,…
Long Bu
  • 513
  • 4
  • 9
2
votes
2 answers

How to use boost::beast, download a file no blocking and with responses

I have started with this example so won't post all the code. My objective is to download a large file without blocking my main thread. The second objective is to get notifications so I can update a progress bar. I do have the code working a couple…
lakeweb
  • 1,859
  • 2
  • 16
  • 21
2
votes
1 answer

Does boost asio ssl::stream supports multiple pending http::async_write calls?

I have a http client that performs http::async_write() with a callback that performs http::async_read() on ssl::stream. All the async operations are wrapped in the same explicit strand. The simplified code looks like this http::async_write( …
kirararara
  • 31
  • 1
2
votes
0 answers

How to get http request body from boost beast http_parser?

How to get request body from a http_request? I tried http_request.body(), it's not work, http_request.body() returns an empty string. #include "pch.h" #include #include int main() { std::string s = "POST…
Meow
  • 41
  • 4
2
votes
0 answers

C++ Url Routing (and possible parsing)

I start an api server with Boost Beast. I use the async http server. My goal is to do the same things as Express.js For now I route like this : if(req.method() == http::verb::post) { if(req.target() == "/mypath") { …
Vana
  • 753
  • 3
  • 11
  • 20
2
votes
1 answer

Boost::Beast Websocket Bidirection Stream (C++)

I'm looking into using the Boost::Beast websocket library to create an asynchronous bidirectional pipe to pass data between a server and a client. I leveraged some code from the async example (I can post some at a later time if necessary, don't have…
nhruch
  • 149
  • 1
  • 11
2
votes
1 answer

Boost Beast WebSockets with several indeterminate writes per read

Using boost/beast websockets in C++ I've read up on the issues with beast websockets not supporting non-blocking reads, and the fact that there's no way to check if data is available, and that doing reads and writes in separate threads is probably…
1
vote
1 answer

Why uninitialized exception?

The following code throws an uninitialized exception in the ws.handshake(url, "/") call... I am new to Beast, but this was mostly copied from working example code. Does anyone know why this is happening??? I would really appreciate any help in…
1
vote
0 answers

c++ gemini websocket connection. error uninitialized

I am trying to create a basic vanilla websocket client using c++ and the boost/beast library. Following the examples, I can create an unsecured ws connection. But when I try to incorporate ssl into the mix, everything falls apart. It fails during…
1
vote
1 answer

Boost.Beast `tcp_stream`'s `async_connect` waits full duration with `use_future`

I'm writing a connection manager class that should establish connection to the server and send several HTTP requests using Boost.Beast. It has a connect method that should return true if connection was successful and false otherwise. I am using…
1
vote
1 answer

SslStream, BEAST and TLS 1.1

With the recent advent of BEAST (exploits a vulnerability in SSL/TLS1.0 where the initial bytes of the payload are always the same) I looked into the SslStream class to see if it supported TLS 1.1, TLS 1.2, etc. It only supports (SslProtocol) SSL 2…
Jonathan Dickinson
  • 9,050
  • 1
  • 37
  • 60
1
vote
1 answer

Why is boost::asio::io_context::run() still blocking after boost::beast::websocket::stream::close()?

I have a pool of threads using concurrently the same io_context to run a websocket stream. I am doing this because first, I have actually 2 websocket streams (I abstracted this because by testing it appears not to be the problem), and because I want…
kmft3kte
  • 23
  • 6
1
vote
0 answers

Find the best way to reconnect Boost::Beast websocket

I'd like get an advice about how to replace boost::beast based ssl websocket connection between 2 different servers that will minimize the reconnection time. my web socket client object is from the following type as a member variable of …
Zohar81
  • 4,554
  • 5
  • 29
  • 82
1
vote
1 answer

Using Boost Beast to build Platform specific client-side authentication in SSL connection

I’m working on boost::beast based application on macOS platform, and I wonder how I can provide a client-side certificate to authenticate against the server ? basically , in macOS the certificates are stored in keychain, and cannot be exported…
Zohar81
  • 4,554
  • 5
  • 29
  • 82