# Compiling against a custom OpenSSL

**URL:** <https://discuss.zetetic.net/t/compiling-against-a-custom-openssl/1497>\
**Category:** SQLCipher\
**Created:** [June 30, 2016, 12:01pm UTC](https://discuss.zetetic.net/t/compiling-against-a-custom-openssl/1497 "2016-06-30T12:01:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pratyul](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@Pratyul](https://discuss.zetetic.net/u/Pratyul)\
**Post date:** [June 30, 2016, 12:01pm UTC](https://discuss.zetetic.net/t/compiling-against-a-custom-openssl/1497/1 "2016-06-30T12:01:56Z")

</div>

I am using the latest 3.5.1 version of sql cipher.  
What we wanted to do was instead of compiling sql cipher against the open ssl bundled, we wanted to compile against a custom OpenSSL (same version) but slightly different because of some compliance reasons.

I checked online and there are several discussions on this topic. But I could not find a step by step guide.  
What I could get is replacing the source code in external/OpenSSL directory. And changing the [build-openssl-libraries.sh](http://build-openssl-libraries.sh) appropriately. Also need to make sure that the generated libcrypto.a files in android-libs folder.  
Are there other steps that are documented somewhere which we can follow?

Any help will be appreciated.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [June 30, 2016, 12:43pm UTC](https://discuss.zetetic.net/t/compiling-against-a-custom-openssl/1497/2 "2016-06-30T12:43:10Z")

</div>

Hi @Pratyul

The [`build-openssl-libraries.sh`](https://github.com/sqlcipher/android-database-sqlcipher/blob/master/build-openssl-libraries.sh) script covers how to build the standard OpenSSL libraries for the Android environment. What version of OpenSSL are you trying to compile?

---

<div class="post-metadata">

**Author:** ![Pratyul](https://avatars.discourse-cdn.com/v4/letter/p/e56c9b/32.png) [@Pratyul](https://discuss.zetetic.net/u/Pratyul)\
**Post date:** [June 30, 2016, 2:06pm UTC](https://discuss.zetetic.net/t/compiling-against-a-custom-openssl/1497/3 "2016-06-30T14:06:35Z")

</div>

We want to compile the same OpenSSL version but along with a FIPS canister. Basically something along the lines of this wiki  
[https://wiki.openssl.org/index.php/FIPS\_Library\_and\_Android](https://wiki.openssl.org/index.php/FIPS_Library_and_Android).

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [June 30, 2016, 2:27pm UTC](https://discuss.zetetic.net/t/compiling-against-a-custom-openssl/1497/4 "2016-06-30T14:27:22Z")

</div>

Hi @Pratyul

We sell a build of SQLCipher for Android that includes the FIPS cryptographic module. Please feel free to contact us at [support@zetetic.net](mailto:support@zetetic.net) if your organization is interested in licensing it. Thanks!
