arduino-libraries / ArduinoBearSSL

Port of BearSSL to Arduino
MIT License
84 stars 49 forks source link

#define BEAR_SSL_CLIENT_IOBUF_SIZE #12

Closed ravelab closed 5 years ago

ravelab commented 5 years ago

add BEAR_SSL_CLIENT_IOBUF_SIZE so that user can define it as a build option to have different IOBUF_SIZE

gvarisco commented 5 years ago

Referencing #11 as tracking issue

sandeepmistry commented 5 years ago

Hi @ravelab,

The change in commit https://github.com/arduino-libraries/ArduinoBearSSL/pull/12/commits/35de2a9169c1cbbe6103aaa91c361fa9910f5bf2 looks fine to me. One question, how will you be externally setting the define? Please note lowering the buffer size could potentially make connecting to some servers fail.

I also noticed you pushed more commits to this pull request, was that intentional?

ravelab commented 5 years ago

Hi @sandeepmistry I would setting it like this arm-none-eabi-g++ ... "-D BEAR_SSL_CLIENT_IOBUF_SIZE=1024 + 85 + 325" ...

the more commit was not intentional and I fixed that.

sandeepmistry commented 5 years ago

Are you editing the boards.txt or platform.txt of the core to change this?

ravelab commented 5 years ago

no, I'm using platformio to build it, so I have build_flags = '-D BEAR_SSL_CLIENT_IOBUF_SIZE=1024 + 85 + 325' But I imagine it should work for any tools that support customized build_flags