Skip to content

Commit

Permalink
Add missing methods for TPM 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hslatman committed Feb 24, 2023
1 parent eb81e6e commit 58e1b5d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions attest/key_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ func (k *trousersKey12) attestationParameters() AttestationParameters {
func (k *trousersKey12) certify(tb tpmBase, handle interface{}, qualifyingData []byte) (*CertificationParameters, error) {
return nil, fmt.Errorf("not implemented")
}

func (k *trousersKey12) blobs() ([]byte, []byte, error) {
return nil, nil, errors.New("not implemented")
}
4 changes: 4 additions & 0 deletions attest/key_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ func (k *windowsAK12) certify(tb tpmBase, handle interface{}, qualifyingData []b
return nil, fmt.Errorf("not implemented")
}

func (k *windowsAK12) blobs() ([]byte, []byte, error) {
return nil, nil, errors.New("not implemented")
}

// windowsAK20 represents a key bound to a TPM 2.0.
type windowsAK20 struct {
hnd uintptr
Expand Down
4 changes: 4 additions & 0 deletions attest/tpm12_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ func (t *trousersTPM) loadAK(opaqueBlob []byte) (*AK, error) {
return &AK{ak: newTrousersKey12(sKey.Blob, sKey.Public)}, nil
}

func (t *trousersTPM) deleteAK(opaqueBlob []byte) error {
return fmt.Errorf("not implemented")
}

// allPCRs12 returns a map of all the PCR values on the TPM
func allPCRs12(ctx *tspi.Context) (map[uint32][]byte, error) {
tpm := ctx.GetTPM()
Expand Down

0 comments on commit 58e1b5d

Please sign in to comment.