0
if (profile == null) {
    File file = new File("cert.p12");
    try {
        InputStream stream = new FileInputStream(file);
        Log.d("VAR", String.valueOf(stream));
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
    Log.d(TAG, "onCreate: profile is NULL");
    profile = new VpnProfile();
    profile.setName("vpn");
    profile.setUserCertificateAlias(String.valueOf(file));
    profile.setGateway("ip");
    profile.setVpnType(VpnType.IKEV2_CERT);
    profile.setFlags(0);
    profile.setSelectedAppsHandling(VpnProfile.SelectedAppsHandling.SELECTED_APPS_DISABLE);
    vpnProfileDataSource.insertProfile(profile);

How do I put a p12 certificate file in a strongswan profile that requires a string?

notboberyes
  • 1
  • 1
  • 1

0 Answers0