androidkeystoreandroid-keystorews-security

Android keystore location for wss


I have an android application that communicates with a secured webservice over https and using wss (wss4j). In a previous desktop java application all worked fine and i use a physical .jks file to initialise everything, ie:

props.setProperty("org.apache.ws.security.crypto.merlin.file", "c:/temp/conf/ihar.jks");
Crypto crypto = CryptoFactory.getInstance(props);

This all works fine on the desktop, however, on an android device obviously the location is wrong ("c:/temp/conf/ihar.jks", of course, doesnt exist). So my question is how can i specify a location to the file? I think it just takes a sting value, so would something like "file:///android_asset/res/ihar.jks" be feasible?


Solution

  • I have not a share-able project at the moment (sry), but I can give you some pointers on your question:

    I hope from here you know how to proceed.