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 different aliases() 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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -