I am working on a C++ Android app that uses gSOAP with OpenSSL. To enable OpenSSL to validate the server certificate I need to provide it with location for the cacerts.pem file, otherwise all HTTPS connections fail.
My question is: What is the right way to store and load cacerts.pem on Android?
I am able to copy
cacerts.peminto the APK root by placing it insrc/resourcesorres/raw/orassets/. ButSSL_CTX_load_verify_locations(ctx, "cacerts.pem", nullptr)fails to find the file. How can I make OpenSSL be able to read the PEM file inside APK?Is there a way to store
cacerts.pemas a string buffer and thus avoid carrying it in the APK?
My app needs to talk to sharepoint online sites (https://*.example.com/)
Aucun commentaire:
Enregistrer un commentaire