|
From: waqar a. <afr...@gm...> - 2011-04-11 09:36:52
|
I was about to reply, I have Fixed the problem, Actually the TPM was in use
by the Trousers, Fedora 14 had it installed by default which i didn't know,
Stopping it solved the above problem.
Thanx Ronald
On Mon, Apr 11, 2011 at 2:30 PM, Ronald Tögl <ron...@ia...>wrote:
> Hello,
>
> What's your platform? How did you configure the jTSS TCS and are there any
> other TSSes installed?
>
> Ronald
>
>
> On 04/09/2011 09:49 AM, waqar afridi wrote:
>
> Hello Dear List
>
> I am using Trusted JAVA to Extend a byte array to the PCR 11 of the TPM but
> when I do I get the Following Error:
>
>
> ===========================================================================================
>
> 12:09:24:305 [WARN] TcTddlLinux::open (106): Unable to open TPM device
> file /dev/tpm.
> Reason: /dev/tpm (Device or resource busy)
>
> 12:09:24:306 [ERROR] TcTcsi::<clinit> (129): TCS startup failed.
> 12:09:24:307 [ERROR] TcTcsi::<clinit> (129):
> TSS Error:
> error layer: 0x1000 (TDDL)
> error code (without layer): 0x87
> error code (full): 0x1087
> error message: The request could not be performed because of an IO device
> error.
> additional info: Unable to open TPM device file /dev/tpm.
> Reason: /dev/tpm (Device or resource busy)
>
>
> iaik.tc.tss.api.exceptions.tcs.TcTddlException:
> TSS Error:
> error layer: 0x1000 (TDDL)
> error code (without layer): 0x87
> error code (full): 0x1087
> error message: The request could not be performed because of an IO device
> error.
> additional info: Unable to open TPM device file /dev/tpm.
> Reason: /dev/tpm (Device or resource busy)
>
>
> at iaik.tc.tss.impl.java.tddl.TcTddlLinux.open(TcTddlLinux.java:107)
> at iaik.tc.tss.impl.java.tddl.TcTddl.getInstance(TcTddl.java:44)
> at
> iaik.tc.tss.impl.java.tcs.TcTcsCommon.isOrdinalSupported(TcTcsCommon.java:66)
> at iaik.tc.tss.impl.java.tcs.tcsi.TcTcsi.<clinit>(TcTcsi.java:112)
> at
> iaik.tc.tss.impl.java.tsp.tcsbinding.local.TcTcsBindingLocal.TcsiOpenContext(TcTcsBindingLocal.java:177)
> at
> iaik.tc.tss.impl.java.tsp.internal.TcTspInternal.TspContextOpen_Internal(TcTspInternal.java:378)
> at iaik.tc.tss.impl.java.tsp.TcContext.connect(TcContext.java:167)
>
>
> ===========================================================================================
>
> The Part of Code for PCR Extending is:
>
>
> ===========================================================================================
>
> int pcrIndex = 11;
> byte[] byteData = xmlFromNode.getBytes();
>
> TcBlobData data = TcBlobData.newByteArray(byteData);
>
> try
> {
> TcTssAbstractFactory factory = new TcTssLocalCallFactory();
> TcIContext context = factory.newContextObject();
>
> context.connect("localhost");
> TcITpm tpm = context.getTpmObject();
> TcTssPcrEvent event = new TcTssPcrEvent();
> event.setPcrIndex(pcrIndex);
> event.setEventType(TcTssConstants.TSS_EV_PLATFORM_SPECIFIC);
>
> event.setVersionInfo(tpm.getCapabilityVersion(TcTssConstants.TSS_TPMCAP_VERSION,
> null));
> // event.setEvent(TcBlobData.newString(logEntry));
>
> TcBlobData oldPcrContent = tpm.pcrRead(pcrIndex);
>
> try
> {
> tpm.pcrExtend(pcrIndex, data.sha1(), event);
> }
>
> catch (TcTssException e)
> {
> if (e.getErrCode() == TcTssErrors.TSS_E_NOTIMPL)
> {
> System.out.println("\n\nNote: This TSS has no event log
> support\n\n");
> }
> else
> {
> throw e;
> }
> }
>
> context.closeContext();
>
> System.out.println("\n\nExtendPcr succeeded\n\n");
>
> if (event != null)
> {
> TcBlobData newPcrContentPlain = TcBlobData.newUINT32(pcrIndex);
> newPcrContentPlain.append(data.sha1());
>
> newPcrContentPlain.append(TcBlobData.newUINT32(event.getEventType()));
> newPcrContentPlain.append(event.getEvent());
> oldPcrContent.append(newPcrContentPlain.sha1());
> }
> else
> {
> oldPcrContent.append(data.sha1());
> }
> System.out.println("expected new content of PCR " + pcrIndex +
> ": "
> + oldPcrContent.sha1().toHexStringNoWrap());
>
> }
> catch (TcTssException e)
> {
> if (e.getErrLayer() == TcTssErrors.TSS_LAYER_TPM)
> {
> System.out.println("can't extend this pcr - wrong locality");
> }
> else
> {
> System.out.println("Error");
> }
> }
> }
>
>
> ===========================================================================================
>
> I tried with both Hardware TPM and TPM Emulator but still getting the
> Error, The above Error is of Software TPM (Both Error messages are exactly
> the Same just for hardware TPM its tpm0)
>
> Any Idea or Hint what could be the Problem?
>
> Thanx in Advance
>
> --
> *Waqar Afridi*
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
>
>
> _______________________________________________
> Trustedjava-support mailing lis...@li...://lists.sourceforge.net/lists/listinfo/trustedjava-support
>
>
>
> --
> Dipl.-Ing. Ronald Tögl phone +43 316/873-5502
> Secure and Correct Systems fax +43 316/873-5520
> IAIK ron...@ia...
> Graz University of Technology http://www.iaik.tugraz.at
>
>
--
*Waqar Afridi*
|