Java Keystore.aliases() - different implementations between IBM and Oracle -
Java Keystore.aliases() - different implementations between IBM and Oracle -
i have certificate issued (private) ca. when i'm loading java keystore , phone call aliases()
function, different results between oracle jvm (on windows) , ibm jvm (on linux).
on oracle, 1 alias - certificate's cn - "my_cert", , on ibm 2 aliases - "my_cert" , "my_ca".
i utilize keystore loading ca certificate out of certificate. on oracle, can without knowing certificate's cn - phone call aliases()
, returns 1 alias, chain, , chain higest certificate - ca certificate . (my code below). on ibm, can't it, since have 2 aliases , have distinguish between them first.
long story short, have 3 questions:
can load password protected file without using keystore? are differentaliases()
results related host platforms (windows/linux)? can utilize java ibm keystore extracting ca certificate without knowing certificate alias? my code:
keystore ks = keystore.getinstance("pkcs12"); ks.load(new fileinputstream(ica_cert_path), pass.tochararray()); string alias = ks.aliases().nextelement(); certificate[] chain = ks.getcertificatechain(alias); /* takes highest certificate chain - root ca */ icacert = (x509certificate) chain[chain.length - 1];
java oracle ibm keystore
Comments
Post a Comment