autobahn-cpp icon indicating copy to clipboard operation
autobahn-cpp copied to clipboard

Don't depend on OpenSSL / move to NaCl and libsodium

Open oberstet opened this issue 9 years ago • 4 comments

  1. make libsodium a (hard) dependency
  2. wamp_auth_utils.derive_key should use https://download.libsodium.org/doc/advanced/hmac-sha2.html
  3. wamp_auth_utils.base_64_encode should be replace by code of our own (included in the library .. its trivial)

oberstet avatar Apr 16 '16 05:04 oberstet

base64 encode/decode: http://www.adp-gmbh.ch/cpp/common/base64.html

oberstet avatar Apr 16 '16 06:04 oberstet

Just noting that compared to bonefish's old base64 implementation and my newer cppcodec, the base64 implementation linked above does not pass on decoding errors to the user (from either invalid input characters or invalid base64 string length), and will also result in numerous allocations due to not reserving a fully-sized target buffer (e.g. with std::string::reserve()) from the start.

jpetso avatar Apr 18 '16 18:04 jpetso

@jpetso Oh, I see. That's not good. cppcodec looks nice! Mmh. Maybe use yours? =) Since it's headers only, we could just add a Git submodule in here ..

oberstet avatar Apr 18 '16 21:04 oberstet

MIT license is also good. No problem with GPL2 (as we had with Apache).

Btw: websocketpp itself is 3-clause BSD'ish, and includes a (modified) copy of the base64 stuff I linked above: https://github.com/zaphoyd/websocketpp/blob/master/COPYING

oberstet avatar Apr 18 '16 21:04 oberstet