Thread: [Tpm4java-users] Infineon TPM 1.2: demo code won't work
Brought to you by:
tews
From: Markus <ax...@go...> - 2006-12-11 16:32:29
|
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! |
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/ |
From: Markus <ax...@go...> - 2006-12-12 08:59:08
|
Martin: here's what I got: ->TPM: (14) 00 C1 00 00 00 0E 00 00 00 46 00 00 00 04 TPM->: (16384) stacktrace (java.lang.RuntimeException): 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:38) Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at de.datenzone.tpm4java.TpmRandom.next(TpmRandom.java:45) ... 2 more stacktrace of cause (java.lang.ArrayIndexOutOfBoundsException): java.lang.ArrayIndexOutOfBoundsException: 0 at de.datenzone.tpm4java.TpmRandom.next(TpmRandom.java:45) at java.util.Random.nextFloat(Random.java:336) at de.datenzone.tpm4java.examples.Dice.main(Dice.java:38) |
From: Markus <ax...@go...> - 2006-12-14 13:39:07
|
Hi, I tried several TPM commands but all I got was a 16k array of zeros. :-( |
From: Erik T. <er...@de...> - 2006-12-14 15:16:39
|
Am Donnerstag, den 14.12.2006, 14:39 +0100 schrieb Markus: > Hi, >=20 > I tried several TPM commands but all I got was a 16k array of zeros. Is your TPM broken? Did you try the take ownership command? Did you try the selftest? Do you got a vendor library, which is able to execute any command? Did you enable the tpm in your bios? |
From: Markus <ax...@go...> - 2006-12-14 16:58:19
|
I'm using the Infineon Security Platform Software. It's already activated and initialized. Ownership was taken using the infineon software. The self-test succeeded. TPM applications like the Personal Security Drive work fine. > Do you got a vendor library, which is able to execute any command? Filemon (sysinternals) doesn't show any access to the infineon tpm DDL-dll, but to some other infineon dlls. I believe they use their own dlls for tpm stuff. Sadly I don't know any non-infineon application to test my tpm with. Do you? Markus |
From: Erik T. <er...@de...> - 2006-12-14 21:30:25
|
Am Donnerstag, den 14.12.2006, 17:58 +0100 schrieb Markus: > I'm using the Infineon Security Platform Software. >=20 > It's already activated and initialized. Ownership was taken using the > infineon software. The self-test succeeded. TPM applications like the > Personal Security Drive work fine. Did you do the self test with tpm4java or with the infinion software? > > Do you got a vendor library, which is able to execute any command? >=20 > Filemon (sysinternals) doesn't show any access to the infineon tpm > DDL-dll, but to some other infineon dlls. I believe they use their own > dlls for tpm stuff. >=20 > Sadly I don't know any non-infineon application to test my tpm with. Do y= ou? Well, for Windows, I only know IBM client security and tpm4java. What environment do you use? I used windows xp sp2 with visual studio .net 2005. Do you get any compiler warning when compiling your native code? |
From: Markus <ax...@go...> - 2006-12-15 10:22:47
Attachments:
compwarning.txt.gz
|
I did the self-test with the infineon software. My environment: Win XP SP2, Visual Studio .NET 2003 Visual Studio .NET Command Prompt: cl /Wall /I include /I include\win32 /LD javaddl.c (include contains the jdk 1.5 jni header files) I attached the compiler output (warnings are only visible when compiling with /Wall). |
From: Markus <ax...@go...> - 2006-12-20 14:08:12
|
Do you know of any other test case which could indentify the cause of the failure? Markus |
From: Martin H. <li...@ma...> - 2006-12-20 21:50:16
Attachments:
signature.asc
|
Markus schrieb: > Do you know of any other test case which could indentify the cause of > the failure? As all commands fail, I guess that either this DLL is not really speaking with your TPM, or maybe the TPM is exclusively used by another application. I'm afraid I don't know much that could help you. Is there any other Infineon related DLL that exports similar functions? --=20 Martin Hermanowski http://martin.hermanowski.name https://www.openbc.com/hp/Martin_Hermanowski/ |