Skip to content

Commit

Permalink
client: Update for go-tpm breaking changes
Browse files Browse the repository at this point in the history
PolicySecret now returns three values (google/go-tpm#237)

We never read the encoded value from Certify, so we are not affected by:
google/go-tpm#235

Signed-off-by: Joe Richey <[email protected]>
  • Loading branch information
josephlr committed Feb 15, 2022
1 parent 7d29b1e commit 435886b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func newEKSession(rw io.ReadWriter) (session, error) {

func (e ekSession) Auth() (auth tpm2.AuthCommand, err error) {
nullAuth := tpm2.AuthCommand{Session: tpm2.HandlePasswordSession, Attributes: tpm2.AttrContinueSession}
if _, err = tpm2.PolicySecret(e.rw, tpm2.HandleEndorsement, nullAuth, e.session, nil, nil, nil, 0); err != nil {
if _, _, err = tpm2.PolicySecret(e.rw, tpm2.HandleEndorsement, nullAuth, e.session, nil, nil, nil, 0); err != nil {
return
}
return tpm2.AuthCommand{Session: e.session, Attributes: tpm2.AttrContinueSession}, nil
Expand Down

0 comments on commit 435886b

Please sign in to comment.