Unable to make ACRA accept a self-signed certificate
<p>ACRA set up with standard options:</p>

<pre><code>@ReportsCrashes(
        formUri = "https://XXXXXXXXXX.php",
        mode = ReportingInteractionMode.TOAST,
        resToastText = R.string.str_acra_crash_report_info)
</code></pre>

<p>Tried to copy the server certificate to assets and create a custom KeyStore:</p>

<pre><code>try {
    KeyStore ksTrust = KeyStore.getInstance("BKS");
    InputStream instream = new BufferedInputStream(getAssets().open("keystore.bks"));
    ksTrust.load(instream, "ez24get".toCharArray());
    ConfigurationBuilder configurationBuilder = new ConfigurationBuilder(this);
    configurationBuilder.setKeyStore(ksTrust);
    final ACRAConfiguration config = configurationBuilder.build();
    ACRA.init(this, config);
} catch (KeyStoreException | IOException | NoSuchAlgorithmException | CertificateException e) {
    e.printStackTrace();
}
</code></pre>

<p>or another way:</p>

<pre><code>CertificateFactory cf = CertificateFactory.getInstance("X.509");
InputStream caInput = new BufferedInputStream(getAssets().open("ssl-cert-snakeoil.pem"));
Certificate ca = cf.generateCertificate(caInput);
String keyStoreType = KeyStore.getDefaultType();
KeyStore keyStore = KeyStore.getInstance(keyStoreType);
</code></pre>

<p>Unfortunately after hours of tests, still no luck, still getting an exception:</p>

<pre><code>java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
</code></pre>

<p>Any hints?</p>

<p><strong>EDIT:</strong> Created another certificate, with CA:TRUE (standard ssl-cert-snakeoil.pem had CA:FALSE), but still no luck.</p>

<p><strong>EDIT 2:</strong> Certificates made as they should be: main CA cert. + server cert., but still the same exception.</p>