> It's hard to know what is going on without the code used to create
> the
> key. In any case, here is the snippet of code that creates a Storage
> key, extracted from the trousers testsuite:
> 
>      //Create Object
>      result = Tspi_Context_CreateObject(hContext,
>                      TSS_OBJECT_TYPE_RSAKEY,
>                      TSS_KEY_TYPE_STORAGE |
>                      TSS_KEY_SIZE_2048,
>                      &hParentKey);
>      if (result != TSS_SUCCESS) {
>          print_error("Tspi_Context_CreateObject", result);
>          print_error_exit(nameOfFunction, err_string(result));
>          Tspi_Context_Close(hContext);
>          exit(result);
>      }
> 
>          //Create Parent Key
>      result = Tspi_Key_CreateKey(hParentKey, hSRK, NULL_HPCRS);
>      if (result != TSS_SUCCESS) {
>          print_error("Tspi_Context_CreateObject", result);
>          print_error_exit(nameOfFunction, err_string(result));
>          Tspi_Context_Close(hContext);
>          exit(result);
>      }

Yes in essence this is exactly what my code does (the actual code is here 
http://pastebin.com/cDAPWN1Q). The thing is that I use the same code to 
generate all key and I only change flags and parent, so I'm getting this error 
just by switching key type from LEGACY to STORAGE.

------------------------------------------------------------------------------
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

Reply via email to