Switch memory_cleanse implementation to BoringSSL's to ensure memory clearing even with link-time optimization.
Switch memory_cleanse implementation to BoringSSL's to ensure memory clearing even with link-time optimization.

The implementation we currently use from OpenSSL prevents the compiler from optimizing away clensing operations on blocks of memory that are about to be released, but this protection is not extended to link-time optimization. This commit copies the solution cooked up by Google compiler engineers which uses inline assembly directives to instruct the compiler not to optimize out the call under any circumstances. As the code is in-lined, this has the added advantage of removing one more OpenSSL dependency.

Regarding license compatibility, Google's contributions to BoringSSL library, including this code, is made available under the ISC license, which is MIT compatible.

BoringSSL git commit: ad1907fe73334d6c696c8539646c21b11178f20f

Signed-off-by: cevap <34c6fceca75e456f25e7e99531e2425c6c1de443@i2pmail.org>

cevap/ion,cevap/ion,cevap/ion,ionomy/ion,ionomy/ion,ionomy/ion,cevap/ion,ionomy/ion,cevap/ion,ionomy/ion,cevap/ion,ionomy/ion