Skip to content

Load should return TPM2B_NAME #230

@ericchiang

Description

@ericchiang

I have some code that currently looks like this:

privBlob, pubBlob, _, _, _, err := tpm2.CreateKey(f, srk, tpm2.PCRSelection{}, "", "", tmpl)
if err != nil {
    log.Fatalf("create aik: %v", err)
}
aik, nameData, err := tpm2.Load(f, srk, "", pubBlob, privBlob)
if err != nil {
    log.Fatalf("load aik: %v", err)
}

I'm currently trying to parse nameData to pass to credactivation.Generate(). But the size prefix is lopped off.

if _, err := tpmutil.Unpack(in, &handle, &paramSize, &name); err != nil {

So parsing with DecodeName fails:

tpm2.DecodeName(nameData)

That returns

unpacking name: decoding Digest: hash algorithm not supported: 0x6e27

Okay if I send a fix?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions