Hi Sergey, please find my answer inline. (I don't know how it will look like. My mail user agent does strange things)
Maxi, > The problem I am facing seems to happen when the RP needs to decrypt the > user token. More specifically, the method > org.eclipse.higgins.rp.icard.ICardProtocolHandler.processUserToken() is > throwing an exception in (apparently) line 146: > ie = secext.DecryptElement(elemToken, > (PrivateKey)(keyStore.getKey(keyStoreAlias,keyStorePwd.toCharArray()))); > Why do you think it is 146 line (your stacktrace says it was 147)? Turn your Just by code inspection. I downloaded both the war.zip and the source.zip from: http://download.eclipse.org/technology/higgins/downloads/rp.servlet.sample/builds/S-S20090325-200903251303/index.html The source code for org.eclipse.higgins.rp.icard.ICardProtocolHandler.processUserToken() looks like this: (line 144) PrivateKey key = (PrivateKey)keyStore.getKey(keyStoreAlias,keyStorePwd.toCharArray()); (line 145) log.info("Decrypt token using key " + key + " key algorithm " + key.getAlgorithm()); (line 146) ie = secext.DecryptElement(elemToken, (PrivateKey)(keyStore.getKey(keyStoreAlias,keyStorePwd.toCharArray()))); (line 147) log.info("Decrypted token looks like\n"+ie.getAs(java.lang.String.class)); I see (in catalina.out) the log.info() message from line 145, but I do not see the log.info() message from line 147. Also, in line 146, the invocation to keyStore.getKey() is unlikely to fail since in line 144 the exact same invocation is being done. This is what makes me think that line 146 is failing. Maybe Java reports 147 because the pre-built version and the source code differ? Or maybe it is correct to report the next line as the cause (I am not very familiar with the Java mechanisms for logging) > logging level to TRACE. If the exception was in 147, you will get "No > EncryptedKey found (getElementsByTagName returned null)" or "No EncryptedKey > found (0 == getLength())" for 146 line, whitch does mean you have a problem > with token decryption. I have changed ConfigurationFiles/log4j.properties. I tried logger.org.eclipse.higgins=trace logger.org.eclipse.higgins=debug and got the same message. Please let me know if I am doing something wrong. Thanks in advance, Maxi > Thanks, > Sergey Lyakhov ----- Original Message ----- From: <[email protected]> To: <[email protected]> Sent: Friday, August 07, 2009 5:17 PM Subject: [higgins-dev] Error in RP / DecryptElement > _______________________________________________ > higgins-dev mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/higgins-dev > _______________________________________________ higgins-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/higgins-dev
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ higgins-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/higgins-dev
