Found the problem. Apparently this is wrong:
if (key_flags & TSS_KEY_TYPE_STORAGE) {
bla-bla-...
}
and this is right:
if ((key_flags & TSS_KEY_TYPE_BITMASK) == TSS_KEY_TYPE_STORAGE) {
bla-bla-...
}
Thank you for all help.
> I noticed that key usage for storage key is set to 0x0011 which is
> signing I think. That might be the problem. Do I need to explicitly
> set key usage on the key object when creating the key?
>
> > Oh sorry, it seems I misread the output. Here is the full log
> > http://pastebin.com/e27V43qA
> >
> > > There are no run time options for the emulator. See below.
> > >
> > > I can't imagine that's all you got. There was just one command,
> > > a
> > > flushspecific. When you start the emulator, redirect stdout to a
> > > file.
> > > You should see several hundred lines of startup initialization,
> > > and
> > > then some commands. Each command traces the string "Ordinal
> > > Entry",
> > > so
> > > a grep gives you the list of commands.
> > >
> > > Errors always include the string "Error". The flush didn't
> > > because
> > > flushing a resource that doesn't exist is often not an error.
> > >
> > > ~~
> > >
> > > Why there are no run time trace options: It would be a security
> > > flaw.
> > >
> > > There was some program about 10-20 years ago that had an
> > > undocumented
> > > way to turn debug tracing on. An attacker discovered it. The
> > > TPM
> > > dumps
> > > lots of secrets. Thus, if you're using it in production, you'd
> > > compiled
> > > with debug off and the printfs get compiled out.
> > >
> > > On 3/12/2014 1:58 PM, Dmitri Toubelis wrote:
> > > > Kent,
> > > >
> > > > This is actually the entire log from the emulator. Unless there
> > > > is
> > > > any extra debugging option this is all I got from it. Here is
> > > > the
> > > > corresponding log from tcsd if it of any help -
> > > > http://pastebin.com/vUAiZqGE.
> > > >
> > > > [snip]
> > > >>> TPM_Process_FlushSpecific: Ordinal Entry
> > >
> > >
> > >
> > > ------------------------------------------------------------------------------
> > > Learn Graph Databases - Download FREE O'Reilly Book
> > > "Graph Databases" is the definitive new guide to graph databases
> > > and
> > > their
> > > applications. Written by three acclaimed leaders in the field,
> > > this first edition is now available. Download your free book
> > > today!
> > > http://p.sf.net/sfu/13534_NeoTech
> > > _______________________________________________
> > > TrouSerS-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/trousers-users
> > >
> >
> > ------------------------------------------------------------------------------
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases
> > and
> > their
> > applications. Written by three acclaimed leaders in the field,
> > this first edition is now available. Download your free book today!
> > http://p.sf.net/sfu/13534_NeoTech
> > _______________________________________________
> > TrouSerS-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/trousers-users
> >
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and
> their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> _______________________________________________
> TrouSerS-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/trousers-users
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
TrouSerS-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/trousers-users