As per KeyStore JavaDoc (https://docs.oracle.com/javase/7/docs/api/java/security/KeyStore.html#load(java.io.InputStream,%20char[])), the method signature you are using is KeyStore.load(InputStream, char[])
. This means that the InputStream
does not have to be a FileInputStream
. Download your keystore bytes from Azure, wrap them into a ByteArrayInputStream and do whatever you need to do.
As for how to read pfx
keystore, you should be able to do it with initiating the keystore like KeyStore.getInstance("pkcs12", "SunJSSE")
and then loading it like you would load a JKS keystore.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…