readium / readium-sdk

A C++ ePub renderer SDK
BSD 3-Clause "New" or "Revised" License
385 stars 164 forks source link

third-party lib CRYPTO OPENSSL (different in LCP client) #233

Closed danielweck closed 8 years ago

danielweck commented 8 years ago

ReadiumSDK: https://github.com/readium/readium-sdk/tree/develop/ePub3/ThirdParty/openssl-android

versus

LCP: https://github.com/readium/readium-lcp-client/tree/android/src/third-parties/cryptopp

danielweck commented 8 years ago

Secondary issue, deprecation of the special OpenSSL dependency (headers + prebuilt static libs):

https://github.com/readium/readium-sdk/tree/develop/ePub3/ThirdParty/openssl-android

See README:

https://github.com/readium/readium-sdk/blob/develop/ePub3/ThirdParty/openssl-android/lib/README.md

Source tree:

https://github.com/readium/openssl-android

danielweck commented 8 years ago

Note that only Android uses the OpenSSL lib. iOS and OSX use the same API syntax, but rely on the platform lib (Windows uses a different syntax altogether):

https://github.com/readium/readium-sdk/blob/develop/ePub3/ePub/font_obfuscation.cpp#L125

    SHA_CTX ctx;
    SHA1_Init(&ctx);
    SHA1_Update(&ctx, str.data(), str.length());
    SHA1_Final(_key, &ctx);
danielweck commented 8 years ago

CC @clebeaupin

danielweck commented 8 years ago

Fixed in PR https://github.com/readium/readium-sdk/pull/247