app/src/main/java/com/mensa/zhmensa/services/HttpUtils.java
/*
     STUFF TO FIX SSL PROBLEM WITH OLD DEVICES
    */
STUFF TO FIX SSL PROBLEM WITH OLD DEVICES
STUFF TO FIX SSL PROBLEM WITH OLD DEVICES
private static AdditionalKeyStoresSSLSocketFactory createAdditionalCertsSSLSocketFactory(Context context) {
        try {
            final KeyStore ks = KeyStore.getInstance("BKS");
            final InputStream in = context.getResources().openRawResource(R.raw.mystore);
            try {
                ks.load(in, context.getString(R.string.mystore_password).toCharArray());
            } finally {
                in.close();
            }
            return new AdditionalKeyStoresSSLSocketFactory(ks);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
private static AdditionalKeyStoresSSLSocketFactory createAdditionalCertsSSLSocketFactory ( Context context ) { try { final KeyStore ks = KeyStore . getInstance ( "BKS" ) ; final InputStream in = context . getResources ( ) . openRawResource ( R . raw . mystore ) ; try { ks . load ( in , context . getString ( R . string . mystore_password ) . toCharArray ( ) ) ; } finally { in . close ( ) ; } return new AdditionalKeyStoresSSLSocketFactory ( ks ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
STUFF TO FIX SSL PROBLEM WITH OLD DEVICES
STUFF TO FIX SSL PROBLEM WITH OLD DEVICES
// the bks file we generated above // don't forget to put the password used above in strings.xml/mystore_password