Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS add some missing static functions #22

Merged
merged 4 commits into from
Jul 20, 2018
Merged

JS add some missing static functions #22

merged 4 commits into from
Jul 20, 2018

Conversation

baudev
Copy link
Contributor

@baudev baudev commented Jul 12, 2018

This PR add two more useful functions:

  • from() for TPM_HANDLE class
  • nullTicket() for TPMT_TK_HASHCHECK class

It’s a small step forward in the hope of seeing the JS library functional one day! (PCR_Read() is not working for example…)

@msftclas
Copy link

msftclas commented Jul 12, 2018

CLA assistant check
All CLA requirements met.

@baudev
Copy link
Contributor Author

baudev commented Jul 19, 2018

The last commit add also nullObject() method for TPMT_SYM_DEF_OBJECT.

Copy link
Contributor

@amarochk amarochk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the advantage of a static method over the direct constructor usage?

@baudev
Copy link
Contributor Author

baudev commented Jul 20, 2018

Any excepts that it matches with the CPP examples such as :

It's just a small comfort to make them existing! I don't see any reason to refuse implementing them in Node.JS as they exist in the CPP version.

@amarochk
Copy link
Contributor

Indeed, Java version has from(), too. It is the original TSS.Net that does not have it.

Thank you for your contribution! I'm going to merge it now.

One note, in case you'll be doing any additions in the future. TpmTypes.js is actually an auto-generated file, so please do not change anything in existing methods or comments, as these changes will be lost. And in order to add new methods I'll add a new snippets file src/TpmExtensions.js.snips, similar to how it is done in TSS.Java.

@amarochk amarochk merged commit ae495cd into microsoft:master Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants