microsoft / openssl

A cross-platform cryptographic library
133 stars 57 forks source link

Smaller crypto build to support SQLCipher #32

Closed brodycj closed 7 years ago

brodycj commented 8 years ago

With help from https://github.com/sgrebnov/OpenSSL-WinRT-build along with the fix to ms/setVSvars.bat I was able to build OpenSSL and test it with SQLCipher on Windows 8.1, Windows Phone 8.1, and Windows 10 for litehelpers/Cordova-sqlcipher-adapter#30. However the build for each CPU target is over 12MB (over 13MB for x64).

But SQLCipher only needs the equivalent of the libcrypto.so part. Not only would this be a smaller build it would be less likely to contain major security vulnerabilities. For example, SQLCipher was completely unaffected by the Heartbleed vulnerability: https://www.zetetic.net/blog/2014/4/10/heartbleed-security-statement-for-sqlcipher.html

It would be great if someone would have a chance to look at this issue or perhaps just give some pointers.

khouzam commented 8 years ago

Hi @brodybits,

Looking at the build script, you're already using the static library which should only include the portions of the code that are invoked in the code that link with them. The size of the library being 12 or 13MB is not an indication of the code that will be part of the final linked project, the static library also contains all the symbol information, which will be discarded in the final executable/dll or moved to a PDB file.

I would look at the size of the final executable as an indicator, not the size of the static library.

brodycj commented 7 years ago

Closing for now, will try this later.