[NTLK] CyaSSL Library is a possibility
morgant at makkintosshu.com
Sun Feb 8 08:10:17 EST 2015
On Friday, February 6, 2015, Jake Bordens <jake at allaboutjake.com> wrote:
> Hi Everyone.
> I got a little side tracked and started playing with the CyaSSL library.
> I expected find all sorts of incompatibility and quickly move on to
> something else. To my surprise, it compiles nicely using the Newton C++
> tools... but compiling is a long way from being usable to initiate an SSL
> session or HTTPS request.
> There are a few bits that need to be modified, but you can pretty much get
> the library to compile and link with little fuss. You have to modify the
> code to remove static globals, as they are not allowed for NTK C++
> modules. You can simulate static global data by interacting with the
> NewtonScript side. I wrote a little function stub that allocates some
> memory and stores it in "GetGlobals().CyaSSLGlobals". Some ugly
> preprocessor macros from there, and no more static global.
> I'm a bit out of practice with NewtonScript, especially when it comes to
> NIE Endpoints. As far as I know there isn't any way to directly access an
> internet endpoint from the C++ side, so we'd need to work out how to to
> pass data back and forth. (This would involve some glue code in both C++
> and NewtonScript) I can't envision a clean way to do this, so I've kind
> of hit a wall. I mention this here in case someone has interest and
> knowledge to take this further.
Very cool. I had intended to this a few years ago with PolarSSL <
https://polarssl.org/> as it's also designed for embedded devices and very
modular, making it easier to use only what you need/want, but never seem to
have gotten beyond the research stage.
More information about the NewtonTalk