web services - Two Private keys on Weblogic -


how access 2 private keys on web logic server or via java code. pointers help. below piece of code, throws key tampered or password wrong.

similar code works if pass the truststore or keystore location direct location .truststorefile("c:\test\xyztrust.jks")

if change code below throws

/* jks contents */         final keystore keystore = keystore.getinstance("jks");         try (final inputstream = new fileinputstream(fullpathofkeystore())) {             keystore.load(is, jks_password);         }         final keymanagerfactory kmf = keymanagerfactory.getinstance(keymanagerfactory                 .getdefaultalgorithm());         kmf.init(keystore, key_password);         final trustmanagerfactory tmf = trustmanagerfactory.getinstance(trustmanagerfactory                 .getdefaultalgorithm());         tmf.init(keystore);          /*          * creates socket factory httpsurlconnection using jks          * contents          */         final sslcontext sc = sslcontext.getinstance("tls");         sc.init(kmf.getkeymanagers(), tmf.gettrustmanagers(), new java.security.securerandom());         final sslsocketfactory socketfactory = sc.getsocketfactory();         httpsurlconnection.setdefaultsslsocketfactory(socketfactory); 

error :- keystore tampered with, or password incorrect

note:- password , keystore 1000 % correct.

you can find keystore using admin-console. got environment -> servers -> adminserver. should see this: enter image description here

in field "custom identity keystore"is path keystore file, , in field "custom trust keystore" path trust key.

in case don't have correct password can use following link decrypt them.

http://techtapas.blogspot.de/2011/05/how-to-decrypt-weblogic-passwords-with.html?m=1

if using default passwords of chances 1 of those: https://itguykelly.wordpress.com/2010/05/20/default-weblogic-keystore-passwordpassphrase/


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -