Re: [Tpm4java-users] Infineon TPM 1.2: demo code won't work
Brought to you by:
tews
From: Martin H. <li...@ma...> - 2006-12-11 19:59:00
|
Markus, there are two things that should be done: First, please provide the full stack trace of the exception. Second, please replace line 24 in Dice. Right now this is: > Random tpmRandom = TssFactory.getHighLevel().getTpmRandom(); The new code will turn debug information on: > TssLowlevel low = TssFactory.getLowlevel(); > low.setDebug(true); > Random tpmRandom = new TssHighLevelImpl(low).getTpmRandom(); When running the program, the raw TPM commands and replies will be printed on stdout. Given these information, I should be able to see which problem the TPM is having. Thanks, Martin Markus schrieb: > Hi, > > I recompiled my javaddl.dll to match the function names > of the Infineon device driver library > (see Thread: tpm4java: count not init dll code: -2) > and did some testing. > > Here are the results: > > 1) Sha1Sum example by Erik: > > 0000000000000000000000000000000000000000 c:\test.txt > > Test failed, no Exception thrown. > > 2) Dice example by Erik: > > Exception in thread "main" java.lang.RuntimeException: > java.lang.ArrayIndexOutOfBoundsException: 0 > at de.datenzone.tpm4java.TpmRandom.next(TpmRandom.java:50) > at java.util.Random.nextFloat(Random.java:336) > at de.datenzone.tpm4java.examples.Dice.main(Dice.java:29) > Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 > at de.datenzone.tpm4java.TpmRandom.next(TpmRandom.java:45) > ... 2 more > > BTW I'm using JDK 1.5.0_10. > > > Please help! > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Tpm4java-users mailing list > Tpm...@li... > https://lists.sourceforge.net/lists/listinfo/tpm4java-users > -- Martin Hermanowski http://martin.hermanowski.name https://www.openbc.com/hp/Martin_Hermanowski/ |