Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Add 'cainfo_path' option to 'storj_http_options' #365

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

kaloyan-raev
Copy link
Contributor

The 'cainfo_path' options sets the path to the Certificate Authority (CA) bundle. The value is then used to set the CURLOPT_CAINFO option to avoid the CURLE_SSL_CACERT error on systems (like Android) that have no suitable CA bundle.

I need this for the Android app I am developing. I can pack the CA bundle in the APK, extract it on a suitable location on the Android device upon app startup and then pass this location as 'cainfo_path' option to libstorj.

The 'cainfo_path' options sets the path to the Certificate Authority
(CA) bundle. The value is then used to set the CURLOPT_CAINFO option to
avoid the CURLE_SSL_CACERT error on systems (like Android) that have no
suitable CA bundle.
@braydonf
Copy link
Contributor

We've typically handled these errors via a compiling step of libcurl, see https://github.com/Storj/libstorj/blob/master/depends/packages/libcurl.mk though this could be useful too.

@kaloyan-raev
Copy link
Contributor Author

Do you mean to compile libcurl with the --with-ca-bundle=FILE option?

The problem with this approach is that there is no built-in CA bundle on Android. I have to pack it in the app's APK and the unpack it on app's startup. I can unpack it to the app's data dir, but the exact location of this data dir is determined during runtime. It is not a good idea to fix the location during compile time.

@braydonf braydonf merged commit 343057f into storj-archived:master Jul 20, 2017
@kaloyan-raev kaloyan-raev deleted the cainfo-path branch July 21, 2017 05:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants