curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Help using libcurl with HTTP proxy on Android device

From: David Castillo via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 12 Apr 2023 15:08:02 -0700

> Surely you can put a text file in
> your Android file system and tell your application's libcurl to use that
file
> as a CA cert?

But I don't know beforehand the name of that file, since the user could use
different proxies (it's not always a certificate for Charles). Although I
guess as a workaround I could educate the user to load their CA cert file
in the Download directory with a specific name. I tested this by setting
CURLOPT_CAINFO, but I got this error:

"error setting certificate verify locations: CAfile:
/storage/emulated/0/Download/924c6f19.0 CApath:
/system/etc/security/cacerts"

Then I tried just setting the CURLOPT_CAPATH option to the Download
directory and got this permission error:

"BoringSSL: error:0200000d:system library:OPENSSL_internal:Permission
denied"

Does this mean that the Download directory on Android doesn't have the
permissions required for OpenSSL to read the certificates?
drwxrws--- 4 u0_a147 media_rw 4096 2023-04-11 17:34 Download

What permissions does OpenSSL need to read the certificates?


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-04-13