I have a iview and in my doInitialization I have this try catch block . . .
try {
// make new key
logger.log("Inside the try block ", Level.INFO);
Key jkey = CryptoUtil.generateNewKey(AES_ALGORITHM, 256);
logger.log("After the key code ", Level.INFO);
// save key (key in the file is protected by password (key is encrypted), you can not read that key directly from file)
CryptoUtil.saveKeyToFile("./utest_keystore.jceks", "utest key", enc_pwd, jkey);
logger.log("After the savekey to file ", Level.INFO);
logger.log("Saved file to server ", Level.INFO);
// load key from file
Key loadedKey = CryptoUtil.loadKeyFromFile("./utest_keystore.jceks", "utest key", enc_pwd);
logger.log("Loaded file from Server", Level.INFO);
S2MLAssertion s2ml = new S2MLAssertion();
s2ml.setIssuer("http://mydevportal.omx.com:50100/irj/servlet/prt/portal/prtroot");
s2ml.setIdentityToken(userID);
s2ml.setClientID("Officemax");
encodedS2ML = CryptoUtil.encryptForURL(loadedKey, AES_ALGORITHM,s2ml);
}
catch (GeneralSecurityException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
So my issue is it will not execute the code after the key Jkey line of code . . and the next line of code it executes is after the catch block.
The same set of code in a stand alone Java class running on my laptop/eclipse works just fine . .
Pre-config:
jar files are imported in the par file. .
SunJCE and Bouncy castle providers are registered on the portal server just like I have in my laptop.
Any thoughts . . its crunch time here and was wondering if any of you have seen some like this . .
thanx,
rajesh.